Skip to content

Instantly share code, notes, and snippets.

@samelie
Created October 3, 2015 16:33
Show Gist options
  • Save samelie/dbf10bb80e2fda7ed648 to your computer and use it in GitHub Desktop.
Save samelie/dbf10bb80e2fda7ed648 to your computer and use it in GitHub Desktop.
ffmpeg command
encode blur timeline , 0->10sec
ffmpeg -i vid2.mp4 -vf "boxblur=20:enable='between(t,0,10)'" -y testtest.mp4
//complete
ffmpeg -i vid2.mp4 -vf "boxblur=20:enable='between(t,0,10)'" -y -c:v libx264 -c:a libfdk_aac -movflags +faststart -pix_fmt yuv420p -keyint_min 6 -profile:v high -level 4.2 -maxrate 3000k testtest.mp4
@samelie
Copy link
Author

samelie commented Jan 4, 2016

for i in *.mov; do ffmpeg -i $i -y -c:v libx264 -c:a libfdk_aac -movflags +faststart -pix_fmt yuv420p -profile:v high -level 4.1 -crf 24 $i.mp4; done

@samelie
Copy link
Author

samelie commented Jan 11, 2016

for i in *.mov; do ffmpeg -i $i -y -c:v libx264 -c:a libfdk_aac -movflags +faststart -pix_fmt yuv420p -profile:v high -level 4.1 -vf scale=-1:720 -crf 21 $i.mp4; done

@samelie
Copy link
Author

samelie commented Feb 17, 2016

LETTER BOX PRESERVE ASPECT RATIO NO CROP

Define video size

width=1280;
height=720;

/usr/local/bin/ffmpeg -framerate 1 -pattern_type glob -i "$1"/'_.jpg' -c:v libx264 -filter:v "scale=iw_min($width/iw,$height/ih):ih_min($width/iw,$height/ih), pad=$width:$height:($width-iw_min($width/iw,$height/ih))/2:($height-ih*min($width/iw,$height/ih))/2" out.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment