VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date
    Sep 2016
    Location
    Brazil
    Search PM
    Hey that's me again. I have an gameplay footage, which has too many duplicates which i want to remove. The point is than at beginning and end there is menu screens which are ful l of duplicates i dont want to remove, only the ones in middle during real gameplay motion.

    Example the full footage lenght has 14200 frames. There 2000 frames at beginning which is 99% of duplicates because it's menu screen which i want to preserve, then from 2001 to 14000 is the gameplay with less duplicates which i want to remove. In the end from 14001 to 14200 is lots of duplicates again which i want to preserve too.

    The problem i dont know if there is a shortcut way to do that with multidecimate which is the tool i trying to do it right now.
    Quote Quote  
  2. I can think of a several ways to accomplish what you want, but not directly through MultiDecimate.

    Perhaps the easiest is to add back the removed frames afterwards using AviSynth's Loop command.

    For example, to add back 99 copies of frame number 10:

    Loop(100,10,10)

    Make sure to update the script after each use of Loop or you run the risk of losing track of the frame numbers you want to loop.

    Another would be to Trim off the video into 3 parts, the beginning with no Multidecimate, the middle from which the dupe frames are to be removed, and the end with no use of Multidecimate. Then put the pieces back together again when all done. Another would be to have Multidecimate work only on the frames you want using ReplaceFramesSimple, part of RemapFrames.
    Quote Quote  
  3. I don't know much about gameplay video, but for regular video containing duplicates, I routinely use a function I created that is based on some old code supplied by "MugFunky:"
    Code:
    function filldrops (clip c)
    {
      super=MSuper(c,pel=2)
      vfe=manalyse(super,truemotion=true,isb=false,delta=1)
      vbe=manalyse(super,truemotion=true,isb=true,delta=1)
      filldrops = mflowinter(c,super,vbe,vfe,time=50)
      fixed = ConditionalFilter(c, filldrops, c, "YDifferenceFromPrevious()", "lessthan", "0.1")
      return fixed
    }
    If you simply delete the duplicate frames rather than interpolate new ones, your audio will be out of sync.

    This function detects near-duplicates (or perfect duplicates if you change the conditional test from 0.1 to 0.0) and inserts an interpolated frame for one of the duplicates.

    I should also mention that with most video (i.e., something real, not computer-generated), if there is a duplicate, it is often created in order to re-sync the video after a frame is dropped. This is what happens with both streaming video and with capture cards that can't keep up with the incoming stream. If this is the case, deleting the duplicates, or even interpolating new intermediate frames for one of the dups (which is what the above AVISynth script does) will only fix half the problem. The other half of the issue is finding the gap created by each dropped frame and also doing something there. In fact, if that is what is going on, then the proper thing to do is to delete the dup, but then insert the interpolated frame where the gap is located, rather than where the deleted dup existed. The dup sometimes doesn't happen for several frames after the gap, and the number of frames between the gap and the dup is often not consistent. This operation is really, really tricky to do, but with the help with the now-retired doom9.org guru, Didée, I was able to create a script that does just that. It isn't perfect, but even when it fails to insert the synthesized frame at the correct spot, the error is hardly noticeable, and it gets it right most of the time.

    I'd be happy to post that script, if it is of any use for the present problem.

    Oh yes, one other thing. I use Multidecimate extensively for converting film captures from a shutterless projector into a true "frame accurate" capture. It is extremely difficult and challenging, but I have a method that works perfectly. What I do is export all the TFM parameters into an Excel spreadsheet where I use dozens of formulas to figure out exactly where there are duplicates that should be removed. I then create a text file of frame numbers and deletion flags which Multidecimate processes. It is very complicated, but it works like a charm.

    So, you might consider that approach because it is a lot easier to create complicated decimation logic in Excel than in AVISynth, especially when you have to use multiple frames and conditional logic to determine which frames require decimating or interpolation.
    Quote Quote  
  4. And if you want to remove duplicates and keep in sync, it needs to be VFR. Dedup will decimate and generate the timecodes
    Quote Quote  
  5. Member
    Join Date
    Sep 2016
    Location
    Brazil
    Search PM
    Thanks for all answers, i really appreciate it and gonna try out to find what i get.

    Just to share some personal experience with "game/screen" recorder softwares, the main problem than some recording applications has worse performance than others in capturing the frames. For example comparing OBS to Shadowplay, both with NVENC at 60fps, OBS always produce higher duplications than Shadowplay. Shadowplay and Windows 10 DVR for example has the best frame capture which duplicate few frames in general.

    Recently when i tested recording same footage, OBS in average duplicated 12 of each 60 frames in a gameplay scene, while Shadowplay and Win10DVR duplicated "only" 6 from 60.

    When i used AMD VCE last year there was same problem, Win10 DVR had low duplication frames while OBS has higher duplication values.

    Besides OBS worse performance, it has more features, like choosing colormatrix BT.709 for HD while Shadowplay uses Bt.601 for any resolution.
    Quote Quote  
  6. Member
    Join Date
    Sep 2016
    Location
    Brazil
    Search PM
    So what i find more appropriate is replace duplicates by interpolated frames sugested by johnmeyer, since this specific video has too many duplicated frames.

    There sometimes 2-3 sequence frames are duplicated and filldrops cant get rid of all of them. Most of duplications in my footage start below 0.4 which is already value i'm using.

    Apparently Multithreading is not supported by Filldrops? It create a message inside output footage about run-time filters. Without Mt it works fine.
    Quote Quote  
  7. I use MT with Filldrops all the time, although as with everything in AVISynth, the versions you use make a huge differentce.

    Multiple duplicates in a row are a definite problem, and if you think about it, there is not going to be a good solution.

    Also, I strongly suggest that you go frame-by-frame, manually, through a sample of your video and look to see it you have missing frames as well as duplicates. The two problems usually go together. As I posted above, fixing the dups without fixing the drops will lead to a very jerky video.

    Here is a link to a thread in doom9.org that I started several years ago. The script that I developed, shown in post #6, works pretty well.

    Automatically fix dups followed (eventually) by drops
    Quote Quote  
  8. Member
    Join Date
    Sep 2016
    Location
    Brazil
    Search PM
    Hey john, i liked this second script, but i see a bit strange results. Some of my sources with duplicates dont have all dups with gaps to next frame, the gaps stay sometimes afterwards in parts where has no dups together. Like that frames 1,dup,2,dup,3,dup,4,5,6,7,gap,8,9,10.

    Sometimes i notice than your second script fill interpolated frames in places where has no gaps and leave gaps spots untouched.


    Edited to reconsider thought.
    Last edited by chummy02; 10th Jul 2017 at 17:16.
    Quote Quote  
  9. If you are talking about the script I linked to over in doom9.org, that script will require tuning to match your source. If you read my responses at the end of that thread, I provide some answers about how to do that tuning.
    Quote Quote  



Similar Threads