Created
March 11, 2019 11:46
-
-
Save BlogBlocks/cd070777192d780f8a944b0e6ba3cd22 to your computer and use it in GitHub Desktop.
Make Memes from Videos
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
#!/bin/bash | |
if [[ $# < 3 ]] ; then | |
echo 'Correct usage:' | |
echo 'ffmpeg <video-in> "The Text To Use" <capture-second>' | |
echo '<capture-second> Capture what second in the video' | |
echo 'Example:' | |
echo 'ffmpeg video.mp4 "The Text To Use" 30' | |
exit 0 | |
fi | |
ffmpeg -ss $3 -i $1 -vf \ | |
"drawtext=text="\'$2\'":fix_bounds=true:fonts/Lobster_1.3.otf:fontsize=70:fontcolor=white:x=220:y=320 \ | |
fontcolor=white:x=120:y=520" \ | |
-vframes 1 -y temp.jpg | |
ffmpeg -i temp.jpg -vf scale=640:-2 -y MEM01a.jpg | |
display MEM01a.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment