[FFmpeg-devel] [PATCH] mp4 and ipod metadata

Baptiste Coudurier baptiste.coudurier
Wed Jun 11 21:56:29 CEST 2008

Michael Niedermayer wrote:
> On Wed, Jun 11, 2008 at 11:46:47AM -0700, Baptiste Coudurier wrote:
>> Michael Niedermayer wrote:
>>> On Wed, Jun 11, 2008 at 02:55:47AM -0700, Baptiste Coudurier wrote:
>>> [...]
>>>>> That doesnt mean ipod tags should be in -f mp4 or -f mov but that
>>>>> there is a -f foobar that contains all tags of all variants. I prefer
>>>>> if i dont need to have each video 3 times so it can be played on 3
>>>>> different players.
>>>> I understand the need, Im afraid it's complicated.
>>>> Unfortunately, it is so brainded to deal with all iso media variants and
>>>> their fields having different meaning values that I tend to prefer
>>>> constraining specific features to specific formats.
>>>> I think that adding this ipod format was a good thing.
>>> Could you point at a few examples were fields have different meaning
>>> between mp4 types (not mp4 vs. mov)?
>> mp4/3gp channels field in stsd for example, which is reserved to 2 while
>> in mj2/mov it is actual channels number.
> hmm, soo many specs to read and compare :(

Yes, that was I was saying.

> [...]
> So we may have multiple stsd boxes and ones with unknown "codingname" must
> be ignored.

Im strongly against created files with 2 stsd.

> ---
> class AudioSampleEntry(codingname) extends SampleEntry (codingname){
>    const unsigned int(32)[2] reserved = 0;
>    template unsigned int(16) channelcount = 2;

> [...]
> ...
> 8.16.3 Semantics
>     version is an integer that specifies the version of this box
>     entry_count is an integer that gives the number of entries in the following table
>     SampleEntry is the appropriate sample entry.
>     data_reference_index is an integer that contains the index of the data reference to use to retrieve
>        data associated with samples that use this sample description. Data references are stored in Data
>        Reference Boxes. The index ranges from 1 to the number of data references.
>     ChannelCount is either 1 (mono) or 2 (stereo)
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ---
> So if i understand the base format does not require ChannelCount to be 2
> but says=2 in the table

What if channels are 6 ? This is unclear.

> 3gp which is based on the iso base format says reserved_2 for the field but
> does not say anything about channels. Thus it appears it has been copy and
> pasted but the description has not.
> Neither does specify what the word "reserved" means.

IMHO "reserved" is fixed value.

> So IMHO this is a typo in the spec. Or maybe reserved just means "unless
> another ISO spec says something else". Of course this is guessing the
> spec is not clear, it uses undefined terms.

I don't think so, 3gp uses template field and mandates it to be set, it
always has been and I don't think it's a typo at all.

Besides 3gp is meant for phones and all phones I know have only one
speaker, this is stupid it should have been reserved_1 first, but anyway
channel field is useless.

> Besides as long as the codingname differs between specs no conflict exists
> when we store 2 stsd.
> IMHO maybe we should just store the channel num there, the base spec says
> thats ok and the other specs are quite unclear ...

3gp says reversed_2 for all descriptions. So it will be 2. MPEG-4 says
template values has to be used since channel configuration is in esds,
so it is 2.

Anyway it is not necessary to relaunch this discussion about these
standards, we already had it many times and it always end badly.

Muxer creates standard compliant files for all formats.
If you want interoperability, choose another format, they screwed up
badly on this.

Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA

More information about the ffmpeg-devel mailing list