Putting timeframe to video file using FFMPEG

Aug 24, 2020 20:45

Well, I figured that I need this method for subtitle timing, so before I forgot the usage, let's put it here.

Command: --> ffmpeg -i input -vf "drawtext=text='%{pts\:hms}':fontsize=48:fontcolor=white:box=1:boxborderw=6:boxcolor=black@0.75:x=(w-text_w)/2:y=h-text_h-20" -c:a copy output.mp4
Notes:
-vf drawtext = put a text on video file command, can be used to put a caption too.
'%{pts\:hms}' = time display according to time per scene
fontsize, fontcolor, box, boxborderw, boxcolor = attributes relate to timeframe text display.
(w-text_w)/2:y=h-text_h-20 = location of timeframe text on the video.

RESULT!

ffmpeg: gif, ffmpeg: timeframe, ffmpeg: subtitle, ffmpeg: hardsub

Previous post Next post
Up