Last active
December 3, 2015 11:25
-
-
Save novogrammer/4bb36f6185e4868d385c to your computer and use it in GitHub Desktop.
videoタグ用にmp4からwebmやogvを作る
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 | |
#前提 | |
#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 |
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 | |
#前提 | |
#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