解决,看看Edit2。
我想创建一个调用此命令的.bat
文件:
ffplay -f lavfi "movie=loud.mp4:s=dv+da[vid][aud];[aud]asplit[aud][out1];[aud]showcqt=1280x720:volume=30:volume2=30,format=argb,colorchannelmixer=aa=0.8[out_v];[vid][out_v]overlay[out0]"
我每次都懒得打字。我需要将上面一行中的loud.mp4
替换为新文件。
cqt "System Shock Soundtrack - 00 - Intro-6CalFsdE4tA.mp4"
我不明白单引号和双引号是如何工作的,以及如何转义文件路径中的空格。
Edit1:我正在尝试这个:
set arg1=%1
ffplay -f lavfi "movie='%arg1%':s=dv+da[vid][aud];[aud]asplit[aud][out1];[aud]showcqt=1280x720:volume=30:volume2=30,format=argb,colorchannelmixer=aa=0.8[out_v];[vid][out_v]overlay[out0]"
并称之为:
cqt "System Shock Soundtrack - 00 - Intro-6CalFsdE4tA.mp4"
但结果是:
Argument 'Shock' provided as input filename, but 'movie='System' was already specified.
真正执行的命令就是这个。请注意movie='"the movie file name.mp4"'
ffplay -f lavfi "movie='"System Shock Soundtrack - 00 - Intro-6CalFsdE4tA.mp4"':s=dv+da[vid][aud];[aud]asplit[aud][out1];[aud]showcqt=1280x720:volume=30:volume2=30,format=argb,colorchannelmixer=aa=0.8[out_v];[vid][out_v]overlay[out0]"
Edit2:这有效,amovie='%~1'
ffplay -f lavfi "amovie='%~1'[aud];[aud]asplit[aud][out1];[aud]showcqt=1280x720:volume=30:volume2=30[out0]"
并呼叫:
cqta "System Shock Soundtrack - 00 - Intro-6CalFsdE4tA.webm"