Wagen – turn audio files into waveform videos (Rust + ffmpeg)

hey folks :waving_hand:

i made a small open source tool called wagen (wavegen) that turns audio files into waveform videos.

repo: GitHub - ledongthuc/wagen: Turns your audio files into waveform videos · GitHub

mp3/flac/wav/etc → waveform animation → mp4 video

you throw in a song, it renders those moving audio bars/waves (think old winamp visualizers), then outputs an mp4 with the original audio attached.

example:

cargo run --release -- -i song.mp3

under the hood it:

  • decodes audio using symphonia
  • renders raw RGB frames in memory
  • pipes frames directly to ffmpeg
  • outputs h264/aac mp4

no temp pngs, no intermediate files, just streaming frames into ffmpeg.

you can tweak FPS, resolution, bar width, waveform window, etc.

made it mostly because i wanted a simple CLI tool for generating music visualizer videos without opening a video editor.

would love feedback, ideas, bug reports, or feature suggestions :raising_hands:

Do you have a screen shot of the resulting videos?

Thank you for the link to symphonia, indeed it's a cool library, and even cooler for me because it doesn't support DSD formats as dff, dsf, and iso SACD images. Not a big deal though, because I am working on conversion my Java DSD library to Rust, so maybe soon you will enrich your visializer. Regarding using clap, I am currently in the middle of writing an article how to get rid of clap, so a little patience. Thanks again for the wonderful tool.

Hi @ZiCog, I attach the screenshoot of resulting video. I think your comment is useful, I will attach to the README also.
Ideally, it's tool for me to use barcode in my biz, but I think maybe someone need it also, so I public it.