问题描述
我一直在尝试使用ffmpeg的showwaves过滤器创建视频,并整理了以下我理解的命令.我想知道是否可以使用十六进制颜色设置wav表单的颜色.(即#F3ECDA而不是蓝色")另外,请随时告诉我命令中是否有不需要的垃圾.谢谢.
I've been trying to create a video with ffmpeg's showwaves filter and have cobbled together the below command which I sort of understand. I'm wondering if it is possible to set the color of the wav form using hex colors. (i.e. #F3ECDA instead of "blue")Also, feel free to tell me if there's any unneeded garbage in the command as is. Thanks.
ffmpeg -i audio.mp3 -loop 1 -i picture.jpg -filter_complex \
"[0:a]showwaves=s=960x202:mode=cline:colors=blue[fg]; \
[1:v]scale=960:-1,crop=iw:540[bg]; \
[bg][fg]overlay=shortest=1:main_h-overlay_h-30,format=yuv420p[out]" \
-map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a libopus output.col.mkv
推荐答案
请参见 https://ffmpeg.org/ffmpeg-utils.html#Color 了解语法.简而言之,它是 colors = 0xRRGGBB
或 colors =#RRGGBB
.休息看起来不错.
See https://ffmpeg.org/ffmpeg-utils.html#Color for syntax. In short, it is colors=0xRRGGBB
or colors=#RRGGBB
. Rest looks fine.
这篇关于在ffmpeg的showwave中使用十六进制颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!