Executable 'ffmpeg' not found
noelje opened this issue · 4 comments
Device: 2011 Macbook Pro (8,1)
OS: 64bit Mac OS X 10.13.6 17G14042
Kernel: x86_64 Darwin 17.7.0
Intel Core i5-2435M @ 2.40GHz
Tested on QUT's Echo system. Here are the steps that I did:
- installed / updated pip
- installed python3 virtual env
- installed requirements
- downloaded executable from https://www.ffmpeg.org/ and pasted in the root folder of this repo
Ran:
- python3 echo360.py [URL]
- python echo360.py [URL]
Encountered:
(echoenv) bash-5.1$ python3 echo360.py https://echo360.net.au/section/a6e99f1d-e120-44c7-817f-595642fc6c18/home
> Echo360 Cloud platform detected
> This implies setup_credential, and using web_driver
>> Please login with your SSO details and type continue when logged in.
-----------------------------------------------------------------
>> After you finished logging in, type 'continue' in the terminal.
> Type 'continue' and press [enter]
continue
>> I'm gonna assume you are responsible enough to had finished logged in by now ;)
>> Retrieving echo360 Course Info... 19/19 videos Done!
============================================================
Course: [[UNTITLED]]
Total videos to download: 19 out of 19
============================================================
------------------------------------------------------------
Downloading "2021-09-02 - Lecture 19 [CAB240_Week7_PartC]"
> Downloading audio:
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20.0M/20.0M [00:13<00:00, 1.48MiB/s]
> Downloading video:
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12.1M/12.1M [00:05<00:00, 2.21MiB/s]
> Converting to mp4... Traceback (most recent call last):
File "/Volumes/HDD/echo360/echoenv/lib/python3.9/site-packages/ffmpy.py", line 93, in run
self.process = subprocess.Popen(
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Volumes/HDD/echo360/echo360.py", line 7, in <module>
sys.exit(main())
File "/Volumes/HDD/echo360/echo360/main.py", line 356, in main
downloader.download_all()
File "/Volumes/HDD/echo360/echo360/downloader.py", line 235, in download_all
if video.download(self._output_dir, filename):
File "/Volumes/HDD/echo360/echo360/videos.py", line 269, in download
result = self.download_single(session, single_url, output_dir, new_filename, pool_size)
File "/Volumes/HDD/echo360/echo360/videos.py", line 317, in download_single
self.combine_audio_video(
File "/Volumes/HDD/echo360/echo360/videos.py", line 359, in combine_audio_video
ff.run()
File "/Volumes/HDD/echo360/echoenv/lib/python3.9/site-packages/ffmpy.py", line 98, in run
raise FFExecutableNotFoundError(
ffmpy.FFExecutableNotFoundError: Executable 'ffmpeg' not found
(echoenv) bash-5.1$
Possible guesses:
Even though I downloaded the ffmpeg it may not be placed in the right directory. https://stackoverflow.com/a/60561710/14368392
Hi @noel-emmanuel, you should not put the executable from ffmpeg.org in the root directory of this repo, as that is not how the system searches for programs.
Perhaps you can use brew
or other OSX installer to install ffmpeg?
A quick way to test is run
$ ffmpeg
to see whether your terminal was able to execute the command.
The ffmpeg
executable is indeed in the root directory of this repo as I have previously mentioned. This means that if I do ./ffmpeg
I can see this:
ffmpeg version N-103457-g9abf0e0419-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.17) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay libavutil 57. 4.101 / 57. 4.101 libavcodec 59. 6.100 / 59. 6.100 libavformat 59. 4.102 / 59. 4.102 libavdevice 59. 0.101 / 59. 0.101 libavfilter 8. 7.100 / 8. 7.100 libswscale 6. 0.100 / 6. 0.100 libswresample 4. 0.100 / 4. 0.100 libpostproc 56. 0.100 / 56. 0.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
But I am not sure, since this project is unable to find or locate this executable. Brew is not supported for my OS anymore. Is there any line of code which looks like:
ff = ffmpy.FFmpeg(executable='C:\\ffmpeg\\bin\\ffmpeg.exe', inputs={path+'/Stage1Rap.wav': None}, outputs={path+'/FinalRap.mp3': ["-filter:a", "atempo=0.5"]})
You should NOT put it in the root of this repo. That's not how the system searches for programs.
You should install ffmpeg system-wise, rather than downloading only the binary. For example, you can follow this guide.
I mentioned that you should run
$ ffmpeg
not
$ ./ffmpeg
as the ./
prefix is running local binary, but not system-searchable binaries.
The stackoverflow guide you had linked is for windows (as shown by the C:\....
path)
As a side question, I am unfamiliar with mac but why wouldn't homebrew support OSX 10?