0

This is the command that I run:

ffmpeg -y -i source_file.wav -loop 1 -i image.jpg -filter_complex "[0:a]showwaves=s=1920x175:colors=White:mode=line,format=yuv420p[v];[1:v][v]overlay=0:1000[outv]" -map "[outv]" -pix_fmt yuv420p -map 0:a -c:v libx264 -c:a aac -shortest output9.mp4

The output video looks like this:

enter image description here

As you can see behind the visualization of the amplitude is a black box. Is it possible to make this box transparent so that the visualization is overlayed directly on the video?

2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Mar 19, 2022 at 9:30
  • video.stackexchange.com/questions/27868/… Should get you there Mar 19, 2022 at 11:52

1 Answer 1

0

Add format=rgba after the showwaves filter:

ffmpeg -y -i source_file.wav -loop 1 -i image.jpg -filter_complex "[0:a]showwaves=s=1920x175:colors=White:mode=line,format=rgba[v];[1:v][v]overlay=0:1000[outv]" -map "[outv]" -pix_fmt yuv420p -map 0:a -c:v libx264 -c:a aac -shortest output9.mp4

  • The format filter converts the output of showwaves to RGBA pixel format, and the alpha channel of the "black" background is zero (fully transparent).
  • The overlay filter overlays the showwaves result (with the transparent background) over the JPEG image.
    The output is converted to yuv420p pixel format (without transparency).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .