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
+ Reply to Thread
Results 1 to 7 of 7
-
-
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).
-
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? -
I'm trying to scale to 1440x1080 PAR 4:3 25fps and I don't want to distort the source video.
-
And the source video is what? (dimensions, specs)
Scott -
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. -
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.
Similar Threads
-
16x9 > 4:3. How to calculate new Pixel Aspect Ratio?
By HitTheRoad in forum Video ConversionReplies: 14Last Post: 11th Jun 2014, 16:45 -
Which pixel aspect ratio applies to Huffyuv?
By brassplyer in forum EditingReplies: 38Last Post: 3rd Jul 2013, 19:20 -
Video aspect ratio and Pixel aspect ratio
By LeoKac in forum Newbie / General discussionsReplies: 3Last Post: 1st Sep 2012, 15:15 -
newb - pixel aspect ratio question ?
By Bansaw in forum Newbie / General discussionsReplies: 5Last Post: 27th Jun 2012, 21:01 -
Changing pixel aspect ratio of video clip?
By Real Ramona in forum Newbie / General discussionsReplies: 7Last Post: 23rd Jan 2012, 10:20