ec-3 Decoder follow-up
ec-3 Decoder follow-up
- Subject: ec-3 Decoder follow-up
- From: "McGrath, Christopher" <email@hidden>
- Date: Wed, 22 Dec 2010 13:09:06 +1100
- Thread-topic: ec-3 Decoder follow-up
Title: ec-3 Decoder follow-up
Hi all,
[If you didn't read my previous post, I'll summarise: I'm creating a decoder for 'ec-3'
Dolby Digital Plus audio based on ACSimpleCodec.cpp and its associated classes.
For all the details see http://lists.apple.com/archives/Coreaudio-api/2010/Dec/msg00140.html]
I've experimented some more and have discovered the following. Using my own
mp4 demuxer, I have extracted an ec-3 track from one of my mp4 files and then
used ffmpeg to put this into a .mov container (I am assuming the result would
be the same had I put it back into an mp4 container, however ffmpeg refuses to do
this, throwing an error "could not find tag, codec not currently supported in container").
Using the .mov container, my decoder works as expected. On closer inspection of
the two files inside Atom Inspector, I see that ffmpeg has stripped out the dec3 atom
from the sample table sample descriptions, and instead supplies a little extra
information inside the sample descriptions (samples per packet, bytes per sample,
and displays that it's 6ch audio). This is not conforming to the standard, (the mp4
container should display 2ch regardless of what's inside the ec-3 bitstream), however
it is enough to fool quicktime into giving my decoder data and hence playing ec-3
audio.
This image shows the differences between the containers: http://imgur.com/DwjrC.jpg
My hypothesis is that quicktime/coreaudio has built-in support for the dac3 atom
(containing the decoder-specific information such as sample rate and num. channels)
but not for the slightly-different dec3 atom. This is confirmed by me meddling with
the dac3 atom in a hex editor, which causes quicktime to get the channel layout
wrong in its movie inspector.
Does anybody have experience with getting a codec such as this to work? Could
there be some sort of work-around, or do I need to give quicktime a new mp4
demuxer? Perhaps I could create something to help the mp4 demuxer understand the
dec3 atom. Is there something I might be missing/misunderstanding?
Any ideas would be greatly appreciated.
Thanks,
Chris.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden