c3d2-web/scripts/encode_webm.sh

35 lines
635 B
Bash
Executable File

#!/bin/sh -e
if=$1
of=$2
# No. CPU cores:
threads=4
# Video bitrate:
vb=1600k
# Audio bitrate:
ab=128k
ffmpeg -i "$if" \
-threads $threads \
-f webm \
-an \
-vcodec libvpx \
-b:v $vb \
-pass 1 \
-passlogfile "$of.ffmpeg2pass" \
-y /dev/null
ffmpeg -i "$if" \
-threads $threads \
-f webm \
-metadata:s:a:0 language=deu -metadata language=deu -metadata title="IP-Debugging" -metadata album="Themenabend" -metadata artist="C3D2" -metadata year=2014 \
-acodec libvorbis \
-ab $ab \
-vcodec libvpx \
-b:v $vb \
-pass 2 \
-passlogfile "$of.ffmpeg2pass" \
-y "$of"