Remove 3:2 Pulldown in FFmpeg
This article provides a quick guide on how to perform Inverse
Telecine (IVTC) in FFmpeg to remove a 3:2 pulldown pattern from a video.
By using the fieldmatch and decimate filters,
you can successfully reconstruct the original progressive frames and
restore your video from 29.97 fps to its native 23.976 fps.
The Inverse Telecine (IVTC) Process
When film (shot at 24 frames per second) is converted to NTSC television format (29.97 frames per second), a process called 3:2 pulldown is used to stretch the frames across interlaced fields. To reverse this and restore the original progressive video, FFmpeg utilizes a two-step filter chain:
fieldmatch: Reconstructs the original progressive frames by matching complementary interlaced fields.decimate: Identifies and removes the duplicate frames resulting from the field matching process, reducing the frame rate back to 23.976 fps.
The Basic FFmpeg Command
To remove the 3:2 pulldown pattern, run the following command in your terminal:
ffmpeg -i input.mp4 -vf "fieldmatch,decimate" -c:a copy output.mp4How the Command Works
-i input.mp4: Specifies your source video file containing the telecined 3:2 pulldown video.-vf "fieldmatch,decimate": Applies the video filtergraph.fieldmatchanalyzes the interlaced fields and combines them to recreate progressive frames.decimatedrops one out of every five frames (the duplicate frame created during telecine), restoring the video to 23.976 fps.
-c:a copy: Copies the audio stream directly without re-encoding to save time and maintain original quality.output.mp4: The resulting progressive, 24fps (23.976 fps) video file.
Advanced Adjustments
In most cases, the default settings for these filters work perfectly. However, if your source video has specific properties, you can tweak the filter parameters:
Handling combed frames: If some interlaced artifacts remain, you can tell
fieldmatchto pass stubborn frames to a deinterlacer likeyadifby adding thecombmatchoption:ffmpeg -i input.mp4 -vf "fieldmatch=combmatch=sc,yadif=deint=interlaced,decimate" -c:a copy output.mp4Variable Frame Rate (VFR) input: If the input video mixes progressive film and native interlaced video, you can configure
decimateto output variable frame rate video to prevent judder in the purely interlaced sections.