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

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Dec 20 11:38:25 CET 2012

Nicolas George <nicolas.george <at> normalesup.org> writes:

> 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
> https://ffmpeg.org/trac/ffmpeg/raw-attachment/ticket/1550/join_cut.rmvb
> I get the following ffprobe -show_streams -show_frames output:
> width=712
> height=568
> sample_aspect_ratio=1:1
> display_aspect_ratio=89:71
> which is obviously wrong.

Isn't this an independent bug?
What I want to fix is that ffmpeg -i file shows 
"unknown DAR" while it is actually known.
(Imo, there is also a bug in ffplay that ignores 
the stream DAR on resolution changes.)


> 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.

Do you think there is a situation where is does not work?

Carl Eugen

More information about the ffmpeg-devel mailing list