Ffmpeg-python: AttributeError: module 'ffmpeg' has no attribute 'input'

Created on 9 Mar 2019  路  8Comments  路  Source: kkroening/ffmpeg-python

Traceback (most recent call last):
File "/main/ffmpeg.py", line 1, in
import ffmpeg
File "/main/ffmpeg.py", line 2, in
stream = ffmpeg.input('video.mp4')
AttributeError: module 'ffmpeg' has no attribute 'input'

Most helpful comment

I'm guessing this happens if you've installed both, ffmpeg and ffmpeg-python.
uninstall both with:
pip uninstall ffmpeg
pip uninstall ffmpeg-python

and install ffmpeg-python again with :
pip install ffmpeg-python

This solved the problem in my system :)

All 8 comments

pip install ffmpeg-python
instead of
pip install ffmpeg

I had the same error, because python-ffmpeg was installed instead of ffmpeg-python. Therefore this can be considered as fixed.

try another filename (don't use same name as your imported package)

It doesn't solve my problem.
I have install pip install ffmpeg-python

import ffmpeg
filep = '/path/to/my/file.mp4'
stream = ffmpeg.input(filep)
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'ffmpeg' has no attribute 'input'

I'm guessing this happens if you've installed both, ffmpeg and ffmpeg-python.
uninstall both with:
pip uninstall ffmpeg
pip uninstall ffmpeg-python

and install ffmpeg-python again with :
pip install ffmpeg-python

This solved the problem in my system :)

I have same problem, install and uninstall the module multiple times.

but i forgot to install ffmpeg package.

you will probably end up with that exact error if you do :
pip install python-ffmpeg

instead of :
pip install ffmpeg-python

at least, I did ...

  1. Make sure you had pip install ffmpeg-python
  2. You should copy the ffmpeg.exe to you *.py file work directory
    3c211f825bfb22c465eb9ea41706ec0
Was this page helpful?
0 / 5 - 0 ratings

Related issues

roman-ku picture roman-ku  路  4Comments

reformstudios picture reformstudios  路  3Comments

laurentalacoque picture laurentalacoque  路  4Comments

Sangkwun picture Sangkwun  路  4Comments

kishaningithub picture kishaningithub  路  5Comments