How to Use FFmpeg Pullup Filter for Inverse Telecine

This guide explains how to use the pullup filter in FFmpeg to perform field-matching and inverse telecine (IVTC) on telecined video. You will learn the core concepts behind the pullup filter, the exact command-line syntax required to restore 24fps progressive video from 30fps telecined sources, and how to configure its parameters for optimal results.

The pullup filter is a robust, decision-based field-matching filter. Unlike static detelecine filters, pullup is designed to handle variable telecine patterns, dirty cuts, and video that transitions between progressive and interlaced formats. It works by analyzing future and past fields to reconstruct the original progressive frames.

The Basic Command Structure

To perform inverse telecine with the pullup filter, you must pair it with a frame-dropping filter. While pullup matches and merges the fields, it does not change the frame rate on its own; it leaves duplicate frames in the stream. You must use the fps filter immediately after pullup to drop these duplicates and output the correct frame rate.

Here is the standard command to convert a 29.97 fps (30000/1001) telecined video back to its original progressive 23.976 fps (24000/1001):

ffmpeg -i input.mp4 -vf "pullup,fps=24000/1001" -c:v libx264 -crf 18 -pix_fmt yuv420p -c:a copy output.mp4

In this command: * pullup: Matches the alternating fields to recreate progressive frames. * fps=24000/1001: Drops the duplicate frames created during the field-matching process, reducing the frame rate to 23.976 fps. * -pix_fmt yuv420p: Ensures the output uses a widely compatible pixel format.

Fine-Tuning Pullup Parameters

The pullup filter allows you to ignore “junk” pixels at the borders of the frame, which are common in analog captures or VHS rips (such as head-switching noise). Ignoring these edge pixels prevents them from throwing off the field-matching algorithm.

You can configure these boundaries using the following options: * jl (junk left) * jr (junk right) * jt (junk top) * jb (junk bottom)

The default value for each of these parameters is 8 pixels. If your video has clean borders, you can set them to 0. If you have significant noise at the bottom of the screen, you can increase the bottom limit:

ffmpeg -i input.mp4 -vf "pullup=jl=0:jr=0:jt=0:jb=16,fps=24000/1001" output.mp4

Advanced Handling of Mixed Content

For videos with highly irregular pulldown patterns or mixed progressive and interlaced content, you can add mpdecimate to the filter chain. This filter drops frames that are nearly identical to the previous frame, which helps clean up remaining duplicates before setting the final constant frame rate:

ffmpeg -i input.mp4 -vf "pullup,mpdecimate,fps=24000/1001" output.mp4