Video-Inference icon indicating copy to clipboard operation
Video-Inference copied to clipboard

The system cannot find the specified file

Open dynamiquel opened this issue 3 years ago • 2 comments

Sorry about this but I'm new to using Python for stuff. I recently installed ESRGAN and decided to also give this a go. I cannot seem to use this software since I get the following error:

PS C:\Users\Liamk\OneDrive\Documents\_Apps\Video Inference> python run.py ./models/3x_Video_TSSM_RRDB_80000_G.pth --input "./input/HaloTest.mp4" --output "./output/HaloTestUp.mp4"
Traceback (most recent call last):
  File "C:\Users\Liamk\OneDrive\Documents\_Apps\Video Inference\run.py", line 86, in <module>
    main()
  File "C:\Users\Liamk\OneDrive\Documents\_Apps\Video Inference\run.py", line 65, in main
    io.set_input(args.input)
  File "C:\Users\Liamk\OneDrive\Documents\_Apps\Video Inference\utils\io_classes\video_io.py", line 34, in set_input
    probe = ffmpeg.probe(input_video)
  File "C:\Users\Liamk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ffmpeg\_probe.py", line 20, in probe
    p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

The HaloTest.mp4 file is definitely in the correct folder.

I tried figuring out myself but as soon as it got to File "C:\Users\Liamk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ffmpeg\_probe.py", line 20, I was in unknown territory.

I have Python 3.9.9 and installed all the listed libraries using pip.

dynamiquel avatar Jan 04 '22 22:01 dynamiquel

I had the same thing, solved it by adding ffmpeg's bin folder to the Windows PATH variable. So at least in my case it was just looking ffmpeg. Basically when ffmpeg command responds on cmd, you should be good.

tuxeri avatar Jan 06 '22 22:01 tuxeri

https://github.com/kkroening/ffmpeg-python#installing-ffmpeg

mirh avatar Mar 29 '22 01:03 mirh