ffmpeg encoding with x265 libfdk_aac

ffmpeg \
-i $INPUT \
-vf $CROP \
-vf nlmeans \
-c:v libx265 -preset slower -crf 25 \
-c:a libfdk_aac -vbr 3 -ac 6 \
-ss 00:05:00 -t 00:00:30 \
output.mkv




INPUT=some_file.mkv
CROP=`ffmpeg -i $INPUT -t 1 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1`



Crop detection

http://stackoverflow.com/questions/17265381/ffmpeg-get-value-from-cropdetect

ffmpeg -i input -t 1 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1


ffmpeg -i input -vf $cropvalue,scale=240:-1 -vframes 1 -qscale:v 2 output.jpg

Comments