Algorithm to draw waveform from audio

后端 未结 7 1155
不思量自难忘°
不思量自难忘° 2021-01-31 12:06

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,

7条回答
  •  孤街浪徒
    2021-01-31 12:39

    showwavespic

    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.

    showwaves

    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.

提交回复
热议问题