Last active
August 29, 2015 14:10
-
-
Save jamjon3/f7a00f2826aaa76cb601 to your computer and use it in GitHub Desktop.
This script converts several video files to royalty free WEBM (using avconv)
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 | |
VIDEOS=~/Desktop/Wedding/ | |
find "$VIDEOS" -name '*.mp4' -exec sh -c 'avconv -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.mp4}.webm"' {} \; | |
find "$VIDEOS" -name '*.mkv' -exec sh -c 'avconv -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.mkv}.webm"' {} \; | |
find "$VIDEOS" -name '*.avi' -exec sh -c 'avconv -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.avi}.webm"' {} \; | |
find "$VIDEOS" -name '*.AVI' -exec sh -c 'avconv -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.AVI}.webm"' {} \; | |
find "$VIDEOS" -name '*.MPG' -exec sh -c 'avconv -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.MPG}.webm"' {} \; | |
find "$VIDEOS" -name '*.wmv' -exec sh -c 'avconv -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.wmv}.webm"' {} \; | |
find "$VIDEOS" -name '*.MOV' -exec sh -c 'avconv -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.MOV}.webm"' {} \; | |
find "$VIDEOS" -name '*.mov' -exec sh -c 'avconv -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.mov}.webm"' {} \; | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment