3 ms·
Convert any video to webm with specified bitrate: $ video2webm 300k myvideo.mp4 othervideo.mpg third.mov function video2webm () { bitrate=$1; sh
by rcdwealth 8y ago
Convert any video to webm with specified bitrate:
$ video2webm 300k myvideo.mp4 othervideo.mpg third.mov
function video2webm () {
bitrate=$1;
shift;
for file in "$@";
do out=${file%.*}.webm;
ffmpeg -y -i "$file" -c:v libvpx-vp9 -b:v $bitrate -pass 1 -speed 4 -c:a libopus -f webm /dev/null && \
ffmpeg -i "$file" -c:v libvpx-vp9 -b:v $bitrate -pass 2 -speed 1 -c:a libopus "$out";
done;
}