Trying to use an upscaling script on some video, and I am getting this error. "for yv12, yv411, yuy2 and yv16 input width must be mod 4". I understand this is because the width isn't divisible by 4?
This is the script:
Is there some way to get around this? I don't really want to re-encode all the file first as that will lose quality.Code:LWLibavVideoSource(SOURCE) nnedi3_rpow2(2, cshift="LanczosResize", fwidth=854, fheight=480) aWarpSharp2(depth=3) Sharpen(0.3) nnedi3_rpow2(2, cshift="LanczosResize", fwidth=1280, fheight=720) aWarpSharp2(depth=5) Sharpen(0.5)
+ Reply to Thread
Results 1 to 9 of 9
-
-
first things that come to mind,...
your could:
a. pad the with to mod4 and later remove the padding
or
b. convert to RGB24 before the resizing, convert to YV24 before aWarpsharp2 (since it doesn't support YV24) and at the end convert to the color space and sampling you need for your output.
or
c. convert to YV24 after loading the source and at the end convert to the color space and sampling you need for your output.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
-
What's the error message? And what's the source file resolution? If it's non-mod4, you can take one of Selur's suggestions.
-
That's because you have to change its size to a multiple of 4 BEFORE calling the nnedi3_rpow2() function. fwidth/fheight are only the desired output resolution, they're not related to the input source.
nnedi3_rpow2() scales your source to exactly the double (with 2 as parameter, like in your case) of its size FIRST (if it's mod4) , THEN it rescale it to fwidth/fheight.. -
Easiest way is simply use 'c.' and add 'ConvertToYV24()' after the 'LWLibavVideoSource'-line and add for example 'ConvertToYV12()', assuming the source files are not interlaced and YV12.
--
when sticking with the input color space even if one changes the input resolution to mod4, 854 still needs to be changed to 852.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
-
If you don't want to switch between color modes.. then this:
Code:#xRes and yRes must be nearest mod 4 to your source resolution xRes = 852 yRes = 480 #I used spline36 as an example, but you can use any avisynth resizer you want, simply change the function. LWLibavVideoSource(SOURCE).Spline36Resize(xRes,yRes) nnedi3_rpow2(2, cshift="LanczosResize", fwidth=xRes, fheight=yRes) aWarpSharp2(depth=3) Sharpen(0.3) nnedi3_rpow2(2, cshift="LanczosResize", fwidth=1280, fheight=720) aWarpSharp2(depth=5) Sharpen(0.5)
Similar Threads
-
Colorspace Conversions - YUY2 and YV12
By Christina in forum RestorationReplies: 4Last Post: 5th Oct 2020, 18:46 -
Bush dvhrs02 vhs - dvd player. "There is no live picture at input"
By andrew Griffith in forum Newbie / General discussionsReplies: 6Last Post: 28th Jul 2020, 06:22 -
Will a JVC VCR "Stop" Playback if the video is "too grainy" or degraded?
By timepassenger in forum Capturing and VCRReplies: 8Last Post: 2nd May 2020, 07:17 -
AviSynth YV12<->YUY2 Issue
By koberulz in forum Newbie / General discussionsReplies: 1Last Post: 5th Jun 2019, 15:09 -
Sudden onset of "Your input can't be opened:"
By stonecherub in forum Newbie / General discussionsReplies: 0Last Post: 17th Apr 2018, 14:01