Git Product home page Git Product logo

Comments (8)

JvanKatwijk avatar JvanKatwijk commented on September 3, 2024

from dab-cmdline.

macmpi avatar macmpi commented on September 3, 2024

Yes MPD deals with most formats, including plain samples.
It does manages playlists also and all sort of tags/metadata, so scanned DAB radio channels could easily be filled in such playlist to that any MPD client (GUI / cmdline) would seamlessly handle channel selection.
There is a huge range of GUI clients available on any platforms.

from dab-cmdline.

Lamarqe avatar Lamarqe commented on September 3, 2024

I use dab-cmdline in combination with MPD.
The bridge between both is created with TvHeadend. You need to create a pipe input mux for each radio station in TvHeadend. Details regarding this solution can be found here: https://tvheadend.org/issues/3309

You can use the TVHeadend playlist directly in MPD. An excerpt from my playlist:

#EXTM3U
#EXTINF:-1,ANTENNE BAYERN
http://localhost:9981/stream/channelid/508067241?profile=pass

The Pipe Mux for this station uses the following URL :

pipe:///usr/local/dab-cmdline/example-4/build/runscript.sh 11D "ANTENNE BAYERN"

The helper script contents look like this:

#!/bin/bash
/usr/local/dab-cmdline/example-4/build/dab-rtlsdr-4 -M 1 -B "BAND III" -C $1 -P "$2" -G 80  | ffmpeg -i pipe: -acodec copy -metadata service_provider=DAB+ -metadata service_name="$2" -vn -f mpegts -mpegts_service_type digital_radio -nostats -loglevel 0 pipe:1

from dab-cmdline.

vale-max avatar vale-max commented on September 3, 2024

@Lamarqe Are you sure the audio is decoded correctly, e.g. the pitch is correct, or the tempo?
As far as I remember MPD uses ffmpeg to decode the audio, and ffmpeg does not support correctly the DAB+ AAC frames that have 960 rather than 1024 samples.
I tried repeatedly to have this issue fixed in ffmpeg but for some reason this bug keeps being ignored:
https://trac.ffmpeg.org/ticket/1407

from dab-cmdline.

Lamarqe avatar Lamarqe commented on September 3, 2024

Yes, I am. I use this setup every day. 😄

I had initial problems with the tempo when I used example-3. I tried to work around with some ffmpeg parameter to manually correct it, but the results were unacceptable.

As soon as I switchted to example 4 ("No sound decoding takes place. The MP2 frames (in case of DAB) and the AAC frames (in case of DAB+) are just emitted into a file or to stdout."), the problems disappeared.

Interistringly, my trigger to switch to example 4 was the CPU usage. Example 4 uses far less CPU. So this switch solved two problems at the same point in time.

from dab-cmdline.

Lamarqe avatar Lamarqe commented on September 3, 2024

One more comment:
Example 4 avoids any re-encoding within dab-cmdline.
The ffmpeg command line in my tvheadend helper script also does not do any re-encoding. The only thing it does, is to wrap the dab-cmdline stream into an mpegts envelope. This is the prerequisite for tvheadend which does the http serving (which I then again use in mpd as a stream URL). Bottom line: No re-encoding at all. At the end, mpd streams the original DAB+ stream (in my case via pulseaudio to chromecast and chromecast does the decoding).

from dab-cmdline.

Lamarqe avatar Lamarqe commented on September 3, 2024

@vale-max I recently changed my setup and then also faced issues with streams that could not be processed due to the ffmpeg incompatibility you mentioned.

This ended up in replacing the ffmpeg command line in my helper script with a VLC one:

#!/bin/bash
/usr/bin/dab-rtlsdr-4 -M 1 -B "BAND III" -C $1 -P "$2" -G 80 2>/dev/null | cvlc - --sout "#transcode{acodec=mpga,channels=2,rate=44100,ab=320}:std{access=file,mux=ts,tsid=1,dst=-}" -q --intf dummy vlc:quit 

So instead of handing over the stream as-is to tvheadend, it is getting processed and converted before by VLC. Apparently, libVLC does not have this problem.

from dab-cmdline.

Related Issues (20)

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.