VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Member
    Join Date
    Jul 2015
    Location
    Polska
    Search PM
    Hello,

    I have a video, which has randomly put in place duplicate frames which make video go out of sync to the audio (it is also variable framerate). I would want to drop these frames (doing this manually works, but its 2 hours long). Would you suggest any AviSynth scripts for this?
    Quote Quote  
  2. Are you sure? Usually duplicates are there to keep everything in sync, not the reverse . Removing duplicates without adjusting timecodes will usually cause it to go out of sync . How are you determining the sync issue? Did you try another player or method to verify ?


    You can use duplicate frame removers like multidecimate, fdecimate, dedup.

    If it was in sync, dedup would generate timecodes for you to keep it in sync. Multidecimate just deletes duplicates , so it will normally cause video to go out of sync
    Quote Quote  
  3. Member
    Join Date
    Jul 2015
    Location
    Polska
    Search PM
    Yup, I am sure. The normal file I have runs 5 minutes shorter, and they are both from same source (except this one is lower quality). When I just extracted all frames to jpg, removed duplicates from first scene, it matched the frames count to the 'good' one.

    I'll check out frame removers you mentioned, thanks.
    Quote Quote  
  4. Member
    Join Date
    Jul 2015
    Location
    Polska
    Search PM
    Using MDEC2 gives me fine results (at least from what I can see in generated .txt file, frame count is what it should be), but I am unable to do second pass using it.

    First pass script
    Code:
    FFVideoSource("1.mp4")
    Trim(825,1653)
    MDEC2(show=true, create=true, dir="J:\Projekty\Brat")
    Second pass
    Code:
    FFVideoSource("1.mp4")
    Trim(825,1653)
    MDEC2(create=false, dir="J:\Projekty\Brat")
    And on second pass I get

    Code:
    MDEC2: Incompatible Number of frames
    Any ideas?
    Quote Quote  
  5. I have a file which does the same thing. I downloaded it from youtube. I believe it was recorded on a smartphone or digital camera. The framerate is wierd. And I've looked at the video and found duplicate frames all over the place. Presumably removing them would fix the sync issue.

    Lately, I've been thinking about using dgDecimate or some similar utility to remove the duplicate frames. Haven't had the time to try it. I'd be interested to hear your results if you try it.

    Darryl
    Quote Quote  
  6. Not sure, I've never used mdec2 before. You can try one of the other ones.
    Quote Quote  
  7. This may or not help you, but I just used this on another phone video and it worked.

    FFVideoSource(movie,fpsnum=30,fpsden=1)

    My variable fps movie was corrected and audio stayed in sync.

    Darryl
    Quote Quote  
  8. Member
    Join Date
    Jul 2015
    Location
    Polska
    Search PM
    Alright, managed to do it and audio is now in sync perfectly with my dupe frames video.

    What I did, was use MultiDecimate to remove dupe frames (set threshold to 0.8 and min length to 3 frames). Then afterwards, I did ChangeFPS(25) to the source and the result is what I needed. Thanks for your help, lads!
    Quote Quote  



Similar Threads

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