How to Set Video Start Timecode Using FFmpeg -timecode

This article explains how to configure the starting timecode of an output video file using FFmpeg’s -timecode option. You will learn the correct command syntax, how to format the timecode string, and how to apply this setting to ensure your video files have accurate, professional metadata for video editing and post-production workflows.

The Basic Syntax

To set a specific starting timecode in FFmpeg, you use the -timecode option followed by the desired timecode value. This option must be placed before the output file name in your command.

Here is the basic command structure:

ffmpeg -i input.mp4 -timecode 01:00:00:00 -c:v copy -c:a copy output.mp4

In this example, the video and audio are copied without re-encoding (-c copy), and the starting timecode metadata of output.mp4 is set to exactly one hour (01:00:00:00).

Formatting the Timecode

The value passed to the -timecode option must follow a strict format based on frames:

hh:mm:ss[:;.]ff

The separator before the frame number (ff) determines the timecode format: * Use a colon (:) for non-drop-frame timecode (e.g., 01:00:00:00). * Use a semicolon (;) or dot (.) for drop-frame timecode (e.g., 01:00:00;00), which is commonly used in NTSC broadcast standards (29.97 fps or 59.94 fps).

Supported Formats and Containers

The -timecode option writes metadata directly to the output file container. While most professional video editors (like Adobe Premiere Pro, DaVinci Resolve, and Final Cut Pro) read this metadata, container compatibility varies:

Example: Setting Drop-Frame Timecode for NTSC

If you are working with a NTSC-standard framerate like 29.97 fps, you should use drop-frame timecode to maintain sync with real-world time:

ffmpeg -i input.mov -timecode 09:59:00;00 -c copy output.mov

This command sets the starting timecode to 9 hours, 59 minutes, and 0 seconds using drop-frame notation.