Skip to content

Fieldmatch

Video Single output Transform

Field matching for inverse telecine.

FFmpeg filter: fieldmatch — the official reference.

Add it to a graph. The explicit form works for every filter — bind it to its inputs and read the result from outputs():

$node = $video->addFilter(new Fieldmatch(), [$other]);
$result = $node->outputs()[0];

Shorthand. Single-output filters can skip the node — apply() returns the result stream directly:

$result = $video->apply(new Fieldmatch(), $other);

TODO — when this filter shines: what it’s the right tool for, what to reach for instead when it isn’t, and how it composes with neighbouring filters.

TODO — prose: how the filter actually works and what its key parameters mean (the explanation FFmpeg’s terse option help omits).

TODO — runnable PHP, with the equivalent ffmpeg CLI alongside.

TODO

TODO

ParameterTypeDefaultRange / valuesDescription
orderFieldmatchOrderautoauto, bff, tffspecify the assumed field order
modeFieldmatchModepc_npc, pc_n, pc_u, pc_n_ub, pcn, pcn_ubset the matching mode or strategy to use
ppsrcboolfalsemark main input as a pre-processed input and activate clean source input stream
fieldFieldmatchFieldautoauto, bottom, topset the field to match from
mchromabooltrueset whether or not chroma is included during the match comparisons
y0int00define an exclusion band which excludes the lines between y0 and y1 from the field matching decision
y1int00define an exclusion band which excludes the lines between y0 and y1 from the field matching decision
scthreshfloat120100set scene change detection threshold
combmatchFieldmatchCombmatchingscnone, sc, fullset combmatching mode
combdbgFieldmatchDbglvlnonenone, pcn, pcnubenable comb debug
cthreshint9-1255set the area combing threshold used for combed frame detection
chromaboolfalseset whether or not chroma is considered in the combed frame decision
blockxint164512set the x-axis size of the window used during combed frame detection
blockyint164512set the y-axis size of the window used during combed frame detection
combpelint800set the number of combed pixels inside any of the blocky by blockx size blocks on the frame for the frame to be detected as combed

Maps to FFmpeg’s fieldmatch filter. Verified against ffmpeg n7.1.1.

An Artisan Build project.

Built on FFmpeg — an independent binding, not affiliated with or endorsed by the FFmpeg project. Support FFmpeg.