Created
September 26, 2012 21:16
-
-
Save mrpollo/3790637 to your computer and use it in GitHub Desktop.
Convert to video HTML5
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 | |
| ffmpeg=/usr/local/bin/ffmpeg | |
| for f in *.mp4 | |
| do | |
| echo "Converting $f into webm" | |
| $ffmpeg -i "$f" -b 1500k -vcodec libvpx -acodec libvorbis -ab 55000 -f webm -g 30 -s 1280x720 "$f".webm | |
| echo "Converting $f into ogv" | |
| $ffmpeg -i "$f" -b 1500k -vcodec libtheora -acodec libvorbis -ab 55000 -g 30 -s 1280x720 "$f".ogv | |
| echo "Converting $f into mp4" | |
| $ffmpeg -i "$f" -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 -s 1280x720 "$f".1280_720.mp4 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment