blob: f1e06b5dc4019f11f6851a084e91a0fdc73ef366 (
plain)
- #!/bin/sh
- set -eu
- INPUT=$1
- OUTPUT=${2:-${1%.*}.nut}
- case $INPUT in
- *.dv) DEINT=yadif;;
- esac
- case ${OUTPUT##*.} in
- nut) AENCODE="-codec:a flac"; VENCODE="-codec:v huffyuv";;
- mkv) AENCODE="-codec:a flac"; VENCODE="-codec:v libvpx-vp9 -lossless 1";;
- mp4) AENCODE="-codec:a libopus -b:a 192k"; VENCODE="-codec:v libx264 -crf 1";;
- webm) AENCODE="-codec:a libopus -b:a 192k"; VENCODE="-codec:v libvpx-vp9";;
- esac
- mkdir -p "$(dirname "$OUTPUT")"
- ffmpeg -hide_banner -threads auto -y -i "$INPUT" -vf ${DEINT:+$DEINT,}format=pix_fmts=yuv420p $AENCODE $VENCODE "$OUTPUT"
|