-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting Wav to Flac introduces strange artifacts. #265
Comments
Does this happen only when converting to FLAC, or does it affect other formats as well? If it only happens with FLAC, I am inclined to say that it is caused by the underlying C library libsndfile. |
I tried it again with AIFF and there were no artifacts. The problem seems to be exclusive to FLAC, although I did not try every other format. I recall having the same issue when I used pydub with libav, but I don't know if that's relevant. I also found this, but I do not know if this is related. Please let me know what you think. Please let me know if you find out anything else based on this information. Thanks. |
Could be the same issue. I don't know. If so, a cursory reading of the issue seems to suggest that flac has issues with data <= -1 or > 1. Is that the case for you? Either way, though, it is unlikely that there is a solution to the problem this side of libsndfile. Sorry. |
Is there any update on this bug with FLAC audio file I/O in soundfile? I just got bitten by this one too: I then found this issue comment: I think I would prefer if the occasional -1.0 values would end up being -32767/32768 (thus no longer having the ability to have a perfect round-trip), rather than experiencing this sound corruption for a block of several samples in the written FLAC file. |
I started using soundfile to convert .wav files to .flac files, but on occasion, it seems to introduce undesirable artifacts. For example:
results in a flac file with a few popping noises. Here's a video showcasing the waveform:
https://www.youtube.com/watch?v=1Yc20C8FLwk&feature=youtu.be
Here's a pictorial comparison:
test.wav is the source .wav file. Lights.flac was the original .wav converted to .flac using Adobe Audition. out.flac was the original .wav converted to .flac using ffmpeg. test.flac was the original .wav converted to .flac using soundfile (the code above).
As you can see, there are some parts of the song that have additional green sections of the waveform introduced (these are the popping noises that I hear). I don't know what's causing this. I'm on Windows 10 and Python 3.8.2. Same issue in Python 3.7.0. The original .wav file I used for this can be downloaded here: https://soundcloud.com/yumecollective/kamska-lights-yume?in=yumecollective/sets/kamska-lights-yume
The text was updated successfully, but these errors were encountered: