Skip to content

Instantly share code, notes, and snippets.

@novogrammer
Last active December 3, 2015 11:25
Show Gist options
  • Save novogrammer/4bb36f6185e4868d385c to your computer and use it in GitHub Desktop.
Save novogrammer/4bb36f6185e4868d385c to your computer and use it in GitHub Desktop.
videoタグ用にmp4からwebmやogvを作る
#!/bin/bash
#前提
#brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-theora --with-libogg
function usage(){
cat <<EOT
Usage:
$(basename ${0}) INPUT_MP4_FILE OUTPUT_OGV_FILE
EOT
exit 1
}
if [ $# -eq 2 ];then
ffmpeg -i ${1} -b:v 5M ${2}
else
usage
fi
#!/bin/bash
#前提
#brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-theora --with-libogg
function usage(){
cat <<EOT
Usage:
$(basename ${0}) INPUT_MP4_FILE OUTPUT_WEBM_FILE
EOT
exit 1
}
if [ $# -eq 2 ];then
ffmpeg -i ${1} -f webm -vcodec libvpx -acodec libvorbis -aq 90 -ac 2 -b:v 5M ${2}
else
usage
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment