python-soundfile
python-soundfile copied to clipboard
Writing to ogg crashes Python
Windows 10 x64, Python 3.8.1. PySoundFile installed with pip install pysoundfile.
With Python's interactive interpreter from the command line (directly typing python in cmd), I opened an ogg file (about 37 seconds long, sample rate 48000, 6 channels), and wrote the same data back to another ogg. This caused python to exit without printing any error message. Writing the same data to a wav file does not cause any error whatsoever.
If there is any other information I need to provide to help solve the issue, please let me know :-/
Try installing pip install soundfile instead, which is the current and correct version.
If the problem persists, could you upload that ogg file somewhere so we can have a look?
Problem persists. https://drive.google.com/open?id=1NpRpaugoo98U8cCmb7EgCETLeKennxaw
Does the problem occur for any kind of ogg file, or is it specific to this data or sample rate or number of channels?
At any rate, this problem is likely a bug in libsndfile, not SoundFile.
I have such a crash only when I compile my Qt application with cx_freeze and then try to write an .ogg file. Other file types write without problems. Also if I run my application as a script in the interpreter, no crashes, writes .ogg just fine.
This sounds like there is a conflict between a version of libvorbis loaded by Qt and by libsndfile. Conflicts such as these are colloquially known as "DLL Hell". Essentially, C libraries export a list of symbols (functions, constants, etc), and if you load a C library twice, only one set of symbols can be active. If you load two different versions of the library, you have a problem.