[Libav-user] How to set display and sample aspect ratio in stream

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Oct 14 13:17:54 CEST 2015

qw <applemax82 at ...> writes:

> I use ffmpeg to encode video/audio and mux video/audio 
> streams into one files. How to set display

>From a programer's pov, there is no display aspect ratio.

> and sample aspect ratio for video stream?

(Where did you search for "aspect" in the code?)

Video SAR or container SAR?
Both AVCodecContext and AVStream contain a 
field sample_aspect_ratio that you may set.

Carl Eugen

More information about the Libav-user mailing list