python-soundfile
python-soundfile copied to clipboard
[src/libmpg123/layer3.c:INT123_do_layer3():1771] error: part2_3_length (1920) too large for available bit count (1568)
trafficstars
I'm trying to read a chunk from a 5 min mp3 file using the following code:
import soundfile as sf
original_sr = 22050
start_frame = int(3*original_sr)
stop_frame = int(4.1*original_sr)
audio, sr = sf.read(mp3_path, start=start_frame, stop=stop_frame)
But i got this message:
[src/libmpg123/layer3.c:INT123_do_layer3():1771] error: part2_3_length (1920) too large for available bit count (1568)
Is there a way to ignore it?
These messages come from inside libmpg123, which is inside libsndfile, called by soundfile. You can try opening an issue in either of these libraries and inquire about disabling the messages there. But the message is probably given for a reason, which is probably a defective MP3 file.