Created
February 9, 2014 07:14
-
-
Save stammy/8895507 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/bash | |
VIDEOS=~/Dropbox/_vid | |
find "$VIDEOS" -name '*.mp4' -exec sh -c 'ffmpeg -i "$0" -c:v libvpx -crf 10 -b:v 3000k -f webm -vf scale=-1:720 -bufsize 1500k -quality good -cpu-used 0 -qmin 10 -qmax 42 -c:a libvorbis -threads 8 "${0%%.mp4}.webm"' {} \; | |
find "$VIDEOS" -name '*.mp4' -exec sh -c 'ffmpeg -i "$0" -vf scale=-1:720 -quality good -cpu-used 0 -threads 8 "${0%%.mp4}_720p.mp4"' {} \; | |
# square video | |
#find "$VIDEOS" -name '*.mp4' -exec sh -c 'ffmpeg -i "$0" -c:v libvpx -crf 10 -b:v 3000k -f webm -aspect 1 -vf "scale=-1:720, crop=720:720" -bufsize 1500k -quality good -cpu-used 0 -qmin 10 -qmax 42 -c:a libvorbis -threads 8 "${0%%.mp4}.webm"' {} \; | |
#find "$VIDEOS" -name '*.mp4' -exec sh -c 'ffmpeg -i "$0" -aspect 1 -vf "scale=-1:720, crop=720:720" -quality good -cpu-used 0 -threads 8 "${0%%.mp4}_720p.mp4"' {} \; | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment