Batch convert mp4 to webm using ffmpeg
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
for i in *.mp4; | |
do name=`echo "$i" | cut -d'.' -f1` | |
echo "$name" | |
ffmpeg -i "$i" -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 "${name}.webm" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
batch-convert-mp4-webm.sh
(Link)$PATH
(e.g.~/bin
)chmod +x batch-convert-mp4-webm.sh
)cd
to the directory with the mp4 filesbatch-convert-mp4-webm.sh
)Note:
ffmpeg
must be available in your environment$PATH
.