Burn 29.97 Drop-Frame Timecode with FFmpeg

This article provides a step-by-step guide on how to overlay a dynamic, accurate SMPTE timecode onto a 29.97 fps drop-frame video using FFmpeg. You will learn the exact command-line syntax, how FFmpeg handles the drop-frame format, and how to customize the appearance and position of the burnt-in timecode.

The FFmpeg Command

To burn a dynamic 29.97 drop-frame (DF) timecode into a video, you must use the drawtext video filter. In drop-frame timecode, a semicolon (;) is traditionally used as the separator before the frame number to distinguish it from non-drop-frame timecode.

Below is the standard command to burn the timecode:

ffmpeg -i input.mp4 -vf "drawtext=fontfile='/path/to/font.ttf':timecode='00\:00\:00\;00':rate=30000/1001:fontsize=48:fontcolor=white:box=1:boxcolor=black@0.6:x=(w-tw)/2:y=h-th-50" -c:a copy output.mp4

Parameter Breakdown

Understanding how each parameter functions allows you to customize the overlay to fit your specific production needs:

Customizing the Start Time

If you need the timecode to start at a specific hour, minute, or second (for example, starting at 01:00:00;00 for tape standard), simply update the timecode parameter:

timecode='01\:00\:00\;00'