Opendigitalradio / ODR-AudioEnc

ODR-AudioEnc is a DAB and DAB+ audio encoder, part of the ODR-mmbTools.
https://www.opendigitalradio.org
23 stars 17 forks source link

Audio Input does not work #24

Open raphael303 opened 1 year ago

raphael303 commented 1 year ago

I have setup audioenc - dabmux - dabmod and all works with an audio stream from an url.

This: odr-audioenc -v "https://eatv.radioca.st/stream" -r 48000 -c 2 -o "tcp://localhost:9003" -l -b 192

Will result in proper encoding.

This: odr-audioenc -d hw:0,0 -r 48000 -c 2 -o "tcp://localhost:9003“ -l -b 192 or this: odr-audioenc --device=hw:0,0 -r 48000 -c 2 -o "tcp://localhost:9003“ -l -b 192 or this: odr-audioenc --device=sndrpihifiberry -r 48000 -c 2 -o "tcp://localhost:9003“ -l -b 192 or this: odr-audioenc --device= snd_rpi_hifiberry_dacplusadcpro -r 48000 -c 2 -o "tcp://localhost:9003“ -l -b 192 or this: odr-audioenc -d snd_rpi_hifiberry_dacplusadcpro -r 48000 -c 2 -o "tcp://localhost:9003“ -l -b 192

Will all result in a hanging prompt.

My aplay -l looks like this:

**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplusadcpro], device 0: HiFiBerry DAC+ADC Pro HiFi multicodec-0 [HiFiBerry DAC+ADC Pro HiFi multicodec-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Any ideas?

raphael303 commented 1 year ago

Addition I tried a workaround with the same result:

jackd -d alsa --device hw:0,0 --capture -n MyJackInput odr-audioenc -j MyJackInput -r 48000 -c 2 -o "tcp://localhost:9003“ -l -b 192

Also, I tried recording audio with "gnome recorder" this also worked.

mpbraendli commented 1 year ago

Hi, is this solved for you now with -d plughw:1,0 ?

raphael303 commented 1 year ago

Sort of. It does work, but imho if it is supposed to work with any of the above commands it is inherently a problem with newer linux releases or a bug. From what I experienced I'd say that the problem lies in the format. It is unclear what the encoder expects and it can not be defined. plughw seems to work because alsa does some "conversion magic" in the background. But that of course leads to more latency and imho overall another layer which can cause problems.