1

I've been actively playing around with ffmpeg for the past few days, and now I want to make an audio visualiser, just with the showwaves filter (I made it white using p2p mode, and I don't want to use a mode that would just fill the wave with white).

The problem with the showwaves filter is that it creates a very thin 1px line which makes it pretty hard to see when it varies really fast. At a low video bitrate it becomes almost invisible.

So I tried several ways to make this thin white line look thicker, including geq to increase alpha values, gblur+increasing contrast. For now I got the most "satisfying" results by making the size of the showwaves 10x smaller and then using scale to make it the size I want. But the result is very pixelated so that's not really suitable. I've also thought of duplicating the wave a lot and displacing the copies around but I don't think it would be very performance-friendly.

So I was wondering whether there is anyway of adding some outline/glow/shadow/anything that would make this line look a bit thicker (like 5px would be enough), or anything else than showwaves that would somehow achieve what I'm looking for.

Thanks

2 Answers 2

2

Use one or more dilation filters after showwaves filter.

1

An example of adding dilation might look like:

ffmpeg -i example_in.mp3 -filter_complex \
"[0:a]showwaves=mode=p2p:s=1280x480:colors=Magenta|Azure|White:r=25; \
 [v]dilation=threshold3=10[v]" \
-map "[v]" -map 0:a -pix_fmt yuv420p \
-b:a 360k -r:a 44100  example_out.mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.