VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Jan 2024
    Location
    Sweden
    Search PM
    I'm currently doing an upscale encode using VapourSynth. I had an idea on a possible way to speed the process up, but lack the scripting expertise to make it work.

    Example: I'm encoding animated content, with duplicate identical frames now and then. But it's not in a consistent pattern, so a simple decimate wouldn't work without sacrificing frames.

    The idea is to make a comparison on every new frame to the frame previous. If the differences are above a set threshold, the new frame gets processed as normal. But, if it's below the threshold, the rest of the processing for that frame gets skipped, and instead the processed previous frame gets presented instead. My thought is that this could speed up processing if the script is doing a lot of work, like in my case with AI upscaling.

    Does anyone think this might be feasible?
    Quote Quote  
  2. In theory, the idea should work if the resize method only works on one frame at a time and doesn't take other frames into account.
    You probably would have to write something similar to FillDuplicateFrames.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  3. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    In AviSynth you could write a function to detect the difference betwen 2 frames using RT_FrameDifference (http://avisynth.nl/index.php/RT_Stats), then if the difference is lower than a threshold, you identify the frame that does not need to be processed. You can skip these frames using FrameSel (http://avisynth.nl/index.php/FrameSel) for further processing.

    Here a procedure developed to identify "bad" fields/frames in an analog capture, can be used as an example: https://forum.doom9.org/showthread.php?t=183582

    In VapourSynth it should be similar.
    Quote Quote  
  4. DeDup() is already set up to do that in AviSynth. The problem is the resulting video (or frames if you're saving image sequences) is variable frame rate. So you have to keep track of the timecodes for each frame. DeDup produces a timecode file for you but later processing has to be able to use it.
    Quote Quote  



Similar Threads

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