video background image

wav2png

generate beautiful images from audio files.


The full source code and build instructions are available on GitHub


If you need to generate json files, there's also wav2json.
If you like it, feel free to make a small donation via paypal (not tax deductible). While it is highly appreciated, it is absolutely not necessary to use the software. But a nice gesture nonetheless.

On Mac OS X, there is a little application you can drop your audio files into. The images are either saved in the same directory as the audio file (autosave checkbox) or can be drag'n'droped into photoshop (or what ever). You can select foreground and background colors and set the dimensions of the generated image.

DropletScreenshot

You can supply a foreground and background color in rgba

./wav2png --foreground-color=ffb400aa --background-color=2e4562ff -o ./examples/example0.png music.wav

example0

Transparency works nicely with html.

./wav2png --foreground-color=ffb400aa --background-color=2e4562ff -o ./examples/example1.png baked.wav

example1

You can make the waveform fully transparent and stick another image in the background. Hint: try a gradient here.

./wav2png --foreground-color=00000000 --background-color=2e4562ff -o ./examples/example2.png baked.wav

example2

Or you can just use the foreground color and make the background transparent

./wav2png --foreground-color=2e4562ff --background-color=00000000 -o ./examples/example3.png baked.wav

example3

wav2png also works nicely with short samples…

./wav2png --foreground-color=2e4562ff --background-color=00000000 -o ./examples/example4.png short.wav

example4

…and with very short samples. In this case, the audio file had only 12 samples

./wav2png --foreground-color=2e4562ff --background-color=00000000 -o ./examples/example5.png sine.wav

example5

You can also use decibels as units.

./wav2png --foreground-color=ffb400aa --background-color=2e4562ff -d -o ./examples/example7.png music.wav

example7

And you can supply min and max values when using the db scale to better visualize you content.

./wav2png --foreground-color=ffb400aa --background-color=2e4562ff -d --db-min -40 --db-max 3 -o ./examples/example8.png music.wav

example8

Note, that you can easily adjust the color of the waveform by changing the background behind it. But you can also specify colors via --foreground-color and --background-color.

Also gradient overlays and backgrounds look nice.