VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. The source is DVD with PAL to NTSC conversion done not like usual telecine, but adding 1 duplicate frame after every 5 or 6 frames. Is it possible to remove duplicate frames but no reencode?
    Image Attached Files
    Quote Quote  
  2. Yes, it is possible to remove duplicate frames without re-encoding the video.
    The specific technique involves using the `mpdecimate` filter, which can
    detect and remove duplicate frames with minimal quality loss.
    Code:
    ffmpeg -i input.dvd.mkv -vf mpdecimate -vsync passthrough output.mkv
    Key Parameters Explained
    - `-vf mpdecimate` : The video filter that detects and removes duplicate frames
    - `-vsync passthrough`: Ensures the frame rate is preserved after duplicate removal

    Additional Considerations
    - The `mpdecimate` filter works best when duplicates are exact matches
    - For your specific scenario (1 duplicate after every 5-6 frames), this might require some fine-tuning
    - You may need to adjust parameters like `max=1` to control duplicate frame detection

    If the basic command doesn't work perfectly, you can add more precise parameters:
    Code:
    ffmpeg -i input.dvd.mkv -vf "mpdecimate=max=1:hi=64:lo=64" -vsync passthrough output.mkv
    if you rather use a GUI, try Clever FFmpeg-GUI
    Last edited by videoAI; 26th Aug 2025 at 07:41.
    As always .. there is nothing wrong with my environment
    Quote Quote  
  3. Originally Posted by videoAI View Post
    Yes, it is possible to remove duplicate frames without re-encoding the video.
    The specific technique involves using the `mpdecimate` filter, which can
    detect and remove duplicate frames with minimal quality loss.
    If there is no re-encoding, where is "quality loss" came from?

    Originally Posted by videoAI View Post
    if you rather use a GUI, try Clever FFmpeg-GUI
    I leaning more to GUI, but not see how to use filters in Clever FFmpeg-GUI
    Quote Quote  
  4. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I'm no expert but I can't see any way of not re-encoding if you start removing frames.

    If you're into AVISynth, 1 in 6 decimation seems to work (with Ass to increase the speed from 24.975 after the Tdec to 25):

    Code:
    LWLibavVideoSource("sample2.m2v")
    TFM()
    TDecimate(Cycle=6, CycleR=1)
    AssumeFPS(25)
    Quote Quote  
  5. Originally Posted by Alwyn View Post
    I'm no expert but I can't see any way of not re-encoding if you start removing frames.
    I thought that mpeg2 allows cut/join (to the frame accuracy) without re-encode?
    Quote Quote  
  6. Originally Posted by cinephil View Post
    Originally Posted by Alwyn View Post
    I'm no expert but I can't see any way of not re-encoding if you start removing frames.
    I thought that mpeg2 allows cut/join (to the frame accuracy) without re-encode?
    For I-frame only encoded mpeg2 , yes

    For you - no, because it's a long gop encode (some frames reference data from adjacent frames). Whenever you interrupt or edit within a GOP, the entire GOP must be re-encoded
    Quote Quote  
  7. Originally Posted by poisondeathray View Post
    For I-frame only encoded mpeg2 , yes

    For you - no, because it's a long gop encode (some frames reference data from adjacent frames). Whenever you interrupt or edit within a GOP, the entire GOP must be re-encoded
    Yeah... I guess I remembering those programs that re-encode only split section and direct stream copy the rest. But since splits is every 6 frames - it's not make much sense in here
    Quote Quote  
  8. Let me help clarify this for you by breaking down the nuances of frame decimation and video processing.

    When using the `mpdecimate` filter, there are actually two potential scenarios of "quality" impact:

    1. Computational Processing
    - The `mpdecimate` filter analyzes and removes duplicate frames
    - This process itself does not re-encode or modify the video's actual visual quality
    - The computational analysis might have a minimal processing overhead

    2. Frame Selection Mechanism
    - `mpdecimate` uses a comparison algorithm to detect duplicate frames
    - It makes decisions about which frames to keep or remove
    - While not re-encoding, the frame selection process could potentially introduce very slight
    artifacts or discontinuities in frame sequence

    Technical Nuance
    True quality loss occurs during re-encoding. In this case, with `mpdecimate`,
    you're not re-compressing the video, so the original video's visual fidelity remains intact.

    - For Clever FFmpeg-GU, reach out to @ProWo for how to use the tool.

    Originally Posted by cinephil View Post
    If there is no re-encoding, where is "quality loss" came from?

    I leaning more to GUI, but not see how to use filters in Clever FFmpeg-GUI
    As always .. there is nothing wrong with my environment
    Quote Quote  
  9. Originally Posted by cinephil View Post
    Originally Posted by poisondeathray View Post
    For I-frame only encoded mpeg2 , yes

    For you - no, because it's a long gop encode (some frames reference data from adjacent frames). Whenever you interrupt or edit within a GOP, the entire GOP must be re-encoded
    Yeah... I guess I remembering those programs that re-encode only split section and direct stream copy the rest. But since splits is every 6 frames - it's not make much sense in here
    The GOP length is 15, so you end up re-encoding the entire thing anyways even with a smart renderer


    Originally Posted by videoAI View Post
    When using the `mpdecimate` filter, there are actually two potential scenarios of "quality" impact:
    And for ffmpeg, anything -vf means data gets decoded to uncompressed before the filter chain - so this usually means re-encoding and quality loss, unless you leave it uncompressed (very huge filesizes) , or re-encode with lossless compression (huge filesizes)
    Quote Quote  
  10. Yes, it is possible to remove duplicate frames without re-encoding the video.
    Wrong, since the original post implied that the video format does not change.
    Also
    Code:
    ffmpeg -i input.dvd.mkv -vf "mpdecimate=max=1:hi=64:lo=64" -vsync passthrough output.mkv
    does reencode, independent of the input format of the 'input.dvd.mkv'.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  11. OK. I got the answer to my question.

    Conclusion - I need to find a PAL DVD with the same content
    Quote Quote  
  12. poisondeathray is right and videoAI not - you can only remove losslessly repeated frames (if they are duplicated in MPEG syntax) - for this DGPulldown is probably best tool - if repeated frames are hardcoded then there is no way to remove them from stream without re-encoding.
    Quote Quote  
  13. As always .. there is nothing wrong with my environment
    Quote Quote  



Similar Threads

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