[Ffmpeg-devel] raw video support in quicktime wrongly assumesraw audio
Tomas Stenlund
tomas.stenlund
Fri Nov 3 16:44:49 CET 2006
----- Original Message -----
From: "Baptiste Coudurier" <baptiste.coudurier at smartjog.com>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at mplayerhq.hu>
Sent: Friday, November 03, 2006 4:10 PM
Subject: Re: [Ffmpeg-devel] raw video support in quicktime wrongly
assumesraw audio
> Hi
>
> Tomas Stenlund wrote:
>> [...]
>>
>> So it assumes, wrongly, that this is an audio codec.
>>
>
> Right.
>
>> When I looked at the sourcecode for mov.c I found out that the 'raw '
>> support
>> for video was commented out and that the mov_read_stsd always tried the
>> audio fourcc before the video regardless of what the hdlr header said. So
>> the 'raw ' exists for both video and audio codec.
>
> Yes. Point is that 'hdlr' atom can be located after 'stsd' atom,
> therefore codec type is not known while parsing 'stsd'.
In the Quicktime file format document they say:
-----8<----------8<-----------8<-----------8<----------8<-----------8<--------
Atoms within container atoms do not have to be in any particular order, with
the exception of handler
description atoms. Handler description atoms must come before their data.
For example, the media
handler description must come before a media information atom. A data
handler description atom
must come before a data information atom.
-----8<----------8<-----------8<-----------8<----------8<-----------8<--------
And they always show the layouts of the atoms and structures in a
particular.
I'm a bit confused here, what atoms are handler description atoms ? But I
guess you are
correct, that the order is not given and that it is better to be safe than
sorry.
>
> Solution is to delay 'stsd' parsing until we are sure about the codec
> type. Im actually working on it.
>
Reading in the entire moov structure or just that part ?
>> I'm completely new to the ffmpeg architecture and how you want to solve
>> things but it was pretty simple to add this support so it worked for me.
>> I added
>> support for 'raw ' in mov.c and used the hdlr information if available in
>> the stsd reader and mapped 'raw ' to RGB24 format in the raw.c.
>
> Not sure. Check avctx->bits_per_sample value got from 'stsd' I think.
>
Ah, thats a good check to do.
> [...]
>
> --
> Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
> SMARTJOG S.A. http://www.smartjog.com
> Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> Phone: +33 1 49966312
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list