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

No module named 'ffmpeg' #60

Open
Aenigma opened this issue Oct 18, 2023 · 7 comments · May be fixed by #63
Open

No module named 'ffmpeg' #60

Aenigma opened this issue Oct 18, 2023 · 7 comments · May be fixed by #63

Comments

@Aenigma
Copy link

Aenigma commented Oct 18, 2023

I kept getting an error when running auto-subtitle:

ModuleNotFoundError: No module named 'ffmpeg'

This seems to be caused by the fact that openai-whisper dropped the upstream dependency of ffmpeg-python in this change openai/whisper@8035e9e. Since this module depends on it, it should add the dependency to the requirements.txt and setup.py.

For now, you can do a workaround by running:

pip install ffmpeg-python
@whittinghamj
Copy link

pip install ffmpeg-python

that will fix your issue.

@Aenigma
Copy link
Author

Aenigma commented Oct 26, 2023

Thanks. I outlined that workaround in my post. 😅

@whittinghamj
Copy link

lol i didn't read the last line before posting :P

@MoSattler
Copy link

MoSattler commented Dec 18, 2023

Same problem here on Mac:

user@users-MacBook-Pro ~ % brew install ffmpeg     
Warning: ffmpeg 6.0_2 is already installed and up-to-date.
To reinstall 6.0_2, run:
  brew reinstall ffmpeg
  
user@users-MacBook-Pro ~ % auto_subtitle --help
Traceback (most recent call last):
  File "/opt/homebrew/bin/auto_subtitle", line 5, in <module>
    from auto_subtitle.cli import main
  File "/opt/homebrew/lib/python3.11/site-packages/auto_subtitle/cli.py", line 2, in <module>
    import ffmpeg
ModuleNotFoundError: No module named 'ffmpeg'

@TheShiningBoots
Copy link

Can confirm, occurs on windows, even when ffmpeg is downloaded with the choco package manager.

@superresistant
Copy link

pip install ffmpeg-python

that will fix your issue.

This causes a new issue

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Scripts\auto_subtitle.exe\__main__.py", line 7, in <module>
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\auto_subtitle\cli.py", line 
67, in main
    ).output(out_path).run(quiet=True, overwrite_output=True)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\ffmpeg\_run.py", line 325, in run
    raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

@superresistant
Copy link

pip install ffmpeg-python
that will fix your issue.

This causes a new issue

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Scripts\auto_subtitle.exe\__main__.py", line 7, in <module>
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\auto_subtitle\cli.py", line 
67, in main
    ).output(out_path).run(quiet=True, overwrite_output=True)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\ffmpeg\_run.py", line 325, in run
    raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

This commit fixed the issue
Fix ffmpeg subtitle overlay#81

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

Successfully merging a pull request may close this issue.

5 participants