Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th February 2021, 22:37   #1  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 71
Staxrip - How to change display aspect ratio??

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??
YaBoyShredderson is offline   Reply With Quote
Old 19th February 2021, 23:58   #2  |  Link
NanoBot
Registered User
 
Join Date: Sep 2003
Posts: 195
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.
NanoBot is offline   Reply With Quote
Old 20th February 2021, 06:59   #3  |  Link
Mister XY
Registered User
 
Join Date: Jun 2014
Posts: 78
I can confirm, that every DVD has a wrong PAR/DAR. Before i encode a DVD i use Handbrake to see the correct PAR.
Mister XY is offline   Reply With Quote
Old 20th February 2021, 08:38   #4  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,736
Quote:
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.
__________________
mpv.net - StaxRip - MediaInfo.NET - Get-MediaInfo - More
stax76 is offline   Reply With Quote
Old 20th February 2021, 09:15   #5  |  Link
Mister XY
Registered User
 
Join Date: Jun 2014
Posts: 78
Oh, with ripped DVD's is did not show the correct DAR.
And in second picture you see with manualy set the DAR.
Attached Images
  

Last edited by Mister XY; 20th February 2021 at 09:19.
Mister XY is offline   Reply With Quote
Old 20th February 2021, 11:03   #6  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 71
Quote:
Originally Posted by Mister XY View Post
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?
YaBoyShredderson is offline   Reply With Quote
Old 20th February 2021, 12:00   #7  |  Link
Mister XY
Registered User
 
Join Date: Jun 2014
Posts: 78
I load only the file in handbrake to see the DAR. I don't encode with Handbrake.
Mister XY is offline   Reply With Quote
Old 20th February 2021, 16:46   #8  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 71
Quote:
Originally Posted by Mister XY View Post
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.
YaBoyShredderson is offline   Reply With Quote
Old 20th February 2021, 18:14   #9  |  Link
NanoBot
Registered User
 
Join Date: Sep 2003
Posts: 195
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/...-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.
NanoBot is offline   Reply With Quote
Old 20th February 2021, 20:50   #10  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,736
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
__________________
mpv.net - StaxRip - MediaInfo.NET - Get-MediaInfo - More
stax76 is offline   Reply With Quote
Old 22nd February 2021, 03:24   #11  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,547
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.
hello_hello is offline   Reply With Quote
Old 22nd February 2021, 12:12   #12  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,736
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.
__________________
mpv.net - StaxRip - MediaInfo.NET - Get-MediaInfo - More
stax76 is offline   Reply With Quote
Old 22nd February 2021, 16:12   #13  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,547
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.p...27#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/i...ment-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.p...24#post1897824
hello_hello is offline   Reply With Quote
Old 22nd February 2021, 17:14   #14  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,736
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.
__________________
mpv.net - StaxRip - MediaInfo.NET - Get-MediaInfo - More
stax76 is offline   Reply With Quote
Reply

Tags
aspect ratio, display aspect ratio, dvd, pal/ntsc, pixel aspect ratio

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.