VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Hi all, I'm using MeGUI to convert dvd to mp4. The source is 16:9 pal 720x576 anamorphic. When I play back the file created by MeGUI with VLC, by default it displays as 4:3. If I manually change the view setting to 16:9 it looks great. After some searching I found that there is a 'default aspect ratio tag' that can be set in the mp4. I used Yamb to remux the file and in the process applied a 16:9 pixel ratio tag. Now when I open the file in VLC it automatically displays at 16:9. This is great, but I'm hoping there might be a way to skip the extra step in Yamb and just set the tag with MeGUI somehow. From what I've read you set it in the preview window, which I have tried, but it didn't make a difference. Anyone know if it's possible? Thanks
    Quote Quote  
  2. You can encode the SAR value into the bitstream , this way it always stays with the video, even if you swap containers . SAR in AVC terminology is the Sample Aspect Ratio , it's the same thing as the Pixel Aspect Ratio in MPEG2 terminology. Think of it as the width:height of the pixels

    --sar x:y

    For SD PAL 16:9 you would use --sar 16:11 , you can enter that in the command line box when encoding ; If you want it "mathematically correct" you would use --sar 64:45 , because 16/9 = 720/576 x 65/45 , but the former 16:11 is the accepted value for things like SD blu-ray
    Quote Quote  
  3. I think you need to manually add the --sar switch in the Custom Command Line section on the Misc tab in MeGUI.
    Quote Quote  
  4. Yes, thanks for clarifying jagabo, yes the method above is entered in the custom command line

    I think there is another way by using the avisynth script creator tool ; I think if you checkmark "clever anamorphic encoding" it will do this for you as well. I'm not entirely sure, because I don't use this method
    Quote Quote  
  5. Custom command line worked like a charm. Thanks guys
    Quote Quote  
  6. Hi again, sorry to dredge up an old post but I just have 1 more question As stated above --sar 65:45 worked great. My question is how do you calculate the values? I thought it was 720/16:576/9 but that gives 45:64. The reason I ask is because I'm now encoding something from an NTSC source 720x480 4:3 which is coming out too wide, so I want to be able to calculate the sar myself. Thanks!
    Quote Quote  
  7. NTSC 4:3 => sar 10:11 (or 8:9)
    NTSC 16:9 => sar 40:33 (or 32:27)
    PAL 4:3 => sar 12:11 (or 16:15)
    PAL 16:9 => sar 16:11 (or 64:45)

    The values in parenthesis are mathematically correct, but not accepted ITU-R BT.601 or MPEG4 values

    4/3 = 720/480 x 8/9

    So you would use 8:9 for correct math

    But if you were encoding to specification (e.g. for blu-ray) you would use 10:11 (because they are based on 704px width)
    Quote Quote  
  8. DAR = FAR * SAR

    DAR = final display aspect ratio
    FAR = frame aspect ratio (frame size)
    SAR = storage (pixel) aspect ratio

    16:9 in 720x576 frame:
    16:9 = 720:576 * SAR
    16/9 = 720/576 * SAR
    16/9 * 576/720 = SAR
    16/720 * 576/9 = SAR
    1/45 * 64/1 = SAR
    64/45 = SAR
    64:45 = SAR

    4:3 in 720x480 frame:
    4:3 = 720:480 * SAR
    4/3 = 720/480 * SAR
    4/3 * 480/720 = SAR
    4/720 * 480/3 = SAR
    1/180 * 160/1 = SAR
    160/180 = SAR
    8/9 = SAR

    Note that sometimes the 4:3 or 16:9 image is stored in the inner 704 pixels, not the full 720 pixel wide frame. Hence the alternate SAR values.
    Last edited by jagabo; 5th Aug 2010 at 18:20.
    Quote Quote  
  9. Awesome, thanks guys!
    Quote Quote  
  10. Thanks for the update jagabo.

    I'm making a sar calculator so that I can calculate the mathematically correct sar for any far. The following two lines are the basis of the calculation:

    $sarX = $farY / $darY;
    $sarY = $farX / $darX;

    Is that correct? The problem I will have though is when one value doesn't divide evenly into another, such as with NTSC 16:9, e.g. 480/9 = 53.3 recurring. How would I get around this? I've thought of altering farY to the next highest or lowest number divisible by darY, so 480 would become 477 or 486, effectively either cropping or adding black bars to the video and giving a sar of 53:45 or 6:5 respectively. Is that the "right" way to do it? How would I arrive at a sar of 32:27?

    Thanks again
    Quote Quote  
  11. Before you go any farther , you should know that most types of video use blocks of 16 pixels. It's better (more effcient) to encode to numbers evenly divisible by 16. Even if you don't, encoders like x264 will encode to the next nearest mod16 resolution internally anyway (although will only display what you set). Odd numbers don't work well at all (crash players, decoders, filters, and mod8 is next best to mod16)

    If you are using non standard souces, or using crop values, megui can calculate all this for you in it's avs script creator . It has a "clever anamorphic encode" feature , and mod16 checkbox if you want it rounded to mod16 compliance.

    Or another strategy/option is to resize and use square pixels (what most people do)
    Quote Quote  
  12. Been getting good results on cropped source with clever anamorphic encode and mod16 resize enabled. Thanks for the tip poisondeathray, made things a lot easier (and compliant)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!