[FFmpeg-user] Ingest of SMPTE-377M

Mark Nelson markn at ieee.org
Tue Jan 5 16:09:56 CET 2016


Hi Carl,

I am unable to recreate the results you are describing here.

Starting with the sample.ac3 file I posted a copy of earlier:
https://www.dropbox.com/s/ripe53oci6wz7t6/sample.ac3?dl=0

Packaging it with smpte 337M:

ffmpeg -i sample.ac3 -acodec ac3 -f spdif sample.ac3.spdif

Gives this file:
https://www.dropbox.com/s/zksgfvavopi4qdq/sample.ac3.spdif?dl=0

It looks correct, it has SMPTE377 headers wrapped around AC3 frames with
lots of null space in between, as I would expect.

Converting this to a WAV file using your command as an example:

ffmpeg -f s16le -ac 2 -ar 192k -i sample.ac3.spdif -acodec copy
sample.ac3.spdif.wav

Creates this wav file:
https://www.dropbox.com/s/awoqe8l078ppezm/sample.ac3.spdif.wav?dl=0

That WAV file looks correct - it is more or less identical to the ones in
the Dolby SDK sample files, however it appears to have a little bit of
extra information in the WAV header that is not present in the Dolby
version.

Attempting to play this with mplayer doesn't work - it treats the input as
if it were PCM so you hear garbage:

*Playing Desktop/sample.ac3.spdif.wav.*
*libavformat version 54.20.4 (external)*
*Mismatching header version 54.20.3*
*Audio only file format detected.*
*Load subtitles in Desktop/*
*==========================================================================*
*Opening audio decoder: [pcm] Uncompressed PCM audio decoder*
*AUDIO: 192000 Hz, 2 ch, s16le, 6144.0 kbit/100.00% (ratio: 768000->768000)*
*Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)*
*==========================================================================*
*AO: [pulse] 192000Hz 2ch s16le (2 bytes per sample)*
*Video: no video*


So I am guessing that the SPDIF decoding is not being done by mplayer, it
is in the ALSA drivers you have on your system - and maybe specific to the
hardware they are driving.

Does this sound as though it is the likely reason for me not seeing your
results? And can I replicate your configuration with the proper
installation of alsa drivers?

------------------------------------------------------------------------------

Mark Nelson – markn at ieee.org - http://marknelson.us

On Mon, Dec 28, 2015 at 1:34 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Mark Nelson <markn <at> ieee.org> writes:
>
> > Same file wrappred in SMPTE-377M headers and packaged
> > in a WAV file as if it were 1536 kbps PCM:
> >
> > https://www.dropbox.com/s/tec7al5bcmihwey/sample.eac3.337.wav
>
> Is this really valid?
> My receiver cannot play this, the following plays as
> expected here (showing that eac3-over-spdif works
> fine on my equipment):
> $ ffmpeg -i input -acodec eac3 -f spdif out
> $ ffmpeg -f s16le -ac 2 -ar 192k -i out -acodec copy out.wav
> $ mplayer out.wav -ao alsa:device=hw=1.7
>
> I can make your file play but I wonder if I should...
> (And yes, I do remember that this isn't your issue
> but I would still like to understand the issue first.)
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list