Last active
June 19, 2018 20:26
-
-
Save karltaylor/240b750a18149e981e2d90efc720aeda to your computer and use it in GitHub Desktop.
Bash script to scale, convert and compress videos within a directory to .webm
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
for file in *.mp4; do ffmpeg -i "$file" -filter:v scale=1080:-1 -acodec libvorbis -ac 2 -b:v 5000k "${file%.mp4}".webm; done |
ffmpeg -i input.mp4 -filter:v scale=1080:-1 -acodec libvorbis -ac 2 -b:v 5000k output.webm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
install
ffmpeg
with the relevant codecs usinghomebrew