[GH-ISSUE #1108] module ffmpeg has no attribute input #734

Closed
opened 2026-10-20 10:02:27 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @NatoBoram on GitHub (Aug 27, 2023).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1108

When clicking on Process data, we get this error:

No supported Nvidia GPU found
use cpu instead
Use Language: en_US
Running on local URL:  http://0.0.0.0:7865
"/home/nato/.asdf/installs/python/3.10.13/bin/python" trainset_preprocess_pipeline_print.py "/home/nato/Music/AI/RVC/" 40000 8 "/opt/rvc/logs/plankton" False
['trainset_preprocess_pipeline_print.py', '/home/nato/Music/AI/RVC/', '40000', '8', '/opt/rvc/logs/plankton', 'False']
start preprocess
['trainset_preprocess_pipeline_print.py', '/home/nato/Music/AI/RVC/', '40000', '8', '/opt/rvc/logs/plankton', 'False']
/home/nato/Music/AI/RVC//plankton_vocals_demucs.mp3->Traceback (most recent call last):
  File "/opt/rvc/lib/audio.py", line 14, in load_audio
    ffmpeg.input(file, threads=0)
AttributeError: module 'ffmpeg' has no attribute 'input'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/rvc/trainset_preprocess_pipeline_print.py", line 79, in pipeline
    audio = load_audio(path, self.sr)
  File "/opt/rvc/lib/audio.py", line 19, in load_audio
    raise RuntimeError(f"Failed to load audio: {e}")
RuntimeError: Failed to load audio: module 'ffmpeg' has no attribute 'input'

end preprocess
start preprocess
['trainset_preprocess_pipeline_print.py', '/home/nato/Music/AI/RVC/', '40000', '8', '/opt/rvc/logs/plankton', 'False']
/home/nato/Music/AI/RVC//plankton_vocals_demucs.mp3->Traceback (most recent call last):
  File "/opt/rvc/lib/audio.py", line 14, in load_audio
    ffmpeg.input(file, threads=0)
AttributeError: module 'ffmpeg' has no attribute 'input'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/rvc/trainset_preprocess_pipeline_print.py", line 79, in pipeline
    audio = load_audio(path, self.sr)
  File "/opt/rvc/lib/audio.py", line 19, in load_audio
    raise RuntimeError(f"Failed to load audio: {e}")
RuntimeError: Failed to load audio: module 'ffmpeg' has no attribute 'input'

end preprocess

How to reproduce

Install deps

asdf install python 3.10.13
asdf local python 3.10.13
pip install --upgrade pip
pip install --upgrade torch torchvision torchaudio
cat requirements-dml.txt | xargs -I _ pip install _
python infer-web.py

Click on Process data

image

System information

OS: Pop!_OS 22.04 LTS x86_64 
Host: MS-7D53 1.0 
Kernel: 6.4.6-76060406-generic 
Shell: zsh 5.8.1 
CPU: AMD Ryzen 5 5600X (12) @ 3.700GHz 
GPU: AMD ATI Radeon RX 6700/6700 XT / 6800M 
Memory: 32007MiB 
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
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Hyper fast Audio and Video encoder
Python 3.10.13
Originally created by @NatoBoram on GitHub (Aug 27, 2023). Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1108 When clicking on **Process data**, we get this error: ```py No supported Nvidia GPU found use cpu instead Use Language: en_US Running on local URL: http://0.0.0.0:7865 "/home/nato/.asdf/installs/python/3.10.13/bin/python" trainset_preprocess_pipeline_print.py "/home/nato/Music/AI/RVC/" 40000 8 "/opt/rvc/logs/plankton" False ['trainset_preprocess_pipeline_print.py', '/home/nato/Music/AI/RVC/', '40000', '8', '/opt/rvc/logs/plankton', 'False'] start preprocess ['trainset_preprocess_pipeline_print.py', '/home/nato/Music/AI/RVC/', '40000', '8', '/opt/rvc/logs/plankton', 'False'] /home/nato/Music/AI/RVC//plankton_vocals_demucs.mp3->Traceback (most recent call last): File "/opt/rvc/lib/audio.py", line 14, in load_audio ffmpeg.input(file, threads=0) AttributeError: module 'ffmpeg' has no attribute 'input' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/rvc/trainset_preprocess_pipeline_print.py", line 79, in pipeline audio = load_audio(path, self.sr) File "/opt/rvc/lib/audio.py", line 19, in load_audio raise RuntimeError(f"Failed to load audio: {e}") RuntimeError: Failed to load audio: module 'ffmpeg' has no attribute 'input' end preprocess start preprocess ['trainset_preprocess_pipeline_print.py', '/home/nato/Music/AI/RVC/', '40000', '8', '/opt/rvc/logs/plankton', 'False'] /home/nato/Music/AI/RVC//plankton_vocals_demucs.mp3->Traceback (most recent call last): File "/opt/rvc/lib/audio.py", line 14, in load_audio ffmpeg.input(file, threads=0) AttributeError: module 'ffmpeg' has no attribute 'input' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/rvc/trainset_preprocess_pipeline_print.py", line 79, in pipeline audio = load_audio(path, self.sr) File "/opt/rvc/lib/audio.py", line 19, in load_audio raise RuntimeError(f"Failed to load audio: {e}") RuntimeError: Failed to load audio: module 'ffmpeg' has no attribute 'input' end preprocess ``` ### How to reproduce Install deps ```sh asdf install python 3.10.13 asdf local python 3.10.13 pip install --upgrade pip pip install --upgrade torch torchvision torchaudio cat requirements-dml.txt | xargs -I _ pip install _ python infer-web.py ``` Click on **Process data** ![image](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/assets/10495562/992dfa47-2552-4351-b5f0-a31bc8a4882c) ### System information ```yaml OS: Pop!_OS 22.04 LTS x86_64 Host: MS-7D53 1.0 Kernel: 6.4.6-76060406-generic Shell: zsh 5.8.1 CPU: AMD Ryzen 5 5600X (12) @ 3.700GHz GPU: AMD ATI Radeon RX 6700/6700 XT / 6800M Memory: 32007MiB ``` ```sh 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 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Hyper fast Audio and Video encoder ``` ```sh Python 3.10.13 ```
Author
Owner

@NatoBoram commented on GitHub (Aug 27, 2023):

Because Python's entire ecosystem is such garbage, this can happen if you use another unrelated program somewhere else in your system that depends on ffmpeg.

You can fix this by uninstalling everything related and trying again.

pip uninstall ffmpeg
pip uninstall ffmpeg-python
pip uninstall python-ffmpeg

pip install ffmpeg-python
<!-- gh-comment-id:1694763737 --> @NatoBoram commented on GitHub (Aug 27, 2023): * https://github.com/kkroening/ffmpeg-python/issues/174#issuecomment-561546739 Because Python's entire ecosystem is such garbage, this can happen if you use another unrelated program somewhere else in your system that depends on `ffmpeg`. You can fix this by uninstalling everything related and trying again. ```sh pip uninstall ffmpeg pip uninstall ffmpeg-python pip uninstall python-ffmpeg pip install ffmpeg-python ```
Author
Owner

@0907king commented on GitHub (May 7, 2024):

文件路径是对的么,要包含文件名。之前同样的error

<!-- gh-comment-id:2099055243 --> @0907king commented on GitHub (May 7, 2024): 文件路径是对的么,要包含文件名。之前同样的error
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RVC-Project/Retrieval-based-Voice-Conversion-WebUI#734
No description provided.