The source has 3 or 2 sequentially duplicating frames - it is converted from 25fps to 60fps.
Now I'm trying to convert back to 25fps with the "mdecimate" filter:
and the effect is ok, though I see a duplicate frame from time to time.Code:ffmpeg -i source.mp4 -vf mpdecimate,fps=25 out-test.mp4
1. Is this command optimal?
2. The source file has a bar which is at 60fps. Is it possible to avoid this part somehow by passing it through the "mdecimate" filter? The bar should remain in the target file, I mean to bypass it during the analysis.
+ Reply to Thread
Results 1 to 3 of 3
-
-
In theory it should be -vf decimate=2,decimate=6 if your source was converted cleanly from 25 to 60 with duplicates, and it's CFR and the timestamps are perfect
To bypass an area for the decimation calculation, you can use ppsrc (e.g. a cropped source for the analysis to exclude the "bar") . But if the "bar" animates at 60fps, decimation to 25fps will make the bar animation "jerky"
https://www.ffmpeg.org/ffmpeg-filters.html#decimate-1
ppsrc
Mark main input as a pre-processed input and activate clean source input stream. This allows the input to be pre-processed with various filters to help the metrics calculation while keeping the frame selection lossless. When set to 1, the first stream is for the pre-processed input, and the second stream is the clean source from where the kept frames are chosen. -
Yes, I also had this idea
But unfortunately the conversion is not very accurate, because I still get a duplicate frame about every 1 second.
I tested the mpdecimate function and it showed me an average of 24.5fps.
Let it be that way.
Similar Threads
-
Avisynth: How do I change 25fps to 60fps only with duplicate frames?
By VideoFanatic in forum RestorationReplies: 1Last Post: 9th Dec 2021, 14:14 -
Removing duplicate lines
By [ss]vegeta in forum SubtitleReplies: 1Last Post: 17th Mar 2021, 01:52 -
Removing all duplicate frames in a video clip
By ecortez in forum EditingReplies: 0Last Post: 10th Mar 2021, 20:23 -
Removing duplicate frames from YouTube 60fps to 23.976 fps
By AndersonJames in forum RestorationReplies: 39Last Post: 5th Aug 2020, 22:47 -
Replace random duplicate frames with black frames (AVISYNTH)
By benzio in forum EditingReplies: 7Last Post: 31st Jan 2018, 16:43