[FFmpeg-devel] [PATCH] Write Pixel Aspect Ratio tag to QuickTime files

Baptiste Coudurier baptiste.coudurier
Wed Jul 7 22:37:34 CEST 2010


Hi,

On 07/07/2010 10:24 AM, Daniel Kristjansson wrote:
>
> This allows for non-square pixels in QT containers regardless
> of codec. 'pasp' is also a required tag in Apple QT when the
> pixels are not square.

I doubt this is required.
How does quicktime do with mp4 that did only define pasp until recently ?

 > [...]
>
> mov-pasp.patch
>
>
> --- libavformat/movenc.c.orig	2010-07-07 13:17:32.571296315 -0400
> +++ libavformat/movenc.c	2010-07-07 13:17:42.781296459 -0400
> @@ -747,6 +747,25 @@ static int mov_write_subtitle_tag(ByteIO
>       return updateSize(pb, pos);
>   }
>
> +static int mov_write_pasp_tag(ByteIOContext *pb, MOVTrack *track)
> +{
> +    int64_t pos = url_ftell(pb);
> +    unsigned hSpacing = 1, vSpacing = 1;
> +
> +    if (track->enc->sample_aspect_ratio.den ||
> +        track->enc->sample_aspect_ratio.num) {
> +        hSpacing = track->enc->sample_aspect_ratio.num;
> +        vSpacing = track->enc->sample_aspect_ratio.den;
> +    }
> +

0/1 would set them here, and that's not wanted.

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list