Log in

View Full Version : Staxrip - How to change display aspect ratio??


YaBoyShredderson
19th February 2021, 22:37
I have a video file that has an incorrect aspect ratio. It is a PAL DVD source with a resolution of 720x576 and is displayed as such. It should be displayed a resolution of 1024x576, for a 16x9 image, using a non square pixel aspect ratio. How do I set this in the encoder??

NanoBot
19th February 2021, 23:58
I suspect that your stream does have an incorrect AR flag in the mpg2 elementary stream. If that is true, you might give this program a try:

https://www.videohelp.com/software/Restream

This program is able to correct the AR information in a mpg2 elementary stream without reenconding.

Mister XY
20th February 2021, 06:59
I can confirm, that every DVD has a wrong PAR/DAR. Before i encode a DVD i use Handbrake to see the correct PAR.

stax76
20th February 2021, 08:38
I have a video file that has an incorrect aspect ratio. It is a PAL DVD source with a resolution of 720x576 and is displayed as such. It should be displayed a resolution of 1024x576, for a 16x9 image, using a non square pixel aspect ratio. How do I set this in the encoder??

StaxRip detects the aspect ratio automatically, if it cannot be detected there is probably something wrong with the file and mpv shows a wrong aspect ratio too.

There are 4 aspect ratio dropdown buttons in the main dialog, these buttons show tooltips if you hover the mouse over them or right-click.

The encoder will use the aspect ratio that was detected or changed in the menu, this can be seen in the command line preview of the encoder.

Mister XY
20th February 2021, 09:15
Oh, with ripped DVD's is did not show the correct DAR.
And in second picture you see with manualy set the DAR.

YaBoyShredderson
20th February 2021, 11:03
I can confirm, that every DVD has a wrong PAR/DAR. Before i encode a DVD i use Handbrake to see the correct PAR.

you mean encode lossless and then use staxrip? can I use my my custom x264 preset i already have in handbrake and just slide the crf to 0? or do I have to use different settings?

Mister XY
20th February 2021, 12:00
I load only the file in handbrake to see the DAR. I don't encode with Handbrake.

YaBoyShredderson
20th February 2021, 16:46
I load only the file in handbrake to see the DAR. I don't encode with Handbrake.
Ah, and then set the correct DAR in staxrip. I tried that but it didn't work for some reason, I set it to 1.777777, PAR was 64:45, still came out wrong.

NanoBot
20th February 2021, 18:14
The problem with ripped DVDs is that in many / most cases the correct AR is stored only at container level. When demuxxing the video to a mpg2 elementary stream, this information is lost. Within the mpg2 elementary stream, each sequence header contains an AR flag, which allows four differerent aspect ratios:

1 = 1:1 (square pixel)
2 = 4:3
3 = 16:9
4 = 2.211 (not used in dvd)

And this flag is very often not set to the correct value by the company which authored the DVD, with the result that a 16:9 stream is falsely detected as 4:3 after demuxxing. If you are interested in the details you may have a look here: https://forum.videohelp.com/threads/123131-MPEG2-4-3-16-9-flag

I am not working with ripped DVDs as source for a long time, but when ever it was needed, I used the mentioned program "restream" to set the AR flag to 16:9 if neccessary.

stax76
20th February 2021, 20:50
So there is a Use ITU-R BT.601 compliant aspect ratio setting, and it's enabled by default.

Would be interesting to know what hello_hello and other members who discuss this topic since years are thinking if this should still be enabled by default.

https://github.com/staxrip/staxrip/issues/527

hello_hello
22nd February 2021, 03:24
I don't think I've met a 4:3 DVD that wasn't ITU/mpeg4, so definitely for 4:3 DVDs.

I'd probably disable it for 16:9, if it's possible for 16:9 DVDs to have a different default.

stax76
22nd February 2021, 12:12
OK, I was hoping to read your opinion about it, thanks.

2 staxrip contributors want to disable it, I've not really a strong opinion about it, so we disable it.

It would be possible to have a different default but would mean investing some time.

hello_hello
22nd February 2021, 16:12
I have a memory... from a long time ago.... of Handbrake switching between a generic and ITU aspect ratio based on cropping. No cropping and it used generic, but once you cropped from the sides (somewhere around 12 pixels total) it switched to ITU. I don't think my brain invented that memory, but I don't think it works that way these days. Maybe there's a reason.....

I thought MeGUI was the only "active" program using the old "almost correct" ITU PARs, but the DAR in one of the screenshots (1.82361) seems to indicate StaxRip uses them too. Maybe this would be an opportunity to switch to the mpeg4 PARs instead. :)
https://forum.doom9.org/showthread.php?p=1058927#post1058927
The main reason is the mpeg4 PARs are Bluray compliant and almost identical to the ITU PARs. How does StaxRip handle a situation where you're encoding a DVD based on an ITU PAR and want the output to be Bluray compliant?

The other thing that's nice about the mpeg4 PARs instead of ITU, is they result in the same DARs for both NTSC and PAL. Just as the generic PARs give you exactly 16:9 and 4:3, the mpeg4 PARs give you DARs of 20:11 and 15:11 for both NTSC and PAL.

I don't know if 44vince44 is reading this thread, but....
https://github.com/staxrip/staxrip/issues/527#issuecomment-782734036
I don't think there ever was a bt601 colormatrix option for x264/x265, but there's bt470bg and smpte170m which are functionally equivalent to bt601 for colormatrix. There's info in this post if you're interested.
https://forum.doom9.org/showthread.php?p=1897824#post1897824

stax76
22nd February 2021, 17:14
Brother John helped to implement AR support around 15 years ago, I don't have good memory, and it was never a special interest of mine, that's why I had asked. But as far as I know there were never issues found, implementation is known to be solid.

Probably not all contributors read here, we use mostly GitHub issues and discussions. Feel free to post there, maybe somebody still has interest in the topic.