Created
February 17, 2020 10:48
-
-
Save davedarko/956772590b413734c38af7f55b3eaa04 to your computer and use it in GitHub Desktop.
Countdown Video Generator for Mate Light
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#This example will create a 15min video, with 10 frames per second | |
fps=10; | |
seconds=900; | |
mantissaDigits=2; | |
upperFont=14; | |
#upperFont=53; | |
lowerFont=100; | |
ffmpeg -loop 1 -i ~/Pictures/black-background.png -c:v libx264 -r $fps -t $seconds -pix_fmt rgb24 -vf "fps=$fps,drawtext=fontfile='/usr/share/fonts/truetype/freefont/FreeMono.ttf':fontcolor=white:fontsize=$upperFont:x=(w-text_w)/2:y=(h-text_h)/2:text='%{eif\:(($seconds-t)/60)\:d}\:%{eif\:(mod($seconds-t, 60))\:\d\:2 }'" "$seconds seconds countdown timer.mp4"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment