[Libav-user] Getting the correct display resolution
george at nsup.org
Wed May 6 20:32:50 EEST 2020
Info || Non-Lethal Applications (12020-05-06):
> There’s AVVideoCodecContext->width/height,
That is what you want.
Encode a 126x126 video with x264, then use ffprobe to examine it and
compare coded_width and width.
> and also sample_aspect_ratio.
PAL DVDs are 720×576, meant for 16:9. Do the math.
The sample_aspect_ratio for PAL DVDs is 64/45. Do some more math.
> There’s also AVStream->sample_aspect_ratio, display_aspect_ratio and
These come from the stream, i.e. are obtained from the headers of the
encapsulation format. The data in AVCodecContext comes after decoding
the actual payload.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the Libav-user