bbc / audiowaveform

C++ program to generate waveform data and render waveform images from audio files
https://waveform.prototyping.bbc.co.uk
GNU General Public License v3.0
1.94k stars 242 forks source link

Feature request: Ability to have much less samples #41

Open Joshfindit opened 8 years ago

Joshfindit commented 8 years ago

I have files that are 60-500 minutes, and all I need are at most 900 samples.

An example file: 141482 frames, (61:35.856) 3695.856 Even --pixels-per-second 1 gives 22K of JSON data. We can pre-calculate the desired 'pixels-per-second' value (in this example case, it would be roughly --pixels-per-second 0.2165. 500 minutes would be roughly .0267), but audiowaveform seems to only take an integer.

Blue-sky, it would be great to have a '--desired-samples` that uses the first frame, the last frame, and calculates the spacing needed to reach the right number of frames, but that feels like a complex ask. :)

swordsreversed commented 8 years ago

+1

chrisn commented 8 years ago

audiowaveform computes the data you need in order to output PNG images, but I'd need to give some thought to the command-line interface for it to output JSON or binary data instead: --start, --end, and --width get us most of the way there...

timobehrens commented 5 years ago

+1