Configure Pullup Pattern in FFmpeg Telecine

This article provides a straightforward guide on how to configure the pullup pattern in the FFmpeg telecine filter. You will learn the syntax of the filter, how the pattern values correspond to different telecine processes (such as the standard 3:2 NTSC pulldown), and see practical command-line examples to convert progressive video into interlaced formats.

The telecine filter in FFmpeg converts progressive video into interlaced video by repeating specific fields of the input frames. This process is commonly used to convert 24 fps (23.976 fps) film content to 30 fps (29.97 fps) television broadcast standards.

The Telecine Filter Syntax

The basic syntax for the telecine filter is:

"telecine=first_field=val:pattern=val"

The filter accepts two primary parameters: * first_field (or ff): Specifies which field is output first. Options are top (or t) and bottom (or b). The default is top. * pattern (or p): A string of digits where each digit represents the number of fields generated from each consecutive input frame.

Common Pullup Patterns

To configure the pullup pattern correctly, you must specify the sequence of field repetitions in the pattern option.

1. Standard NTSC 3:2 Pulldown

To convert 24 fps progressive video to 30 fps interlaced video, use a standard 3:2 pulldown pattern. In FFmpeg, this is configured using the pattern 23. * The first frame generates 2 fields. * The second frame generates 3 fields. * The pattern repeats (2, 3, 2, 3…).

FFmpeg Command Example:

ffmpeg -i input.mp4 -vf "telecine=first_field=top:pattern=23" output.mp4

2. Advanced 2:3:3:2 Pulldown

The 2:3:3:2 pattern is often used in DV cameras. It can be set using the pattern string 2332. * Frame 1: 2 fields * Frame 2: 3 fields * Frame 3: 3 fields * Frame 4: 2 fields

FFmpeg Command Example:

ffmpeg -i input.mp4 -vf "telecine=first_field=top:pattern=2332" output.mp4

3. Euro / PAL 2:2 Pulldown

To convert progressive video to an interlaced format without changing the frame rate speed (for example, 25fps progressive to 25fps interlaced / 50i), use the 22 pattern.

FFmpeg Command Example:

ffmpeg -i input.mp4 -vf "telecine=first_field=top:pattern=22" output.mp4

Encoder Settings for Interlacing

When using the telecine filter, you should also instruct the video encoder to flag the output video as interlaced. For example, when encoding to H.264, add the -flags +ilme+ildct flags to your command:

ffmpeg -i input.mp4 -vf "telecine=first_field=top:pattern=23" -c:v libx264 -flags +ilme+ildct output.mp4