McMillanMe
McMillanMe

Reputation: 1

How do you get amplitude of audio file in Android before you play it?

I know we can easily do it when we record it (several ways, actually). But how are we going about getting an amplitude graph from an mp3/ogg file?

As it is now, I see two options: 1. Quickly play it & construct it while its playing 2. Try to do it with ffmpeg (but I really don't want to do NDK)

Are there any other options beside these? Thank you

Upvotes: 0

Views: 2883

Answers (1)

lincollincol
lincollincol

Reputation: 862

You can try to use my library Amplituda which calculate amplitudes from audio and provide it in different formats like json, list of integers and sequences.

If you want to draw a waveform from amplitudes data, you can directly use my WaveformSeekBar library fork in which Amplituda implemented.

Upvotes: 3

Related Questions