[Ffmpeg-devel] [BUG] DV in QuickTime - Aspect Ratio

herve.flores herve.flores
Wed Mar 14 11:33:25 CET 2007


Le 14 mars 07 ? 01:36, Baptiste Coudurier a ?crit :

> Hi
>
> Roman Shaposhnik wrote:
>> On Mon, 2007-03-05 at 17:38 -0600, Brian Brice wrote:
>>> Hello,
>>>
>>> I have encoded clips with the DV video codec with having the  
>>> QuickTime
>>> container.  These clips were to have 16:9 aspect ratio.  Having  
>>> ffmpeg
>>> read these clips back in does not maintain the aspect ratio.
>>>
>>> avctx->sample_aspect_ratio always comes back as {0,1}.  Nothing  
>>> in the
>>> QuickTime demux OR DV decoder sets the aspect ratio.
>>
>>   Of course that would be a QT problem because it seems that we have
>> a container format not capable of signaling aspect ratio. But then
>> again, now that we have SAR generation being part of the DV codec,
>> I have no problem with making SAR recognition being part of the codec
>> as well.
>>
>>   Anybody thinks its a bad idea ? Anybody thinks that CODECs should
>> not set avctx->sample_aspect_ratio ?
>>
>
> I know mov has specific atoms to declare pixel aspect ratio (pasp),  
> and
> clean aperture (clap),

beware of the aperture bit, it's a very stange thing (introduce in  
QT7 and not recognize with earlier versions)
with the aperture bit, a DV 16:9 PAL (720*576) is not display in  
1024*576 but with a lot of different sizes (aperture clean,  
production, etc)
this bit does not display an anamorphous file in square pixel but  
in ... something neither square, nor an anamorphous reflecting the  
real pixel size.
just the classic bit can display correctly
...was just my opinion

> my guess is that mov muxer should set them
> correctly, I'll fix what needs to be fixed, just supply a dv 16:9
> sample, or a way to generate one with ffmpeg.

ffmpeg -i input -aspect 16:9 -target pal-dv output.dv

resulting size: 720*576
display size in QT (QTMovieApertureModeAttribute = clas;  or  
QTMovieHasApertureModeDimensionsAttribute = 0;) : 1024*576

by default the output.dv from ffmpeg is set to (QuickTime's infos):
     QTMovieApertureModeAttribute = clas;
    [...]
    QTMovieHasApertureModeDimensionsAttribute = 1;

bye

Herv?



More information about the ffmpeg-devel mailing list