|
转自tlf论坛,抛砖莹玉,保存为xxx.bat,源文件拖入处理
@echo off
cd/d "%~dp0"
call :a %*
goto :end
:a
if "%~1"=="" goto :eof
ffmpeg -i "%~1" -vcodec libx264 -profile high -preset slower -crf 20 -s 848x476 -bf 5 -deblock -1:-1 -aq-strength 0.8 -psy-rd 1.1:0.15 -mbtree 0 -chromaoffset 1 -fast-pskip 0 -acodec libvo_aacenc -ac 2 "%~dpn1_Temp.mkv"
ren "%~dpn1_Temp.mkv" "%~n1_ok.mkv"
shift&goto :a
:end
;w 裁切后的宽度, h 裁切后的高度
;(x,y) 裁切框左上角的座标
;FFmpeg 使用上有个优点就是 Resize、Crop 可以给方程式让它自己计算
;以下看看就算了,只是一点小技巧,不一定要懂
;Ex. 1. 左裁8, 右裁16, 上裁32, 下裁64, iw ih 代表处理前的宽高
;-vf crop='iw-8-16:ih-32-64:8:32'
;Ex. 2. 左裁8, 右裁16, 上裁32, 下裁64, iw ih 代表处理前的宽高
;-vf crop='iw-24:ih-96:8:32'
|
|