I\'m trying to draw a waveform from a raw audio file. I demuxed/decoded an audio file using FFmpeg and I have those informations: samples buffer, the size of the samples buffer,
ffmpeg
can draw a waveform with the showwavespic filter.
ffmpeg -i input -filter_complex "showwavespic=split_channels=1" output.png
See showwavespic filter documentation for options.
You can also make a video of the live waveform with the showwaves filter.
ffmpeg -i input -filter_complex \
"showwaves=s=600x240:mode=line:split_channels=1,format=yuv420p[v]" \
-map "[v]" -map 0:a -movflags +faststart output.mp4
See showwaves filter documentation for options.