Using hex colors with ffmpeg's showwaves

99封情书 提交于 2021-01-28 10:42:07

问题


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

回答1:


See https://ffmpeg.org/ffmpeg-utils.html#Color for syntax. In short, it is colors=0xRRGGBB or colors=#RRGGBB. Rest looks fine.



来源:https://stackoverflow.com/questions/45885460/using-hex-colors-with-ffmpegs-showwaves

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!