Creating an Elapsed Timer using FFmpeg

View Timer
ffplay -f lavfi -i color=c=black:s=240x96 -ss 00:00:00 -t 00:48:00 -vf "drawtext=fontfile=/System/Library/Fonts/Monaco.dfont:text='%{pts\:gmtime\:0\:%M\\\\\:%S}':fontcolor=white:fontsize=64:x=(w-tw)/2:y=(h-th)/2:box=1:boxcolor=green@0.5:boxborderw=10,format=yuv420p"
Save as File
ffmpeg -f lavfi -i color=c=black:s=240x96 -ss 00:00:00 -t 00:48:00 -vf "drawtext=fontfile=/System/Library/Fonts/Monaco.dfont:text='%{pts\:gmtime\:0\:%M\\\\\:%S}':fontcolor=white:fontsize=64:x=(w-tw)/2:y=(h-th)/2:box=1:boxcolor=green@0.5:boxborderw=10,format=yuv420p" timer.mp4

Note: On Window systems, access the fonts like this: “/Windows/Fonts/arial.ttf”. You can’t use the traditional “C:\Windows\Fonts\arial.ttf” because the colon is a reserved character in the FFmpeg syntax.

FFmpeg Playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZOPDZ71Khzt5PX4X4j6flkg

FFmpeg notes: https://www.rickmakes.com/ffmpeg-notes/

Leave a comment

Your email address will not be published. Required fields are marked *