VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    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:
    Code:
    ffmpeg -i source.mp4 -vf mpdecimate,fps=25 out-test.mp4
    and the effect is ok, though I see a duplicate frame from time to time.

    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.
    Quote Quote  
  2. Originally Posted by rgr View Post
    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:
    Code:
    ffmpeg -i source.mp4 -vf mpdecimate,fps=25 out-test.mp4
    and the effect is ok, though I see a duplicate frame from time to time.

    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.

    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.
    Quote Quote  
  3. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    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.
    Quote Quote  



Similar Threads

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