Log in

View Full Version : Strip Display Aspect Ratio from video stream


MasamuneXGP
3rd February 2013, 17:55
Hello all,

I'm having an extremely frustrating problem. I have some DVD sourced material that I'm encoding with MeGUI. I would like it encode it in its native 3:2 aspect ratio and have it display as 16:9. For as long as I can remember, I have always accomplished this by setting the "Display width/height" in mmg.

However, this time, after I encoded with MeGUI and tried to remux with mmg, the resulting mkv file still played at 3:2. In fact, my media player would open the file at 16:9 and then quickly snap back to 3:2.

Upon further investigation/googling, I found out that the display aspect ratio of 3:2 is actually embedded in the video stream. I do not want this. I want the *container* to decide what aspect ratio to display. How can I strip the display aspect ratio information from the video stream so that it does not conflict with what the container says?

sneaker_ger
3rd February 2013, 18:17
Add "--engage remove_bitstream_ar_info" to the mkvmerge command line (Don't know from the top of my head if it works with mkv input or only raw h.264).

Anyways, you should already set the correct aspect ratio (--sar) when encoding so that both bitstream and container info match and you do not run into problems like this. Doesn't MeGUI offer options for that?

poisondeathray
3rd February 2013, 18:30
sneaker is right, it's better to use --sar x:y while encoding

If you're doing it after the fact, another option is to use this modified ffmpeg build to modify --sar values in the bitstream
http://forum.doom9.org/showthread.php?t=152419

MasamuneXGP
3rd February 2013, 18:53
Using remove_bitstream_ar_info on the raw .h264 file did the trick. Many thanks!

By the way, I also tried the modified ffmpeg, and while I did correct the aspect ratio, it also made the video extremely jerky. Perhaps it needs to be updated.

After googling, it appears the way to set the SAR in MeGUI is on the video preview screen, which I disabled. That seems quite silly.