Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save CodeBoy2006/9519687dc4f05b124da39d54703e7130 to your computer and use it in GitHub Desktop.

Select an option

Save CodeBoy2006/9519687dc4f05b124da39d54703e7130 to your computer and use it in GitHub Desktop.
FFmpeg
ffmpeg -y -f lavfi -i "
[email protected]:1700x520:d=<SECONDS>,
format=rgba,
drawtext=
fontcolor=black:
fontsize=600:
fontfile=<FONT>.ttf:
text='%{eif\:(<SECONDS>-t)/60\:d\:1}\:%{eif\:mod(<SECONDS>-t, 60)\:d\:2}':
x=(w-text_w)/2:
y=(h-text_h)/2:
alpha=1
" -c:v png <FILENAME>.mkv
@CodeBoy2006
Copy link
Author

The last line could be repalced by
" -c:v qtrle <FILENAME>.mov (Transparent background, smaller)
or
" -c:v nvenc_hevc <FILENAME>.mp4 (No transparent bg, smallest)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment