How to Use the FFmpeg fieldmatch Filter
This guide explains how to use the fieldmatch filter in
FFmpeg to reconstruct progressive video frames from telecined or
interlaced sources. You will learn the purpose of the filter, its basic
syntax, and how to combine it with other filters in a standard inverse
telecine (IVTC) workflow to restore your video to its original
progressive format.
What is the fieldmatch Filter?
The fieldmatch filter is the first and most crucial step
in the Inverse Telecine (IVTC) process. When 24 frames-per-second (fps)
film is converted to a 30fps interlaced broadcast format (a process
called telecine), frames are split into fields and repeated. The
fieldmatch filter analyzes these fields and pairs the
matching top and bottom fields back together to reconstruct the original
progressive frames.
Because fieldmatch only matches existing fields, it does
not alter the frame rate or remove duplicate frames on its own. It
simply merges the correct fields to eliminate interlacing artifacts
(combing).
Basic Syntax and Parameters
The simplest way to use the filter is by applying it to your video
filter (-vf) chain:
ffmpeg -i input.mp4 -vf "fieldmatch" output.mp4To get the best results, you should specify key parameters based on your source video:
order: Specifies the field order of the input video.auto: Automatically detect (default).tff: Top Field First.bff: Bottom Field First.
mode: Controls how fields are matched.pc_n(default): Matches the next, current, and previous fields. This is highly accurate for standard telecine.pc: Matches only the current and next fields.
combmatch: Determines how the filter decides if a reconstructed frame still has combing artifacts.scent(default): Spatial combed detection.
Example with parameters:
ffmpeg -i input.mp4 -vf "fieldmatch=order=tff:mode=pc_n" output.mp4The Complete Inverse Telecine (IVTC) Workflow
Using fieldmatch alone will leave you with a 30fps video
containing duplicate frames. To fully restore a 24fps progressive video,
you must combine fieldmatch with a deinterlacer (to fix any
remaining combed frames that couldn’t be matched) and the
decimate filter (to drop duplicate frames).
The standard FFmpeg filter chain for IVTC is:
ffmpeg -i input_telecined.mp4 -vf "fieldmatch=order=tff,yadif=deint=interlaced,decimate" -c:a copy output_progressive.mp4How this chain works:
fieldmatch=order=tff: Recombines matching top and bottom fields assuming Top Field First.yadif=deint=interlaced: Theyadif(Yet Another Deinterlacing Filter) step is set to only deinterlace frames thatfieldmatchmarked as still being “combed” (unmatched). This preserves the quality of perfectly matched frames while cleaning up difficult transitions.decimate: Removes one duplicate frame out of every five-frame cycle, successfully dropping the frame rate from 29.97fps back to the original 23.976fps progressive film standard.