kkroening/ffmpeg-python

I've installed the ffmpeg-python module, but I still get an error "module 'ffmpeg' has no attribute 'probe'“

heiheiheibj opened this issue · 4 comments

(roop) C:\refacer>pip install ffmpeg-python
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: ffmpeg-python in c:\programdata\anaconda3\envs\roop\lib\site-packages (0.2.0)
Requirement already satisfied: future in c:\programdata\anaconda3\envs\roop\lib\site-packages (from ffmpeg-python) (0.18.3)

To create a public link, set share=True in launch().
Traceback (most recent call last):
File "C:\ProgramData\anaconda3\envs\roop\lib\site-packages\gradio\routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "C:\ProgramData\anaconda3\envs\roop\lib\site-packages\gradio\blocks.py", line 1431, in process_api
result = await self.call_function(
File "C:\ProgramData\anaconda3\envs\roop\lib\site-packages\gradio\blocks.py", line 1109, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\ProgramData\anaconda3\envs\roop\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\ProgramData\anaconda3\envs\roop\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "C:\ProgramData\anaconda3\envs\roop\lib\site-packages\anyio_backends_asyncio.py", line 807, in run
result = context.run(func, *args)
File "C:\ProgramData\anaconda3\envs\roop\lib\site-packages\gradio\utils.py", line 706, in wrapper
response = f(*args, **kwargs)
File "C:\refacer\app.py", line 64, in run
return refacer.reface(video_path,faces)
File "C:\refacer\refacer.py", line 186, in reface
self.__check_video_has_audio(video_path)
File "C:\refacer\refacer.py", line 171, in __check_video_has_audio
probe = ffmpeg.probe(video_path)
AttributeError: module 'ffmpeg' has no attribute 'probe'

I had the same issue.

Installing from source fixed it. I know this isn't an overall solution, but at least it will get you going.

I had the same issue.

Installing from source fixed it. I know this isn't an overall solution, but at least it will get you going.

I run `pip install -e ./ffmpeg-python', I got the same error as below:

 Obtaining file:///C:/Downloads/ffmpeg-python
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting future (from ffmpeg-python==0.2.0)
  Using cached future-0.18.3.tar.gz (840 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\AppData\Local\Temp\pip-install-f2efqqyy\future_14164887a5844644836d4946e2906c3d\setup.py", line 86, in <module>
          import src.future
      ModuleNotFoundError: No module named 'src'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I also get this error on using input. Is there any broken version of this package on pypi?