VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. I have a bunch of videos where every 6th frame is duplicated. The footage is 24p but was exported at 30p. I googled this before and found a way to solve it with Avidemux but it reencodes and loses some quality.

    It seems simple enough. Remove every 6th frame, adjust the timeframe to 41.708ms and put the audio back. Is there a way to solve this with mkvtoolnix without reencoding? I could probably do it manually but it would take forever.

    I DO NOT WANT to create interpolated frames.

    I already tried setting it to 24p in mkvtoolnix BUT the program keeps the duplicated frames in, which means the length of the video is increased.
    Quote Quote  
  2. No. You must decimate and reencode. Use sufficient bitrate and you won't notice the quality loss.
    Quote Quote  
  3. Originally Posted by jagabo View Post
    No. You must decimate and reencode. Use sufficient bitrate and you won't notice the quality loss.
    Oh well. Any idea why it can't be done without reencoding though? It seems to me like it should be possible but I don't know much about videos.
    Quote Quote  
  4. Originally Posted by jorge69696 View Post
    I have a bunch of videos where every 6th frame is duplicated. The footage is 24p but was exported at 30p.
    It was 25p. Removing every sixth frame from a 30fps source leaves you with 25fps. The source was from PAL land.

    I could probably do it manually but it would take forever.
    No, it can't be done manually without reencoding. But it can easily be done with a simple AviSynth decimation filter, something like TDecimate(Cycle=6,CycleR=1). But, as jagabo mentioned it has to be reencoded.
    ...but I don't know much about videos
    Then you should listen to jagabo.
    Any idea why it can't be done without reencoding though? It seems to me like it should be possible...
    With modern codecs, the frames rely on the frames on either side to be displayed properly. Modern codecs only save the information different from the previous frame and use that previous frame to fill in the unchanged parts. Read this:

    https://en.wikipedia.org/wiki/Data_compression#Video

    Most video compression formats and codecs exploit both spatial and temporal redundancy (e.g. through difference coding with motion compensation). Similarities can be encoded by only storing differences between e.g. temporally adjacent frames (inter-frame coding) or spatially adjacent pixels (intra-frame coding). Inter-frame compression (a temporal delta encoding) is one of the most powerful compression techniques. It (re)uses data from one or more earlier or later frames in a sequence to describe the current frame.

    You can't just cut out frames without leaving a mess behind.
    Quote Quote  
  5. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    not sure probably you can run video with some avisynth or vapoursynth in potplayer or MPC-BE or MPC-HC. Did one script in avisynth in whole life... But it means the file itself is screwed still.
    Manono and Jagabo are right



    Bernix
    Quote Quote  
  6. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Seems everyone has decided you must reencode without asking you about the source codec. If it's uncompressed, losslessly compressed, or uses intraframe-only compression, then you can decimate it without reencoding.
    Quote Quote  
  7. Originally Posted by JVRaines View Post
    Seems everyone has decided you must reencode without asking you about the source codec. If it's uncompressed, losslessly compressed, or uses intraframe-only compression, then you can decimate it without reencoding.
    It varies. It's a collection of videos I have saved through the years but I separated those that had problems with the intention of fixing them in the future.

    I tried the avidemux method I found online with Remove IVTC Dupe and while it did remove many duplicates, some remained for some reason. Strangely enough, the duplicates that stayed were properly tagged by the software but still weren't removed.

    I googled and found a handful of decimation avisynth filters that I guess I could use while reencoding but I don't know how to use avisynth nor ffmpeg. Only mkvtoolnix, handbrake and avidemux since they are easy and simple.

    Avisynth is really not friendly to beginners. Gotta read 2 dozen threads and a documentation manual before I even can get the thing working lol.
    Quote Quote  
  8. I think there is a decimate filter for vdub , it should work ok

    http://rationalqm.us/decimate.html

    It supports 1 in N decimation, where N can be up to 50
    Quote Quote  
  9. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Originally Posted by jorge69696 View Post
    Avisynth is really not friendly to beginners. Gotta read 2 dozen threads and a documentation manual before I even can get the thing working lol.
    Nope, it is definitely more on the wizardly side. But it gets easier if you keep a few key concepts in mind.
    • AviSynth is a processing engine that lurks until some application calls it.
    • Compatible apps can open scripts (text files with the extension AVS) and pass them to AviSynth.
    • VirtualDub is the canonical example of an application that works with AviSynth.
    • AviSynth returns video and audio that looks just like a media file in the calling app.
    Power comes with knowledge, as they say.
    Quote Quote  
  10. Originally Posted by jorge69696 View Post
    It varies. It's a collection of videos I have saved through the years but I separated those that had problems with the intention of fixing them in the future.
    If this is more than a one-off, it's in your best interests to learn at least the rudiments. With AviSynth it's a simple matter to remove every sixth frame, even when it varies sometimes to the 7th, or 5th frames, and only averages dupes every six frames (it happens). If you plan on working on your videos in other ways and do more than just remove dupe frames, it's almost a necessity.

    If you were to post a short 10-second sample, we could provide scripts for you. In the mean time, go to the site, download and install it and start reading the beginners pages.
    Quote Quote  
  11. Doesn't megui automatically create an AviSynth script and let you add to it?
    Quote Quote  
  12. I don't use it, but I believe you're right. So jorge69696 could install MeGUI and open his video. Then he could show us the script it makes (perhaps after running the analysis pass) and we can modify it for him. A sample will still prove useful.
    Quote Quote  
  13. With AviSynth it's a simple matter to remove every sixth frame, even when it varies sometimes to the 7th, or 5th frames, and only averages dupes every six frames (it happens).
    What would be the best suited function in a case like this ? I requested some help to fix a similar issue a (big) while back, but the feedback I got then was quite frustrating...
    Quote Quote  
  14. Originally Posted by abolibibelot View Post
    With AviSynth it's a simple matter to remove every sixth frame, even when it varies sometimes to the 7th, or 5th frames, and only averages dupes every six frames (it happens).
    What would be the best suited function in a case like this ?
    For simple 1 in 6:

    Code:
    TDecimate(Cycle=6, CycleR=1) # remove 1 of every 6
    or for more irregular patterns:

    Code:
    TDecimate(Cycle=12, CycleR=2) # remove 2 of every 12
    Quote Quote  



Similar Threads

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