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?
+ Reply to Thread
Results 1 to 3 of 3
-
-
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" ?
-
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.
Similar Threads
-
Duplicate frames issue
By tupper in forum Video ConversionReplies: 1Last Post: 18th Dec 2019, 11:04 -
H.265 introducing duplicate frames
By ZetaStax in forum Video ConversionReplies: 22Last Post: 2nd Aug 2019, 14:58 -
Replace random duplicate frames with black frames (AVISYNTH)
By benzio in forum EditingReplies: 7Last Post: 31st Jan 2018, 16:43 -
Fix duplicate frames on old digicam video
By Homestar in forum RestorationReplies: 13Last Post: 25th Dec 2017, 00:15 -
Can you remove duplicate frames without re-encoding?
By VideoFanatic in forum RestorationReplies: 3Last Post: 5th Jul 2017, 14:44