Created
February 4, 2020 12:16
-
-
Save fznsakib/255bd625f1cab489c2f5a92d2fccf6cf to your computer and use it in GitHub Desktop.
Add current frame number overlay to all videos in current directory
This file contains hidden or 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
# $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