[FFmpeg-devel] Weird monkey audio codec tag

Michael Niedermayer michaelni
Sun Sep 16 02:47:40 CEST 2007


Hi

On Sun, Sep 16, 2007 at 12:53:42AM +0200, Reimar D?ffinger wrote:
> Hello,
> On Sat, Sep 15, 2007 at 11:36:13PM +0200, Benjamin Zores wrote:
> > It appears Monkey Audio demuxer sets codec_tag to 'APE ' while official 
> > fourcc (which is looked for in probe()) is 'MAC '.
> > 
> >  >    st->codec->codec_type      = CODEC_TYPE_AUDIO;
> >  >    st->codec->codec_id        = CODEC_ID_APE;
> >  >    st->codec->codec_tag       = MKTAG('A', 'P', 'E', ' ');
> > 
> > Kostya, any reason you did this ?
> 
> .ape is the usual file extension for those files and MAC has about 100
> other meanings in addition.
> Of course all this is hard to say since still nobody has found out what
> codec_tag actually is supposed to be there for...

well its more that everyone does with codec_tag whatever he likes and what
most effectively works around a bug he doesnt want to fix ...

codec_tag is supposed to be set to the tag which identifies the used codec
in the specific stream in a container
that would be the fourcc in avi, the fourcc in mov, that object id thingy
in mp4, ...
for formats which use strings to identify codecs, codec_tag is supposed
to be a index into the table of strings shared by the muxer and demuxer
of that format

and each (de)muxer exports a AVCodecTag list containing mappings of
codec_ids to and from codec_tags
that allows an application to pass a codec_tag unchanged from demuxer to
muxer if both support it and remap it to a correct codec_tag for the
used codec if not

so much for the theory, not all (de)muxers conform to this, mp4 for example
is completely broken also other formats like matroska lack a AVCodecTag
list, ...


so what about demuxers which have no codec tag as they support just one
codec? well in that case it really shouldnt matter what codec_tag is set
to (and any application depending on a specific value is VERY broken,
just think of the foobar container which uses the tag foMA for monkeys
audio, it has a different tag and wont work with that app ...)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070916/55e9b229/attachment.pgp>



More information about the ffmpeg-devel mailing list