Created
September 27, 2019 10:15
-
-
Save colspan/c71647b6fab5e80600a552fb299fec31 to your computer and use it in GitHub Desktop.
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/sh | |
# https://www.johnvansickle.com/ffmpeg/ | |
# http://looooooooop.blog35.fc2.com/blog-entry-1108.html | |
ffmpeg_path=ffmpeg-3.4-64bit-static/ | |
infile=$1 | |
resultfile=${infile}_transforms.trf | |
twopassfile=${infile}_2pass.mbtree | |
outfile=${infile}_stab.mp4 | |
${ffmpeg_path}ffmpeg -i $infile -vf vidstabdetect=result=${resultfile}:shakiness=5:accuracy=9:stepsize=6:mincontrast=0.25:tripod=0:show=0 -vcodec libx264 -b:v 4200k -pass 1 -passlogfile ${twopassfile} -an -f null - | |
${ffmpeg_path}ffmpeg -i $infile -vf vidstabtransform=input=${resultfile}:smoothing=10:maxshift=-1:maxangle=-1:crop=keep:invert=0:relative=1:zoom=0:optalgo=avg -vcodec libx264 -b:v 4200k -pass 2 -passlogfile ${twopassfile} -acodec aac -y ${outfile} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment