Wednesday, September 21, 2016

ffmpeg transcode bash example

#!/bin/sh
# [-map 0:... -map 0:...]
FFMPEG="${HOME}/ffmpeg-3.0.2/ffmpeg"
INPUT_FN="$1"
OUTPUT_FN="$2"
shift 2
time "$FFMPEG" -strict -2 -i "$INPUT_FN" "$@" -c:v nvenc_h264 -preset slow -b:v 2000k -ac 2 -c:a libmp3lame -b:a 128k -c:s  copy "$OUTPUT_FN"

No comments: