VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Sep 2016
    Location
    Melbourne
    Search PM
    Since avisynth discards the pixel aspect ratio information and assumes square pixels how do you properly scale a video?

    I'm trying to standards convert random source videos to a single constrained format. The source videos may have square pixels, or may come from mpeg and dv sources with defined aspect ratios or might come from mp4 or mkv files which have their pixel aspect ratio defined in the file.

    The source pixel aspect ratio is important if I'm trying to convert to a known output aspect ratio. How does avisynth handle this?

    Thanks
    Mark
    Quote Quote  
  2. Member
    Join Date
    Dec 2005
    Location
    Finland
    Search Comp PM
    Avisynth works on uncompressed video, so any non-video (or audio) information in the original file is not available. You need to determine the required output resolution outside of Avisynth, and feed it to the script. If the output needs to have a non-square aspect ratio, that will need to be set in the encoding process (again, outside of Avisynth).
    Quote Quote  
  3. Most encoder GUI's have some sort of anamorphic encoding method, which basically means they set the appropriate pixel aspect ratio for you by checking the source display aspect ratio or pixel aspect ratio and passing it onto the encoder, usually via the command line. If you're not using a GUI, you have to do it yourself. As well as anamorphic encoding, most GUIs will also resize the video to square pixels if you prefer. Which method you use might be determined by your playback device, as not all support anamorphic video in MP4 or MKV files, in which case resizing to square pixels might be a better idea.

    As ajk said, Avisynth itself is oblivious to pixel aspect ratios.

    What's your desired output format? By "constrained format" are you referring to a h264 profile?
    Quote Quote  
  4. Member
    Join Date
    Sep 2016
    Location
    Melbourne
    Search PM
    I'm trying to scale to 1440x1080 PAR 4:3 25fps and I don't want to distort the source video.
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    And the source video is what? (dimensions, specs)

    Scott
    Quote Quote  
  6. Member
    Join Date
    Sep 2016
    Location
    Melbourne
    Search PM
    I do not know what the source will be.
    I don't have control over what videos get submitted. I have to read what is supplied in the video file.

    To me throwing away pixel aspect is like throwing away frame rate.
    Quote Quote  
  7. Originally Posted by silicontrip View Post
    I'm trying to scale to 1440x1080 PAR 4:3 25fps and I don't want to distort the source video.
    How you'd scale your source video to get there depends entirely on the aspect ratio of your source video. If it's 1920x1080 and 16:9 you'd resize to 1440x1080 and set a PAR of 4:3. Other than that, I'm not entirely sure what you're asking. The source has to be 16:9 to begin with otherwise you can't scale it to 1440x1080 with a PAR of 4:3 without distorting it, as 1440x1080 with a PAR of 4:3 has a display aspect ratio of 16:9.
    Last edited by hello_hello; 29th Sep 2016 at 02:21.
    Quote Quote  



Similar Threads

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