-
Notifications
You must be signed in to change notification settings - Fork 1
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
Reading mp4 vs wav #1
Comments
@gjkunde I’m not sure if this is caused by librosa but I remember that some versions of the FFMPEG decoder for the MPEG-4 ALS had a bug decoding it. Could you please try to extract the mp4 file using the official MPEG-4 ALS decoder? The source code in the mp4alsRM25.zip is a reference software for MPEG-4 Audio Lossless Coding. |
Hi @gjkunde, Thank you for your interest. I tried to reproduce the issue and partially could. Thanks! The followings are the logs that I tried. >>> import numpy as np
>>> import librosa
>>> librosa.__version__
'0.10.0.post2'
>>> from librosa.core.audio import __audioread_load
>>> sig, sr = __audioread_load('/hdd/datasets/ToyADMOS2/ToyTrain/normal/TN001-carA1-speed1_mic1_00001.mp4', offset=0.0, duration=None, dtype=np.float32)
<stdin>:1: FutureWarning: librosa.core.audio.__audioread_load
Deprecated as of librosa version 0.10.0.
It will be removed in librosa version 1.0.
>>> len(sig)
576000 The older versions are fine. >>> import numpy as np
>>> import librosa
>>> librosa.__version__
'0.8.1'
>>> from librosa.core.audio import __audioread_load
>>> sig, sr = __audioread_load('/lab/data/toy21/ToyADMOS2/ToyTrain/normal/TN001-carA1-speed1_mic1_00001.mp4', offset=0.0, duration=None, dtype=np.float32)
>>> len(sig)
576000
>>> import librosa
>>> librosa.__version__
'0.9.2'
>>> from librosa.core.audio import __audioread_load
>>> sig, sr = __audioread_load('/hdd/datasets/ToyADMOS2/ToyTrain/normal/TN001-carA1-speed1_mic1_00001.mp4', offset=0.0, duration=None, dtype=np.float32)
>>> len(sig)
576000 |
I am attempting to read the new data set with the mp4 files, while this code snippet from mixer.py
sig, sr_sig = __audioread_load(filename, offset=0.0, duration=None, dtype=np.float32)
returns an array of values with length 242550 for the ToyAMOS1 wav files, it only returns the sample
rate of 48,000 for the mp4 files but the length of sig is 0 and there is a warning warning:
/var/folders/mv/qbxkzz3d5zj4dh3wmt30cpfh000r_w/T/ipykernel_55465/1690306295.py:1: FutureWarning: librosa.core.audio.__audioread_load
Deprecated as of librosa version 0.10.0.
It will be removed in librosa version 1.0.
The text was updated successfully, but these errors were encountered: