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

Convert from OGG files? #66

Closed MileanCo closed 6 years ago

MileanCo commented 6 years ago

Hi, is there any extension of this software to convert waveforms from OGG files? It seems this only supports WAV and MP3 right now. Any ideas are appreciated!

thom4parisot commented 6 years ago

You could use oggdec to convert OGG to WAV. It seems to be part of the vorbis-tools Ubuntu package.

oggdec -o test.wav test.ogg
audiowaveform -i test.wav -o test.dat -z 256 -b 8

64 would definitely help to do that without creating an intermediate WAV file:

oggdec test.ogg | audiowaveform -i - -o test.dat -z 256 -b 8
chrisn commented 6 years ago

@MileanCo audiowaveform uses libsndfile to decode the audio, so in principle OGG support could be added relatively easily. I'll be happy to review a pull request.

MileanCo commented 6 years ago

@chrisn that would be amazing! Im using this library to process some audio with automation and it needs to happen as fast as possible, so converting to wav as an intermediate step is not going to work for me. Thanks for the idea though @oncletom !

chrisn commented 6 years ago

@MileanCo Please take a look at v1.2.1 and let me know if there are any issues.