[FFmpeg-user] using spdif demuxer

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Aug 2 20:28:24 CEST 2012


Sam Hawkens <Sam.Hawkens <at> freenet.de> writes:

> ffmpeg -ar 48000 -ac 2 -f alsa -i plughw:1,0 -f alsa hw:0,0
> 
> Now I want to use this also for ac3 or dts. -f alsa option 
> will not work together with -acodec ac3.
> -f spdif should in my understanding be the right selection 
> for spdif input demuxer, but this will not go
> together with alsa plughw:1,0. So how can I do this?

I described this for a similar use-case here:
http://www.nvnews.net/vbulletin/showthread.php?t=157347
I currently cannot test, but I suspect the following should work:
$ ffmpeg -i input -acodec ac3 file.spdif
$ aplay -D iec958 -c2 -fs16_le -r48000 file.spdif
(Just to make sure: c2 fs16le r48000 has nothing to do with the 
actual number of channels and rate in your input file, it is 
absolutely necessary for AC-3 and DTS via spdif.)
I am not sure about the value for "D", just found iec958 googling.

Carl Eugen



More information about the ffmpeg-user mailing list