1

I want to generate audio waveform data in flutter app with flutter-ffmpeg wrapper which is already available and working fine.

flutter-ffmpeg

Below mentioned post describes how to draw the waveform data in flutter app with canvas. It uses precalculated data server side. It also mentions that ffmpeg can be used to generate data.

Precalculated Data

Drawing waveforms

How to get audio peaks with ffmpeg in json format or as an array or some other formats with can later be used to draw waveform.

PS - I am completely new to ffmpeg and audio processing.

  • The same article says that you could use [audiowaveform](https://github.com/bbc/audiowaveform) and shows an example. Why do you want to use ffmpeg? – Hernán Alarcón Jan 07 '21 at 19:59
  • I want to integrate ffmpeg in flutter app for which flutter-ffmpeg is already available. If there is some easy way to integrate audiowaveform in flutter app then let me know. I just want to get audiopeaks/data in some json or txt or array like structure. – Sagar Kardani Jan 08 '21 at 03:05
  • Check [this](https://trac.ffmpeg.org/wiki/Waveform#SingleChannel). It explains how to use ffmpeg obtain a binary output from an audio that can be used to draw waveforms. A binary output is smaller than using JSON or plain text and as long as you can read bytes from a standard output or file you should be able to use it. Note that [audiowaveform uses 100 per second by default](https://github.com/bbc/audiowaveform#--pixels-per-second-zoom-default-100) instead of the 8000 shown in the ffmpeg wiki. – Hernán Alarcón Jan 08 '21 at 03:45
  • 1
    For anyone still looking for generic answer to this. [Check this](https://stackoverflow.com/a/32276471/6057361). It explains how to extract json or text waveform data using ffprobe. – Mubashir AR Dec 07 '22 at 09:31

0 Answers0