Skip to content

Instantly share code, notes, and snippets.

@devopsmariocom
Created August 23, 2014 16:46
Show Gist options
  • Save devopsmariocom/042a245f7e1a3bc681bc to your computer and use it in GitHub Desktop.
Save devopsmariocom/042a245f7e1a3bc681bc to your computer and use it in GitHub Desktop.
Video convert BASH script from mp4 to webm and ogv
#!/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