I am trying to crop and resize different frames as needed. For some reason though, this is not working. It's giving me video, but it's not the resolution I chose, and its all cut up looking.
Code:filtered2 = last.crop(4,0,-2,0).nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4) filtered3 = last.crop(4,0,-4,0).nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4) filtered4 = last.crop(4,0,-2,-2).nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4) filtered5 = last.crop(4,0,-4,-2).nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4) ReplaceFramesSimple(last, filtered2, mappings="[0 8951] [9034 28355] [28446 29725] [29756 31089] [31187 32611] [32617 36043] [36229 37611] [37754 48452] [48467 51183] [51261 56881] [56957 59839] [59908 65457] [65500 72350] [72596 79306] [79408 86533] [86671 87461] [87533 90420] [90534 101273]") # Done ReplaceFramesSimple(last, filtered3, mappings="[8952 9033] [28356 28445] [29726 29755] [31090 31186] [36044 36228] [37612 37753] [48453 48466] [51184 51260] [59840 59907] [65458 65499] [72351 72595] [79307 79407] [86534 86670] [87462 87532] [90421 90533]") # Done ReplaceFramesSimple(last, filtered4, mappings="[32612 32616]") # Done ReplaceFramesSimple(last, filtered5, mappings="[56882 56956]") # Done
Is this not how you use it? I haven't had any troubles using it like this for filtering different frames with different filters. This crop/resize however is not working right.
I have tried it like this as well. It works, but I get about a 10 pixel wide green bar along the right side of the video.
Code:filtered2 = last.crop(4,0,-2,0) filtered3 = last.crop(4,0,-4,0) filtered4 = last.crop(4,0,-2,-2) filtered5 = last.crop(4,0,-4,-2) ReplaceFramesSimple(last, filtered2, mappings="[0 8951] [9034 28355] [28446 29725] [29756 31089] [31187 32611] [32617 36043] [36229 37611] [37754 48452] [48467 51183] [51261 56881] [56957 59839] [59908 65457] [65500 72350] [72596 79306] [79408 86533] [86671 87461] [87533 90420] [90534 101273]") # Done ReplaceFramesSimple(last, filtered3, mappings="[8952 9033] [28356 28445] [29726 29755] [31090 31186] [36044 36228] [37612 37753] [48453 48466] [51184 51260] [59840 59907] [65458 65499] [72351 72595] [79307 79407] [86534 86670] [87462 87532] [90421 90533]") # Done ReplaceFramesSimple(last, filtered4, mappings="[32612 32616]") # Done ReplaceFramesSimple(last, filtered5, mappings="[56882 56956]") # Done nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4)
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
Last edited by killerteengohan; 20th Aug 2022 at 09:29.
-
Then that's your problem. Your replacing 720x480 frames with 768x576 frames.
Code:# last is 720x480 filtered2 = last.crop(4,0,-2,0).nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4) filtered3 = last.crop(4,0,-4,0).nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4) filtered4 = last.crop(4,0,-2,-2).nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4) filtered5 = last.crop(4,0,-4,-2).nnedi3_rpow2(2, cshift="LanczosResize", fwidth=768, fheight=576, nns=4) # last is still 720x480 # filteredN are all 768x576 # all the following will not work correctly ReplaceFramesSimple(last, filtered2, mappings="[0 8951] [9034 28355] [28446 29725] [29756 31089] [31187 32611] [32617 36043] [36229 37611] [37754 48452] [48467 51183] [51261 56881] [56957 59839] [59908 65457] [65500 72350] [72596 79306] [79408 86533] [86671 87461] [87533 90420] [90534 101273]") # Done ReplaceFramesSimple(last, filtered3, mappings="[8952 9033] [28356 28445] [29726 29755] [31090 31186] [36044 36228] [37612 37753] [48453 48466] [51184 51260] [59840 59907] [65458 65499] [72351 72595] [79307 79407] [86534 86670] [87462 87532] [90421 90533]") # Done ReplaceFramesSimple(last, filtered4, mappings="[32612 32616]") # Done ReplaceFramesSimple(last, filtered5, mappings="[56882 56956]") # Done
-
That's what I figured, but I wasn't 100% sure. I was replacing all 720x480 with 768x576. I thought it would work. I didn't want to resize it to 768x576 first, then do all that and resize a second time.
It's okay, I got it working with trim instead. That had no troubles with doing what I wanted.
Thanks! -
You can resize last to768x576 just before calling all the ReplaceFramesSimple (where my three lines of comments are).
Similar Threads
-
unaligned crop?
By killerteengohan in forum RestorationReplies: 3Last Post: 22nd Aug 2020, 08:12 -
ReplaceFramesSimple
By max_cady in forum EditingReplies: 6Last Post: 26th Apr 2020, 10:22 -
Building pc to capture multiple analog camera, running multiple virtualdub
By workshow in forum Newbie / General discussionsReplies: 3Last Post: 29th Dec 2019, 10:38 -
To crop or not to crop
By ZetaStax in forum Newbie / General discussionsReplies: 8Last Post: 2nd Oct 2019, 16:20 -
Unwanted crop and rotate
By untymage in forum Video ConversionReplies: 3Last Post: 9th Nov 2018, 11:40