Created
August 23, 2014 16:46
-
-
Save devopsmariocom/042a245f7e1a3bc681bc to your computer and use it in GitHub Desktop.
Video convert BASH script from mp4 to webm and ogv
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
#!/bin/bash | |
command -v ffmpeg >/dev/null 2>&1 || { | |
echo -e "FFmpeg is missing, Run\n$ brew install ffmpeg --with-libvpx --with-libtheora\nto install it on you Mac" >&2; | |
exit 1; | |
} | |
ffmpeg -i "$1" -c:v libvpx -qscale:v 0 "${1%%.mp4}.webm" | |
ffmpeg -i "$1" -c:v libtheora -qscale:v 0 "${1%%.mp4}.ogv" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment