Skip to content
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

CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1 #775

Open
udita1903 opened this issue Jan 28, 2024 · 0 comments
Open

Comments

@udita1903
Copy link

I have about 3000 audio files all of whose extensions were changed to .wav.
I tried using pydub to load the audio file using 'from_file' and 'from_file_using_temporary_files` but it hasn't worked so far

This is the error that it keeps throwing

CouldntDecodeError Traceback (most recent call last)
Cell In[8], line 2
1 # sound = AudioSegment.from_file(src)
----> 2 sound = AudioSegment.from_file_using_temporary_files(src)
3 sound.export(dst, format="wav")

File ~/audioenv/lib/python3.10/site-packages/pydub/audio_segment.py:624, in AudioSegment.from_file_using_temporary_files(cls, file, format, codec, parameters, start_second, duration, **kwargs)
622 try:
623 if p.returncode != 0:
--> 624 raise CouldntDecodeError(
625 "Decoding failed. ffmpeg returned error code: {0}\n\nOutput from ffmpeg/avlib:\n\n{1}".format(
626 p.returncode, p_err.decode(errors='ignore') ))
627 obj = cls._from_safe_wav(output)
628 finally:

CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Output from ffmpeg/avlib:

ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
...
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
/tmp/tmpym2m6l98: Invalid data found when processing input
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant