Closed lostanlen closed 3 years ago
@dbetchkal feel free to make a PR if you have the time! otherwise i'll triage it for 0.6+
A solution proposed by Dan Stowell on the BirdVox mailing list
I have a geeky method for MP3 support for long files. It works in Linux/Mac only - and it's geeky. But here it is, in case any of you benefit from it:
In order to read a long-duration MP3 file into BirdVoxDetect (or any other WAV-streaming analysis), you can create a "unix pipe" and use it together with an MP3 decoder command such as lame or sox. This will feed the MP3 into your software without occupying any disk space.
In a new terminal window, run these 3 lines (replacing MYMP3PATH):
fifo=/tmp/mp3decoding01.fifo mkfifo $fifo lame --decode --silent MYMP3PATH $fifo
Then in Python, treat /tmp/mp3decoding01.fifo as if it was a wave file to be read into BirdVoxDetect. No extra disk space is needed, it's all on-the-fly.
This can't be done in Windows, I think.
Feel free to re-open this issue if anyone needs to run BVD on MP3 files on Windows.
Requested by Davyd Betchkal
Pasting Justin Salmon's reply here: