How to decode and loop-back and iec958/spdif bitstream?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



08.03.2015 23:00, Benjamin Tegge wrote:
> Hello,
>
> I want to feed a 5.1 stream (dca or a52) from another device through a
> iec958/spdif connection to my computer and play the audio through
> loopback on the computer, I don't want to do pass-through. The C-Media
> CM106-based device used with PulseAudio and the loopback module on
> Ubuntu 14.04 (PulseAudio 4.0) work in stereo, but 5.1 does not.
>
> I wanted to set this up for quite some time, but was puzzled how all the
> parts come together:
> - There is iecset from the alsa tools to configure iec958 ports
> (audio/data, consumer/pro), but this is just for outgoing connections,
> right?
> - Are there decoding functions in PulseAudio or would I have to use an
> external program like ffmpeg/avconv to demux and decode the spdif
> bitstream to PCM? I already found
> https://www.ffmpeg.org/ffmpeg-devices.html#pulse and tried that, but
> couldn't get 5.1 to work.
>

PulseAudio contains no decoders, so you would need to use an external 
tool. Also, PulseAudio does not support receiving compressed formats 
over spdif. Possibly this pipeline could work as a proof of concept:

arecord -f dat -D spdif:1 | ffmpeg -f spdif -i - -f pulse default

or:

ffmpeg -f alsa -acodec ac3 -i spdif:1 -f pulse default

(not tested, because I don't have anything with spdif-input capability)

-- 
Alexander E. Patrakov


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux