我想使用此命令生成波形:
ffmpeg -i video.mp4 -filter_complex \
"[0:a]aformat=channel_layouts=mono,showwavespic=s=600x200,colorkey=black,colorchannelmixer=rr=156/255:gg=244/255:bb=47/255[fg]; \
color=s=600x200:color=#44582c,drawgrid=width=iw/10:height=ih/5:color=#[email protected][bg]; \
[bg][fg]overlay=format=rgb" -frames:v 1 output.png
然后使用裁剪
ffmpeg -i output.png -vf "crop=600:40:0:80" output-cropped.png
如何在单个 ffmpeg(最新 git:版本 N-80640-gf573acc)调用中将两者结合起来?
答案1
使用
ffmpeg -i video.mp4 -filter_complex \
"[0:a]aformat=channel_layouts=mono,showwavespic=s=600x200,colorkey=black, \
colorchannelmixer=rr=156/255:gg=244/255:bb=47/255[fg]; \
color=s=600x200:color=#44582c,drawgrid=width=iw/10:height=ih/5:color=#[email protected][bg]; \
[bg][fg]overlay=format=rgb,crop=600:40:0:80" -frames:v 1 output-cropped.png