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

ffmpy.FFExecutableNotFoundError: Executable 'ffprobe' not found #3

Closed
nicholassun99 opened this issue Apr 14, 2023 · 7 comments · Fixed by #6
Closed

ffmpy.FFExecutableNotFoundError: Executable 'ffprobe' not found #3

nicholassun99 opened this issue Apr 14, 2023 · 7 comments · Fixed by #6
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nicholassun99
Copy link
Contributor

nicholassun99 commented Apr 14, 2023

I am getting the error above after I run the generate button but the video still appears in the output.

Steps to reproduce:
Use default setting

Things I tried:

  1. Did a pip install ffmpeg in cmd inside my %USERPROFILE% environment
  2. Did a pip install ffprobe inside the venv environment in automatic111
  3. Downloaded the 7zip full build of ffmpeg from https://www.gyan.dev/ffmpeg/builds/ and then moving the ffmpeg, ffprobe and ffplay exe files into the venv folder

I am able to see the version of ffmpeg when I do ffmpeg -version in cmd so I am not sure what the problem is exactly. Hoping that someone has the solution to this.

Here is a snippet of the error:
Outpaint step: 1 / 2
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:34<00:00, 1.44it/s]
Outpaint step: 2 / 2
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:34<00:00, 1.44it/s]
Traceback (most recent call last):
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\site-packages\ffmpy.py", line 93, in run
self.process = subprocess.Popen(
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1440, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 1078, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 1012, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\components.py", line 1979, in postprocess
and not processing_utils.video_is_playable(y)
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\processing_utils.py", line 783, in video_is_playable
output = probe.run(stderr=subprocess.PIPE, stdout=subprocess.PIPE)
File "C:\Users\nicky\AppData\Local\Programs\Python\Python310\lib\site-packages\ffmpy.py", line 98, in run
raise FFExecutableNotFoundError(
ffmpy.FFExecutableNotFoundError: Executable 'ffprobe' not found

@v8hid v8hid added the bug Something isn't working label Apr 14, 2023
@v8hid
Copy link
Owner

v8hid commented Apr 14, 2023

Hi @h0x91b-wix,
After investigating the issue, I believe the problem is associated with the Gradio playable-video component. It seems that the component is having difficulty converting the video, which is causing the issue. To resolve this, I will change the playable-video component to the video component. I believe that this will fix the problem.
Thank you.

@v8hid
Copy link
Owner

v8hid commented Apr 14, 2023

Could you please check if the problem has been solved or let us know if it persists? #6

@v8hid v8hid added the good first issue Good for newcomers label Apr 14, 2023
@v8hid v8hid linked a pull request Apr 14, 2023 that will close this issue
@jk212h20
Copy link

I downloaded after this merge and I have the same problem. It is making and saving the frames but not making and showing a video.

File "C:\Users\Art\stable-diffusion-webui\venv\lib\site-packages\ffmpy.py", line 93, in run
self.process = subprocess.Popen(
File "C:\Users\Art\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Art\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Art\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "C:\Users\Art\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1018, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "C:\Users\Art\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 956, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "C:\Users\Art\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1876, in postprocess
and not processing_utils.video_is_playable(y)
File "C:\Users\Art\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 729, in video_is_playable
output = probe.run(stderr=subprocess.PIPE, stdout=subprocess.PIPE)
File "C:\Users\Art\stable-diffusion-webui\venv\lib\site-packages\ffmpy.py", line 98, in run
raise FFExecutableNotFoundError(
ffmpy.FFExecutableNotFoundError: Executable 'ffprobe' not found

@v8hid
Copy link
Owner

v8hid commented Apr 14, 2023

I believe you have encountered a different error.
To potentially resolve the issue, you can try running the command
pip install "imageio[ffmpeg]"

@jk212h20
Copy link

This is what I get from pip install "imageio[ffmpeg]"

PS C:\Users\Art> pip install "imageio[ffmpeg]"
Requirement already satisfied: imageio[ffmpeg] in c:\python311\lib\site-packages (2.27.0)
Requirement already satisfied: numpy in c:\python311\lib\site-packages (from imageio[ffmpeg]) (1.24.2)
Requirement already satisfied: pillow>=8.3.2 in c:\python311\lib\site-packages (from imageio[ffmpeg]) (9.5.0)
Requirement already satisfied: imageio-ffmpeg in c:\python311\lib\site-packages (from imageio[ffmpeg]) (0.4.8)
Requirement already satisfied: psutil in c:\python311\lib\site-packages (from imageio[ffmpeg]) (5.9.4)

@GeorgLegato
Copy link
Collaborator

GeorgLegato commented Apr 14, 2023

I have the same problem and found some manual workaround; if not solution.
My setup is Windows, SD is latest version (22bcc or so)

ffrpobe is still not found.
I "pip install ffprobe", did not help.
The pyffprobe is only a wrapper for some ffprope.exe, which has to be

  • available on disk
  • and in ENV:PATH

So, I downloaded from github latest ffmpeg release (https://github.com/BtbN/FFmpeg-Builds/releases) and
upacked somewhere.
Now, you need to extend the PATH variable in the context where you SD-Webui is started; either manually
set PATH=%PATH%;C:\Users\YOU\Downloads\ffmpeg-master-latest-win64-gpl\bin

Pros put that in their web-user.bat...

@v8hid You could solve that more elegant by provide a Settings-property "PathToFFMPEG" and set OS.Path accordingly

@v8hid
Copy link
Owner

v8hid commented Apr 15, 2023

Great job, @GeorgLegato! I appreciate you for pointing out the problem and suggesting a solution. I have taken your advice and created a new issue(#9) to fix the problem. Thank you very much for your contribution!

@v8hid v8hid closed this as completed Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants