diff --git a/img/deinterlaced_video_frames.png b/img/deinterlaced_video_frames.png new file mode 100644 index 0000000..2903336 Binary files /dev/null and b/img/deinterlaced_video_frames.png differ diff --git a/img/interlaced_video_fields.png b/img/interlaced_video_fields.png new file mode 100644 index 0000000..7038976 Binary files /dev/null and b/img/interlaced_video_fields.png differ diff --git a/index.html b/index.html index e342afa..0d27ba3 100644 --- a/index.html +++ b/index.html @@ -1409,6 +1409,43 @@ + + + +
+
Deinterlace video fields to frames
+

ffmpeg -i input_file -c:v libx264 -vf "idet,bwdif,format=yuv420p" output_file

+

This command takes an interlaced input file and outputs a deinterlaced H.264 MP4, with each field separated into its own frame. This is preferred for interlaced video that contains a lot of motion, as the double-rate output preserves the visual cadence of the source material.

+
+
ffmpeg
starts the command
+
-i input file
path, name and extension of the input file
+
-c:v libx264
tells FFmpeg to encode the video stream as H.264
+
-vf
video filtering will be used (-vf is an alias of -filter:v)
+
"
start of filtergraph (see below)
+
idet
detect interlaced video field order
+ idet will try to detect if the video is interlaced, and if so, what the order of the fields are (top-field-first, or bottom-field-first). This is done to ensure the output of the deinterlacing filter is correct.
+
bwdif
deinterlacing filter (‘Bob Weaver Deinterlacing Filter’)
+ By default, bwdif will output one frame for each field, matching the visual cadence of interlaced video.
+
,
separates filters
+
format=yuv420p
chroma subsampling set to 4:2:0
+ By default, libx264 will use a chroma subsampling scheme that is the closest match to that of the input. This can result in Y′CBCR 4:2:0, 4:2:2, or 4:4:4 chroma subsampling. QuickTime and most other non-FFmpeg based players can’t decode H.264 files that are not 4:2:0, therefore it’s advisable to specify 4:2:0 chroma subsampling.
+
"
end of filtergraph
+
output file
path, name and extension of the output file
+
+

"idet,bwdif,format=yuv420p" is an FFmpeg filtergraph. Here the filtergraph is made up of one filter chain, which is itself made up of the three filters (separated by the comma).
+ The enclosing quote marks are necessary when you use spaces within the filtergraph, e.g. -vf "idet, bwdif, format=yuv420p", and are included above as an example of good practice.

+

Note: bwdif also supports the older method of outputting one frame for each frame (thereby halving the number of output frames per second) with the syntax bwdif=mode=send_frame. This can be used when the presentation device is not capable of reproducing 50 (PAL) or 60 (NTSC) frames per second.

+

For more H.264 encoding options, see the latter section of the encode H.264 command.

+
+

Example

+

Before and after deinterlacing with bwdif:

+ VLC screenshot of original interlaced video + VLC screenshot of deinterlaced video +
+ +
+ +