FFmpeg Telecine Removal: Fieldmatch and Decimate
This article provides a concise guide on using FFmpeg's
fieldmatch and decimate filters to perform
Inverse Telecine (IVTC). Telecine is the process of converting 24 fps
film content to a 29.97 fps interlaced video signal using a 3:2 pulldown
pattern. By chaining fieldmatch and decimate
together in FFmpeg, you can reconstruct the original progressive frames
and remove the redundant fields, successfully recovering the pristine
23.976 fps progressive video.
Basic Command Syntax
The standard filter chain for telecine removal connects
fieldmatch directly to decimate:
ffmpeg -i input.mkv -vf "fieldmatch,decimate" -c:v libx264 -crf 18 -c:a copy output.mp4How the Filters Work Together
Telecine removal requires two distinct steps: reconstructing progressive frames and dropping duplicate frames.
fieldmatch(Field Matching):
Thefieldmatchfilter analyzes adjacent interlaced fields and matches pairs that belong to the same film frame. It reconstructs full progressive frames from the 3:2 pulldown structure. At this stage, the video is progressive, but it remains at 29.97 fps because one out of every five frames is a duplicate.decimate(Frame Decimation):
Thedecimatefilter examines groups of frames (by default, groups of five) and drops the one that is most similar to its neighbor. This drops the frame rate from 29.97 fps down to the original 23.976 fps (24000/1001), eliminating stutter caused by duplicate frames.
Handling Combed Artifacts (Hybrid Content)
Occasionally, broadcast sources contain hybrid content or damaged
cadences where field matching fails to assemble a clean frame, leaving
"combing" artifacts. You can instruct fieldmatch to detect
residual combing and pass those frames through a dedicated deinterlacing
filter like bwdif or yadif.
To clean up stubborn interlaced sections without deinterlacing the entire video, use the following syntax:
ffmpeg -i input.mkv -vf "fieldmatch=order=tff:combmatch=full,bwdif=mode=send_frame:deint=interlaced,decimate" -c:v libx264 -crf 18 -c:a copy output.mp4order=tff(orbff): Explicitly defines the field order (Top Field First or Bottom Field First). Specifying the field order prevents matching errors.bwdif=...:deint=interlaced: Tells the deinterlacer to act only on frames thatfieldmatchflags as still containing combed artifacts.
Verifying the Output
After processing, verify that the telecine removal succeeded by
checking the output file details with ffprobe:
ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate,avg_frame_rate output.mp4The output frame rate should display 24000/1001
(approximately 23.976 fps). Finally, step through
high-motion scenes frame by frame using a media player to ensure there
are no lingering horizontal comb lines or motion stutters.