Closed FtZPetruska closed 2 years ago
So the ffmpeg_python package in requirements.txt isn't the right one ? Or it's more of a package conflict issue ?
ffmpeg_python
seems to be the same as ffmpeg-python
.
The issue comes from the ffmpeg
python package on line 4 of the requirements.txt
file, when installed, it shadows the other package.
Here's a dump of the console showing the available methods of ffmpeg:
kotoko@MacBook-Pro video-dl % pip install ffmpeg_python==0.2.0
Successfully installed ffmpeg-python-0.2.0
kotoko@MacBook-Pro video-dl % python
Python 3.9.7 (default, Sep 3 2021, 12:45:31)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ffmpeg
>>> dir(ffmpeg)
['Error', 'Stream', '__all__', '__builtins__', '__cached__', '__doc__', '__file__',
'__loader__', '__name__', '__package__', '__path__', '__spec__', '_ffmpeg',
'_filters', '_probe', '_run', '_utils', '_view', 'colorchannelmixer', 'compile',
'concat', 'crop', 'dag', 'drawbox', 'drawtext', 'filter', 'filter_', 'filter_multi_output',
'get_args', 'hflip', 'hue', 'input', 'merge_outputs', 'nodes', 'output', 'overlay',
'overwrite_output', 'probe', 'run', 'run_async', 'setpts', 'trim', 'unicode_literals',
'vflip', 'view', 'zoompan']
>>> exit()
kotoko@MacBook-Pro video-dl % pip install ffmpeg==1.4
Successfully installed ffmpeg-1.4
kotoko@MacBook-Pro video-dl % python
Python 3.9.7 (default, Sep 3 2021, 12:45:31)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ffmpeg
>>> dir(ffmpeg)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
>>> exit()
I cannot test right now if the issue also happens on Windows or Linux. But at least on macOS, that ffmpeg==1.4
in requirements.txt
breaks.
I was trying the latest release on an x64 MacBook running Catalina, and I got the following error every time I tried to download a video:
After some digging running a clean python environment, I was able to narrow it down to the
ffmpeg
python package being imported instead offfmpeg-python
. Uninstalling theffmpeg
python package fixed the issue.