直接给批处理文件吧,批处理文件和要加的水印logo.png
放在同级目录,默认水印左下角。
ffmpeg 的参数我就不多说了,因为我也是边查边用的。
chcp 65001 @echo off setlocal EnableDelayedExpansion
set inputDir=./adobe教程
set dirname=adobe教程 set num=1 echo start!!! for /r %inputDir% %%i in (*.mp4) do ( if not exist "!a:\%dirname%\=\output\!" MD "!a:\%dirname%\=\output\!" echo 创建【"!a:\%dirname%\=\output\!"】目录 if not exist "!a:%dirname%=output!%%~nxi" ffmpeg -c:v h264_cuvid -i %%i -i ./logo.png -filter_complex overlay=x=0:y=main_h-overlay_h -c:v h264_nvenc -b:v 1M -minrate 1M -maxrate 1M -bufsize 128k "!a:%dirname%=output!%%~nxi" -y echo ============================================================================= echo =======【!a:%dirname%=output!%%~nxi】=========== echo ========================第!num!个完成-【%%~nxi】============================== echo ============================================================================== set /A num+=1 ) pause
|