Skip to content

Instantly share code, notes, and snippets.

@fznsakib
Created February 4, 2020 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fznsakib/255bd625f1cab489c2f5a92d2fccf6cf to your computer and use it in GitHub Desktop.
Save fznsakib/255bd625f1cab489c2f5a92d2fccf6cf to your computer and use it in GitHub Desktop.
Add current frame number overlay to all videos in current directory
# $1 = target directory
function addframes() {
for filename in *.mp4; do
ffmpeg -i "$filename" -vf "drawtext=fontfile=Arial.ttf: text=%{n}: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099: fontsize=32" -y "$1/"$filename"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment