Skip to content

Instantly share code, notes, and snippets.

@tuan3w
Created August 21, 2018 04:06
Show Gist options
  • Save tuan3w/2dd000f81dcac883cd1ed88b0444f9b9 to your computer and use it in GitHub Desktop.
Save tuan3w/2dd000f81dcac883cd1ed88b0444f9b9 to your computer and use it in GitHub Desktop.
Adding elapsed time to video
ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 \
-vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: \
text=\'%{pts\:gmtime\:0\:%M\\\:%S}\': fontcolor=white@0.8: x=7: y=7: fontsize=24" -vcodec libx264 \
-preset veryfast -f mp4 -pix_fmt yuv420p -y output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment