[FFmpeg-devel] [PATCH] (for discussion): nvenc: fix wrong aspect ratio for 720x576 and 720x480 resolution

Philip Langdale philipl at overt.org
Mon Feb 13 19:26:42 EET 2017

On 2017-02-13 08:33, Miroslav SlugeĊˆ wrote:
> I am sure that i know what is going on, NVENC is inserting wrong SPS
> VUI aspect_ratio_idc to h264 packets when you encode at resolution
> 720x576 and 720x480
> AR 16:9 will insert aspect_ratio_idc=4 but it should be
> aspect_ratio_idc=255, sar_width=64, sar_height=45 for 720x576
> AR 4:3 will insert aspect_ratio_idc=2 but it should be
> aspect_ratio_idc=255, sar_width=16, sar_height=15 for 720x576
> MP4 and MKV containers contains correct AR metadata information which
> all players should accept, but TS container has nothing like that so
> it relies on what is inside h264 SPS.

Makes sense. So, I think this really needs fixing inside the driver.
Having to do the whole parse/rewrite thing is horrible - and that's
even after rewriting it not to re-implement the parser.


More information about the ffmpeg-devel mailing list