我有一个一直有效的批处理脚本,但是在我格式化并安装 Windows 11 之后它不再起作用,在另一台 Windows 10 机器上尝试过,在那里也不起作用,所以我一定是遗漏了什么东西。
批处理脚本是:
@echo off
mkdir faded
setlocal ENABLEDELAYEDEXPANSION
for %%f in (*.mp4) do (
ffprobe -i "%%f" -show_entries format=duration -v quiet -of csv="p=0" >dur.txt
set /p dur=<dur.txt
del dur.txt
for /f "delims=" %%g in ('powershell !dur!-1') do set fadetime=%%g
ffmpeg -i "%%f" -filter:v "fade=t=in:st=0:d=1, fade=t=out:st=!fadetime!:d=1" -filter:a "afade=t=in:st=0:d=1, afade=t=out:st=!fadetime!:d=1" -c:v libx264 -crf 18 -preset veryslow -ab 160k "faded/%%~nf.mp4"
)
有人知道吗?当我运行它时,它失败了:
> [AVFilterGraph @ 000002943a01ea40] No such filter: '714:d'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:1
> Conversion failed!