Vapoursynth Auto Detect Width based on Input - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html) +--- Forum: A/V Talk (https://forum.selur.net/forum-6.html) +--- Thread: Vapoursynth Auto Detect Width based on Input (/thread-3025.html) |
Vapoursynth Auto Detect Width based on Input - TheLastApostle - 08.01.2023 Hi, I have a library with hundreds of clips each with different aspect ratios ( 16:9 and 21:9 ) How could I in the param underneath tell VS to auto add/decide the height based on the inputs aspect ratio? clip = vs.core.resize.Bicubic(clip, width = 1280, height = 720, format=vs.RGBS, matrix_in_s="709") Thank you! RE: Vapoursynth Auto Detect Width based on Input - Selur - 08.01.2023 In Hybrid, you could simply tell Hybrid to:
Assuming you are using lsmas.LibavSMASHSource or lsmas.LWLibavSource you are in luck. lsmas it sets "_SARNum" and "_SARDen" as frame properties. So you could write some python code to calculate the new height value. Untested, but I think it should work targetWidth = 1280 Cu Selur Ps.: this will only work if your source is properly signaling the PAR (16:9 and 21:9 are DARs) |