[FFmpeg-devel] [PATCH]Set sample_aspect_ratio in real demuxer

Nicolas George nicolas.george at normalesup.org
Wed Dec 19 12:22:22 CET 2012

Le nonidi 29 frimaire, an CCXXI, Carl Eugen Hoyos a écrit :
> New patch attached, I tested with several samples (with different dar), with 
> the patch the display aspect ratio is correctly shown (it is unknown 
> without).

I believe this is wrong.

With the patch, for
I get the following ffprobe -show_streams -show_frames output:


which is obviously wrong.

The problem is that the result is different when the frames are not decoded:


I believe what happens is this: the resolution stored in the format is the
"display resolution", i.e. the display aspect ratio with useless common
factors. When it is the same as the frames resolution, it means SAR=1 and
that works. If no decoding is attempted, there is nothing to notice that the
frame resolution is different, so it seems to work too.

I do not know how to solve the issue: it would require storing the display
aspect ratio somewhere, but there are only fields for sample aspect ratio.
And the sample aspect ratio is not known unless we have the frames


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121219/6257bbd9/attachment.asc>

More information about the ffmpeg-devel mailing list