You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exit code -1073741571 (0xC00000FD) when writing OGG files in-memory #466
I'm trying to make function that attempts to convert audio file to Vorbis OGG without losing quality, however every time I call sf.write(format="ogg") or sf.write(format="ogg", subtype="vorbis") on my audio data, I get exit code -1073741571 (0xC00000FD).
Here's my function:
def attempt_convert_to_vorbis(audio_data: np.ndarray, samplerate: int, uses_librosa_format: bool) -> None | bytes:
if uses_librosa_format:
audio_data = audio_data.T
vorbis_buffer = io.BytesIO()
for i in range(0, 101):
print(f"{i}%.")
sf.write(vorbis_buffer, audio_data, samplerate, format="ogg", subtype="vorbis", compression_level=0.01*i)
print("Wrote Vorbis data to buffer.")
vorbis_buffer.seek(0)
vorbis_data, _ = sf.read(vorbis_buffer)
print("Read Vorbis data from buffer.")
if np.array_equal(audio_data, vorbis_data):
print("Vorbis data is identical to original.")
return vorbis_buffer.read()
return None
Activity
bastibe commentedon Jul 28, 2025
This is likely a crash in libsndfile. Please open an issue on their end.
Wonderxin commentedon Aug 23, 2025
我遇到了同样的问题,我发现写入ogg格式时,只要采样频率大于22050hz就会报这个溢出错误,我无法定位到具体位置
16k数据可以写入成功
bastibe commentedon Oct 15, 2025
Please write in English