joeyballentine / Video-Inference

Easy inference for video networks. Currently supports SOFVSR (traiNNer Version), RIFE, and TecoGAN-pytorch
55 stars 1 forks source link

The system cannot find the specified file #9

Open dynamiquel opened 2 years ago

dynamiquel commented 2 years ago

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.

tuxeri commented 2 years ago

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.

mirh commented 2 years ago

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