使用
ffmpeg
,我们对音频水平有多少控制权?例如,我想在程序的时间轴上映射一个“M”形:t0 - t1 : fade in from 0 to 1
t1 - t2 : play at full volume
t2 - t3 : fade out to 25%
t3 - t4 : play at 25% volume
t4 - t5 : fade in (from 25%) to full volume
t5 - t6 : play at full volume
t6 - t7 : fade out from 1 to 0
这个能做到吗?我已经尝试了淡入淡出和音量的组合,以及使用时间轴编辑,但目前为止都没有成功。
这里有一个接近的例子:
ina="infile.caf"
out="outfile.mp3"
time ffmpeg -i $ina -af \
"afade=enable='between(t,0,3)':t=in:ss=0:d=3, \
afade=enable='between(t,7,8)':t=out:st=7:d=1, \
volume=enable='between(t,8,12)':volume=.25:eval=frame, \
afade=enable='between(t,12,13)':t=in:st=12:d=1, \
afade=enable='between(t,15,18)':t=out:st=15:d=3" \
$out
.. 但在两个中间点(淡出到25%和淡入到全音量时)会出现故障 - 可听到声音的点击。