VideoHelp Forum


Try NordVPN to access Netflix or other streaming services from any country and also surf safely!
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hi, I have a few videos in 30 fps that upon frame by frame inspection seem to repeat one frame every 1001 frames.

    I have found that by using the 'select' filter in ffmpeg I can fix this problem by re-encoding a version closer to the original file.
    Here is what I'm using based on info I've found online: -vf select='mod(n, X)',setpts='N/FRAME_RATE/TB' -r 29.97

    With X being the amount of frames to keep before dropping a frame, the first duplicate frame is at frame 442, here is the problem, the next duplicate (and the rest) is every 1001 frames.

    How can I sync it up so it drops in the correct place?

    I can't seem to find any info.

    My plan so far is by using select=between to encode it into two chunks, first chunk fixes the first duplicate by only copying the first 441 frames, and then for the second chunk use the aforementioned settings to drop every 1001 frames, but I don't know how to do it without re-encoding the second chunk twice. After encoding with stitchable=1, I merge them back.

    There has to be a better way, right?
    Quote Quote  
  2. So you want to drop frames 442, 1443, 2444, 3445, etc.? Isn't that "-vf select='mod(n-442,1001)',setpts='N/FRAME_RATE/TB' -r 29.97" ?
    Quote Quote  
  3. It worked! Thank you. I'll add that the setpts setting messed things up, it was causing frame drops. I guess I should've known to not add settings I don't know the use of.

    I was expecting having to adjust the audio speed but it was fine. I also switched to -r 30000/1001 I'm not sure what the exact difference that would make but on the device I use the fps is 60/1.001 so I expect that would work better.
    Quote Quote  



Similar Threads