I'm using Python 3.6 on MacOSX. I would like to use FFmpeg as Python sub-process. Everything works fine when using the OSX embedded Python 2.7 but using 3.6, this doesn't work.
I get an error message because it doesn't find FFmepg:
raise FFExecutableNotFoundError("Executable '{0}' not found".format(self.executable))
ffmpy.FFExecutableNotFoundError: Executable 'ffmpeg' not found
I tried with ffmpy but I also got the same result by invoking FFmpeg directly:
>>> from subprocess import call
>>> call(["ffmpeg"])
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
call(["ffmpeg"])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1326, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
I installed the FFmpeg lib. by using Brew through Terminal. It was well installed but only visible by Python 2.7, not 3.6.
Calling it from terminal is working :
$ ffmpeg
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
I'm not (yet) a Linux specialist but I think that a path is missing for 3.6 to find FFmpeg.
Any clue to solve this annoying issue ?