Git Product home page Git Product logo

mpdcast-dab's Introduction

MpdCast DAB

=====================

MpdCast DAB combines two major functionalitities:

  • DAB+ streaming server with support for radio text and live pictures
  • MPD to Google cast streaming application, including song / program details (text and pictures) for
    • MPD local database
    • TvHeadend
    • The included DAB+ streaming server itself

MpdCast DAB uses the DAB+ implementation of welle.io (https://github.com/AlbrechtL/welle.io).

Table of contents

Installation

Pre-built packages for Debian or Ubuntu 24.04+

(commands to be executed with root permissions)

  • add-apt-repository ppa:lamarqe/ppa
  • apt update
  • apt install mpdcast-dab

Configuration

MpdCast DAB reads mpd.conf and requires / reads the following properties in it:

  • audio_output of type "httpd" must be enabled
  • the name property must be set to your chromecast device name, eg: "Nest Hub"

example config:

audio_output {
        type            "httpd"
        name            "Nest Hub"
        encoder         "lame"          # optional, vorbis or lame
        port            "8000"
        bind_to_address "0.0.0.0"               # optional, IPv4 or IPv6
        quality         "7.0"                   # do not define if bitrate is defined
        bitrate         "192"                   # do not define if quality is defined
        format          "48000:16:2"
        max_clients     "0"                     # optional 0=no limit
}

Usage

Command-line parameters

Parameter Description Default Value
-p PORT, --port PORT Communication port to use 8864
-c CONF, --conf CONF MPD config file to use /etc/mpd.conf
--disable-dabserver Disable DAB server functionality False
--disable-mpdcast Disable MPD Cast functionality False
--verbose Enable verbose output False

DAB+ Server

The DAB+ server comes with a simplistic UI, accessible via the configured port.

Screenshot

The scan will generate a .m3u8 playlist looking similar to the example below. The playlist can be used with any audio player like VLC or MPD.

#EXTINF:-1,gong fm
http://192.168.2.48:8864/stream/6C/gong%20fm
#EXTINF:-1,GONG NUERNBERG
http://192.168.2.48:8864/stream/10C/GONG%20NUERNBERG
#EXTINF:-1,HIT RADIO N1
http://192.168.2.48:8864/stream/10C/HIT%20RADIO%20N1
#EXTINF:-1,KLASSIK RADIO
http://192.168.2.48:8864/stream/5C/KLASSIK%20RADIO
#EXTINF:-1,LIEBLINGSRADIO
http://192.168.2.48:8864/stream/10C/LIEBLINGSRADIO
#EXTINF:-1,max neo
http://192.168.2.48:8864/stream/10C/max%20neo

Supported Hardware

MpdCast DAB is intended to be used with an RTL-SDR device (https://www.rtl-sdr.com/)

Building

General Information

The following libraries and their development files are needed:

  • Python >= 3.11
  • FFTW3f
  • libfaad
  • librtlsdr
  • pybind11

Debian / Ubuntu Linux

This section shows how to compile MpdCast DAB on Debian or Ubuntu (tested with Ubuntu 24.04).

  1. Install the base requirements
sudo apt install git build-essential cmake
  1. Install the following packages
sudo apt install python3-dev libfftw3-dev libfaad-dev librtlsdr-dev pybind11-dev
  1. Clone MpdCast DAB
git clone https://github.com/Lamarqe/mpdcast-dab.git
  1. Build MpdCast DAB (using cmake)
cd mpdcast-dab
cmake -B build
make -C build -j3
  1. Run MpdCast DAB and enjoy it
export PYTHONPATH=$PWD
./mpdcast_dab/__main__.py

mpdcast-dab's People

Contributors

lamarqe avatar

Stargazers

 avatar

Watchers

 avatar

mpdcast-dab's Issues

Use AbracaDABra's library instead

With the appImage I tried to use mpdcast-dab but the results are much behind my expectations and I may get in the error (even for local stations >30 dB):

grafik

loading failed

Furthermore, it will not detect all muxes in my case.

As I am also not satisfied with the performance of welle-io (where I was contributing to some time ago) do you see any chance to switch to the library of https://github.com/kejpi/AbracaDABra ?

Check installation procedure

./mpdcast_dab/__main__.py

In the past, I have used the precompiled version, but when I want to start it from the directory mpdcast-dab (so not mpdcast_dab) then I get the following error:

andreas@E535:~/apps/mpdcast-dab$ ./mpdcast_dab/__main__.py
Traceback (most recent call last):
  File "/home/andreas/apps/mpdcast-dab/./mpdcast_dab/__main__.py", line 170, in <module>
    main()
  File "/home/andreas/apps/mpdcast-dab/./mpdcast_dab/__main__.py", line 125, in main
    mpd_caster = prepare_cast(options, my_ip, web_app)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andreas/apps/mpdcast-dab/./mpdcast_dab/__main__.py", line 75, in prepare_cast
    if not mpd_caster.initialize():
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andreas/apps/mpdcast-dab/mpdcast_dab/mpdcast/mpd_caster.py", line 146, in initialize
    return self._mpd.config.initialize()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andreas/apps/mpdcast-dab/mpdcast_dab/mpdcast/mpd_caster.py", line 50, in initialize
    self.load()
  File "/home/andreas/apps/mpdcast-dab/mpdcast_dab/mpdcast/mpd_caster.py", line 60, in load
    with open(self._filename, 'r', encoding='utf-8') as cfg_file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/etc/mpd.conf'

which is coming from

parser.add_argument('-c', '--conf', help= 'MPD config file to use.', default='/etc/mpd.conf')

It seems that some paths are different on my Linux Mint (= Ubuntu 24.04) than on your system. Or the installation process has a bug in it.

For example, I also get

FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/mpdcast-dab/webui/index.htm'

The complete path /usr/share/mpdcast-dab does not exist here.

Use channel names in scan

Let me propose to write the current scanned channel name (e.g. 6A) as well to the progress bar (xx of 54 channels).

grafik

This is easier to understand for DAB users in my opinion ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.