How to Separate Interlaced Video Fields in FFmpeg
This guide explains how to use the separatefields filter
in FFmpeg to split interlaced video footage into individual, sequential
frames. You will learn the exact command-line syntax to separate fields,
understand how this process affects video dimensions and frame rates,
and discover how to output the results as either an image sequence or a
new video file.
Understanding the
separatefields Filter
Interlaced video contains two fields (odd and even lines) inside a
single frame, captured at slightly different points in time. The
separatefields filter splits each of these interlaced
frames into two distinct, sequential frames.
Because each field contains only half of the vertical lines of the original frame, applying this filter will: * Double the frame rate (e.g., 29.97 fps interlaced video becomes 59.94 fps sequential frames). * Halve the height of the video (e.g., a 1920x1080 video becomes 1920x540).
Command to Export Fields as an Image Sequence
To extract every individual field as a sequential PNG or JPEG image, use the following command:
ffmpeg -i input.mp4 -vf "separatefields" field_%04d.png-i input.mp4: Specifies your source interlaced video.-vf "separatefields": Applies the video filter that splits the fields.field_%04d.png: Outputs the fields as sequentially numbered images (field_0001.png, field_0002.png, etc.).
Command to Export Fields to a New Video File
If you want to output the separated fields directly into a new video container, run:
ffmpeg -i input.mp4 -vf "separatefields" -c:v libx264 -crf 18 output.mp4-c:v libx264: Encodes the output video using the H.264 codec.-crf 18: Sets a high-quality visually lossless compression level.
How to Correct the Aspect Ratio (Prevent Squishing)
Because separating fields halves the vertical resolution, the output
frames will appear vertically squished. To maintain the original aspect
ratio, you can chain the scale filter immediately after
separatefields to stretch the height back to its original
size:
ffmpeg -i input.mp4 -vf "separatefields,scale=iw:ih" output.mp4scale=iw:ih: Scales the output to match the Input Width (iw) and Input Height (ih) of the source video, restoring the original dimensions.