Git Product home page Git Product logo

Comments (7)

jecer avatar jecer commented on August 19, 2024 1

placed ffmpeg.exe, ffplay.exe, ffprobe.exe in the folder with app.py
And everything worked, thank you!

from refacer.

xaviviro avatar xaviviro commented on August 19, 2024

It seems like you don't have ffmpeg installed or it's not properly set in the path. If you are using a virtual environment (venv), installing the requirements should automatically install ffmpeg. If not, you can manually install ffmpeg from https://ffmpeg.org/.

from refacer.

xaviviro avatar xaviviro commented on August 19, 2024

Can you run ffmpeg in the terminal and paste what appears? thank you

from refacer.

jecer avatar jecer commented on August 19, 2024

An error is displayed after trying to render
Total frames: 136 Extracting frames: 100%|████████████████████████████████████████████████████████████| 136/136 [00:00<00:00, 199.46it/s] Processing frames: 100%|█████████████████████████████████████████████████████████████| 136/136 [00:17<00:00, 7.79it/s] Merging audio with the refaced video... Traceback (most recent call last): File "C:\Users\jecer\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\routes.py", line 427, in run_predict output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jecer\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jecer\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jecer\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jecer\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\jecer\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\reface\refacer\app.py", line 30, in run return refacer.reface(video_path,faces) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\reface\refacer\refacer.py", line 189, in reface return self.__convert_video(video_path,output_video_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\reface\refacer\refacer.py", line 113, in __convert_video out.run(overwrite_output=True,quiet=True) File "C:\Users\jecer\AppData\Local\Programs\Python\Python311\Lib\site-packages\ffmpeg\_run.py", line 325, in run raise Error('ffmpeg', out, err) ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

from refacer.

xaviviro avatar xaviviro commented on August 19, 2024

It's possible that placing the ffmpeg.exe file in the same folder has allowed the program to locate ffmpeg, but ffmpeg requires other components such as encoders to function properly. Instead of placing the executable in the folder, you might want to try adding ffmpeg to the Windows PATH. Here's a tutorial on how to do this: https://www.thewindowsclub.com/how-to-install-ffmpeg-on-windows-10?utm_content=cmp-true

from refacer.

rmhckrkz avatar rmhckrkz commented on August 19, 2024

Hello. Need help with below error. Thanks

C:\Python\REFACE\refacer>python app.py
Traceback (most recent call last):
File "C:\Python\REFACE\refacer\app.py", line 12, in
refacer = Refacer(force_cpu=args.force_cpu,colab_performance=args.colab_performance)
File "C:\Python\REFACE\refacer\refacer.py", line 32, in init
self.__check_encoders()
File "C:\Python\REFACE\refacer\refacer.py", line 230, in __check_encoders
commandout = subprocess.run(command, check=True, capture_output=True).stdout
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1456, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

from refacer.

xaviviro avatar xaviviro commented on August 19, 2024

This is likely because you either do not have ffmpeg installed, or it's not properly configured. Please refer to the prerequisites that I have just added in the readme: https://github.com/xaviviro/refacer/blob/main/README.md#prerequisites

from refacer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.