FFmpeg Command to Add Timecode Starting at 10:00:00:00
This article provides the exact FFmpeg command needed to overlay a burnt-in timecode onto a video, specifically configured to start at the standard broadcast timecode of 10:00:00:00. You will learn the breakdown of the command parameters, including frame rate adjustments and visual styling options, so you can easily apply and customize the overlay for your post-production workflow.
The FFmpeg Command
To overlay a timecode starting at 10:00:00:00, use the
drawtext video filter. Run the following command in your
terminal:
ffmpeg -i input.mp4 -vf "drawtext=timecode='10\:00\:00\:00':r=30:x=(w-tw)/2:y=h-th-40:fontcolor=white:fontsize=48:box=1:boxcolor=black@0.5" -c:a copy output.mp4Parameter Breakdown
-i input.mp4: Specifies your input video file.-vf "drawtext=...": Applies the video filter used to draw text and timecode on the video.timecode='10\:00\:00\:00': Sets the starting timecode in the formatHH:MM:SS:FF(Hours:Minutes:Seconds:Frames). Because colons are used as separators in FFmpeg filters, they must be escaped with backslashes (\:).r=30: Sets the frame rate of the timecode. Crucial: This value must match your input video’s actual frame rate (e.g.,24,25,29.97,30,60) for the timecode to tick accurately.x=(w-tw)/2: Centers the timecode horizontally on the screen.y=h-th-40: Positions the timecode near the bottom of the screen (40 pixels up from the bottom edge).fontcolor=white: Sets the color of the timecode text to white.fontsize=48: Sets the size of the font.box=1:boxcolor=black@0.5: Draws a semi-transparent black background box (50% opacity) behind the text to ensure the timecode remains readable against any video background.-c:a copy: Copies the audio stream without re-encoding to speed up the process.
Adjusting for Drop-Frame Timecode (29.97 fps)
If you are working with NTSC broadcast media at 29.97 frames per second, you should use a drop-frame timecode. To specify drop-frame, change the last separator in the timecode string from a colon to a semicolon:
ffmpeg -i input.mp4 -vf "drawtext=timecode='10\:00\:00\;00':r=29.97:x=(w-tw)/2:y=h-th-40:fontcolor=white:fontsize=48:box=1:boxcolor=black@0.5" -c:a copy output.mp4