[英]FFMPEG Adding TEXT to SOUNDWAVE Video from Audio
I am creating an audio to soundwave video with 我正在创建音频到声波视频
ffmpeg -i input.mp3 -filter_complex "[0:a]showwaves=s=1920x1080:mode=line,format=yuv420p[v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy soundwaves.mp4
I want to add text to the top left corner using an overlay but cannot get the syntax right 我想使用覆盖层将文本添加到左上角,但是语法不正确
ffmpeg -i input.mp3 -filter_complex "[0:a]showwaves=s=1920x1080:mode=line,format=yuv420p[v]; [bg]overlay=0:H-h,drawtext=fontfile=font.ttf:fontcolor=white:x=10:y=10:text='soundwaves'[out]" -map "[out]" -map 0:a -c:v libx264 -c:a copy soundwaves.mp4
What is the correct way to add text to this video? 向该视频添加文字的正确方法是什么?
Use 采用
ffmpeg -i input.mp3 -filter_complex
"[0:a]showwaves=s=1920x1080:mode=line,
drawtext=fontfile=font.ttf:fontcolor=white:x=10:y=10:text='soundwaves',
format=yuv420p[out]"
-map "[out]" -map 0:a -c:v libx264 -c:a copy soundwaves.mp4
The overlay filter is not required here, since you're not overlaying anything. 由于您不叠加任何内容,因此此处不需要叠加过滤器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.