VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. 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)
    Last edited by killerteengohan; 20th Aug 2022 at 09:29.
    Quote Quote  
  2. What's the frame size of "last" before starting this sequence?
    Quote Quote  
  3. Originally Posted by jagabo View Post
    What's the frame size of "last" before starting this sequence?
    720,480
    Quote Quote  
  4. 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
    Quote Quote  
  5. 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!
    Quote Quote  
  6. You can resize last to768x576 just before calling all the ReplaceFramesSimple (where my three lines of comments are).
    Quote Quote  



Similar Threads

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