[FFmpeg-user] Subtitles synced to timecode

Gyan gyandoshi at gmail.com
Tue May 9 16:53:59 EEST 2017

On Tue, May 9, 2017 at 1:15 AM, Kasper Folman @ flipper <
folman at flipper.video> wrote:

> However, I have a clip, whose timescode starts at 14:15:34:20, and
> subtitles are not burned in to this one, even tough the srt file are synced
> to that timecode. (First subtitle is at 14:15:35).
That timecode is almost certainly a data track encoding the start time
label of the asset's original medium, primarily of use in editing apps. and
not the starting timestamp of the video stream in the file.

Assuming the video stream's STARTPTS is 0 (usually the case with containers
other than transport streams TS, MTS..etc), you can use the following


where 51334.83 is the starting timecode expressed in (fractional) seconds.
I've assumed a 24 fps video stream.

To my knowledge, ffmpeg cannot directly make use of the timecode value, so
you will to have run ffprobe beforehand, extract the value if present,
convert and then form the filtergraph string.

More information about the ffmpeg-user mailing list