Separate Interlaced Video Fields with FFmpeg
This guide explains how to split an interlaced video into individual,
sequential frames using FFmpeg's separatefields filter.
Interlaced video consists of two alternating fields—top and
bottom—captured at different points in time within a single video frame.
By using the separatefields filter, you can isolate every
field into its own independent frame, effectively doubling the frame
rate, halving the vertical resolution, and allowing you to inspect or
process each temporal step sequentially.
Basic Syntax
To separate the fields into individual frames, pass the
separatefields filter to the -vf (video
filter) option:
ffmpeg -i input.mp4 -vf "separatefields" output.mp4When this command runs:
- The vertical resolution is halved (for example, a 1920x1080 input becomes 1920x540).
- The frame rate is doubled (a 29.97 fps interlaced stream produces a 59.94 fps progressive stream).
- The total frame count is doubled.
Setting Field Order
The filter relies on the video's field order metadata to decide which field (top or bottom) comes first. If the source file has missing or incorrect field order metadata, motion will appear jerky or play backwards two steps at a time.
You can explicitly set the field order using the
setfield filter prior to separatefields.
For top-field-first (TFF) material:
ffmpeg -i input.mp4 -vf "setfield=tff,separatefields" output.mp4For bottom-field-first (BFF) material:
ffmpeg -i input.mp4 -vf "setfield=bff,separatefields" output.mp4Correcting the Aspect Ratio
Because separatefields extracts half-height lines
directly without interpolation, the resulting video will appear
vertically squished. To restore the original display aspect ratio, you
can chain the scale filter to double the vertical
resolution using nearest-neighbor scaling:
ffmpeg -i input.mp4 -vf "separatefields,scale=iw:ih*2:flags=neighbor" output.mp4Alternatively, you can adjust the sample aspect ratio directly without re-interpolating pixels:
ffmpeg -i input.mp4 -vf "separatefields,setsar=sar=1/2" output.mp4Exporting Fields as Image Sequences
If you need to analyze individual fields as static images, output the result to an image format:
ffmpeg -i input.mp4 -vf "separatefields" frame_%06d.pngThis generates a sequential sequence of PNG files where each file represents a single isolated field from the original interlaced stream.