Created
May 9, 2016 12:15
-
-
Save ibaaj/6505a5df5df64ab4cc850a1e47b7073b to your computer and use it in GitHub Desktop.
A71 "surfing the clouds"
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/zsh | |
mkdir -p {frames,ftop,fbottom,final}; | |
ffmpeg -i IMG_7197.mov -r 25 -qscale:v 2 frames/%05d.jpg ; | |
framesNumber=$(ls ./frames/*.jpg |wc -l|tr -d ' '); | |
C_H=540 | |
H=1280 | |
H_D=$((H - C_H)); | |
for i in {1..${framesNumber}} | |
do | |
nb=$(printf %05d ${i}); | |
convert frames/${nb}.jpg -flip -crop 720x${H_D}+0+${C_H} fbottom/${nb}.jpg; | |
convert frames/${nb}.jpg -crop 720x${H_D}+0+0 ftop/${nb}.jpg; | |
convert ftop/${nb}.jpg fbottom/${nb}.jpg -append final/${nb}.jpg; | |
done | |
#convert -layers Optimize frames/*.jpg out.gif; | |
cat ./final/*.jpg | ffmpeg -f image2pipe -r 25 -vcodec mjpeg -i - -vcodec libx264 out-${C_H}.mp4; | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment