summaryrefslogtreecommitdiff
path: root/dot/local/bin/webencode
blob: d471d33443126c4da736bf868a9ee1cb896dfc93 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
CODEC='-c:a aac -c:v libx264'
INPUT=$1
case $# in
    1) OUTPUT=${INPUT%.*}.web.mp4 ;;
    2) OUTPUT=$2 ;;
    *) echo "Usage: $0 <input> [output]" >&2; exit 1 ;;
esac
exec ffmpeg ${DEBUG:+ -v debug} -hide_banner -i "$INPUT" $CODEC "$OUTPUT"