How can I create a waveform image of an MP3 in Linux?

前端 未结 7 1096
旧时难觅i
旧时难觅i 2021-02-01 21:03

Given an MP3 I would like to extract the waveform from the file into an image (.png)

Is there a package that can do what I need ?

7条回答
  •  伪装坚强ぢ
    2021-02-01 21:42

    You might want to consider audiowaveform from the BBC.

    audiowaveform is a C++ command-line application that generates waveform data from either MP3, WAV, or FLAC format audio files. Waveform data can be used to produce a visual rendering of the audio, similar in appearance to audio editing applications.

    Waveform data files are saved in either binary format (.dat) or JSON (.json). Given an input waveform data file, audiowaveform can also render the audio waveform as a PNG image at a given time offset and zoom level.

    The waveform data is produced from an input stereo audio signal by first combining the left and right channels to produce a mono signal. The next stage is to compute the minimum and maximum sample values over groups of N input samples (where N is controlled by the --zoom command-line option), such that each N input samples produces one pair of minimum and maxmimum points in the output.

    https://github.com/bbcrd/audiowaveform

提交回复
热议问题