<p>An example of adding <a href="https://ffmpeg.org/ffmpeg-filters.html#toc-dilation" rel="nofollow noreferrer">dilation</a> might look like:</p>
<pre><code>ffmpeg -i example_in.mp3 -filter_complex \
&quot;[0:a]showwaves=mode=p2p:s=1280x480:colors=Magenta|Azure|White:r=25; \
 [v]dilation=threshold3=10[v]&quot; \
-map &quot;[v]&quot; -map 0:a -pix_fmt yuv420p \
-b:a 360k -r:a 44100  example_out.mp4
</code></pre>

CC BY-SA 4.0
2021-05-09T18:38:44.117Z
2021-05-09T18:38:44.117Z
MikeiLL
<p>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 <code>showwaves</code> 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).</p>

<p>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.</p>

<p>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. </p>

<p>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.</p>

<p>Thanks</p>

<ffmpeg><filter>
ffmpeg - Make a white line look thicker
Cyxo
# ffmpeg - Make a white line look thicker

(Asked by: username_0 on 2019-08-24)

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

**Tags:** ffmpeg, filter


---

## 1 answers

### Answer by username_1 on 2021-05-09. Score: 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


---

