Conversion Script from MP4 to WebM in good quality
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/sh | |
set -ex | |
for i in *.mp4; do | |
ffmpeg -y -i "$i" -c:v libvpx-vp9 -pass 1 -b:v 2M -crf 30 -threads 8 -speed 4 \ | |
-pix_fmt yuv420p -tile-columns 6 -frame-parallel 1 \ | |
-an -f webm /dev/null | |
ffmpeg -i "$i" -c:v libvpx-vp9 -pass 2 -b:v 2M -crf 30 -threads 8 -speed 2 \ | |
-pix_fmt yuv420p -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 \ | |
-c:a libopus -ac 2 -b:a 128k -f webm $(basename "${i/.mp4}").webm | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment