VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. how can I calculate the number of pixels for the height of the encoded video, so that:

    - the aspect ratio will be as close as possible to the AR of the source video;
    - and the vertical resolution to be mod2 for x264
    Quote Quote  
  2. Well what is the source? Post some more information

    Do you want "square pixels" or anamorphic ?

    What is the output goal ? e.g. If you aren't resizing just use the same dimensions

    DAR = FAR x SAR

    Display Aspect Ratio = Frame Aspect Ratio x Sample Aspect Ratio
    Quote Quote  
  3. Unless you're encoding for a device with some specific resolution, you could just leave X and Y alone.
    And yes, you probably want to tell us what are you trying to accomplish.
    Quote Quote  
  4. Sources could be 720x576@25fps or 720x480@30fps.

    I want to encode with x264 using MeGUI, square pixels, 720px width (if no cropping is needed), but I want to resize height so that the AR can be as close as possible to source AR, while keeping this height at mod2
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    That's kind of going about it ass-backwards.

    Your source files are standard SD format. Either 4:3 or 16:9 DAR.

    The problem is your insistance on: resizing, square pixel PARs, and prioritizing the horizontal when resizing.

    All the MPEG formats support non-square PARs (mpeg1, mpeg2, mpeg4part2/divx/xvid and h.264), so why not leave the whole thing as-is? Yes, reencoding does incur losses, but modifying the source often incurs FURTHER losses.

    Also, because of its analog origins, video places greater emphasis on the inviolability of the vertical dimension with its # of lines vs. the # of pixels in the horizontal dimension. So if you HAVE to resize, you should be resizing the horizontal, not the vertical.

    For example, 720x480 with a DAR of 16:9 would be the equivalent of 853x480 (852 if mod2 is expected).

    Scott
    Quote Quote  
  6. Pick whatever width you want then, HEIGHT = WIDTH * 3 / 4, or HEIGHT = WIDTH * 9 / 16, then round to the nearest even number. Or pick whatever height you want then WIDTH = HEIGHT * 4 /3 , or WIDTH = HEIGHT * 16 / 9, and round to the nearest even number.
    Quote Quote  



Similar Threads

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