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

module ffmpeg has no attribute input #1108

Closed
NatoBoram opened this issue Aug 27, 2023 · 2 comments
Closed

module ffmpeg has no attribute input #1108

NatoBoram opened this issue Aug 27, 2023 · 2 comments

Comments

@NatoBoram
Copy link
Contributor

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
@NatoBoram NatoBoram changed the title module 'ffmpeg' has no attribute 'input' module ffmpeg has no attribute input Aug 27, 2023
@NatoBoram
Copy link
Contributor Author

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

@0907king
Copy link

0907king commented May 7, 2024

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

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

2 participants