-
Notifications
You must be signed in to change notification settings - Fork 4
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
Possible new FLAC problem with FL Solar BARs #329
Comments
OK, this might be affecting a larger range of people. We've had reports of this causing indefinite hangs in python programs Two more sample files: https://api.acousticobservatory.org/audio_recordings/590000/original (log file: https://api.acousticobservatory.org/audio_recordings/588000/original |
I ran ffmpeg to convert the files, to see if it's decoder could get anywhere. It looks like it stops at the same point the flac decoder does and emits just the So for the 588000 file above:
Theory A:Could be a compound issue? Last frame invalid plus FL010 Theory B:Could be an incorrect FL010 application. If we applied the modern FL010 fix algorithm that counts frames does the problem go away?
Looking at a spectrogram, the last bytes of the file don't appear to WAVE samples so that discounts at FL011 (partial flac encoding problem) Python code that hits a snag with the files import soundfile
def load_audio(path, offset_s, window_size_s):
with epath.Path(ap).open('rb') as f:
sf = soundfile.SoundFile(f)
offset = int(offset_s * sf.samplerate)
window_size = int(window_size_s * sf.samplerate)
audio = sf.read(offset + window_size)
audio = audio[offset:offset + window_size]
return audio
with concurrent.futures.ThreadPoolExecutor(max_workers=1) as executor:
print(len(sf) / sf.samplerate / 60, flush=True)
for i in range(120):
print(i, flush=True)
future = executor.submit(load_audio, ap, i * 60, 10)
audio = future.result(timeout=5)
audio, sr = librosa.load(ap, sr=None)
print(audio.shape) |
https://data.acousticobservatory.org/audio_recordings/802072
flac-decoding-bug.mp4
It looks like most of the file is valid until the very last frames.
It's not much of a bug, but it might be enough to cause some problems.
Reported by @ninascarpelli
The text was updated successfully, but these errors were encountered: