Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

No Video File Generated Despite Successful Processing Message

Open Mukku27 opened this issue 1 year ago • 4 comments

Issue Title: No Video File Generated Despite Successful Processing Message

Description:

After running the face swap functionality with the following command, I receive a success message but cannot locate the generated video file in the output directory:

Processing: 100%|█████████████████| 451/451 [01:20<00:00, 5.62frame/s, execution_providers=['CUDAExecutionProvider'], execution_threads=11, max_memory=16]
[DLC.CORE] Creating video with 30.0 fps...
[DLC.CORE] Restoring audio might cause issues as fps are not kept...
[DLC.CORE] Processing to video succeed!

Steps to Reproduce:

  1. Select a source image and target video for face swapping.
  2. Execute the face swap process.
  3. Check the designated output directory for the resulting video file.

Expected Behavior:

A video file should be generated and saved in the output directory as indicated by the success message.

Actual Behavior:

The process completes with a success message, but no video file is found in the output directory.

Environment:

  • OS: Ubuntu 22.04 LTS
  • CUDA Version: 11.8
  • cuDNN Version: 8.9.6
  • Python Version: 3.10

Additional Notes:

  • Verify that the output directory path is correctly specified and accessible.
  • Ensure that there are no permission issues or path misconfigurations affecting file generation.
  • Review any relevant log files for additional insights.

Mukku27 avatar Aug 18 '24 10:08 Mukku27

Getting the same issue here, no GPU, Mac Intel, Python 3.9.

zaiddabaeen avatar Aug 25 '24 16:08 zaiddabaeen

Exact same problem here. Two friends have previous/prior version that work. Latest does NOT. Preview function is operational, however as stated above, successful processing does not leave a file accessible. Someone messed it up.

SwingerDude avatar Sep 02 '24 00:09 SwingerDude

I have resolved the issue in the current version(92a0994f01ec6ae7756951312a70e101fb33c7e5) of the code. While the exact cause is unclear, it seems that an issue occurred with the .onnx file during internal processes.

Please try the following steps after removing all files from the ./models folder.

# in ./models folder
wget https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx -O inswapper_128_fp16_v1.onnx
wget https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128_fp16.onnx -O inswapper_128_fp16_v2.onnx

Then, you need to change file name to inswapper_128.onnx or inswapper_128_fp16.onnx. This depends on the version of the code you are using. To check which name to use, refer to the code in the ./modules/processors/frame/face_swapper.py file. (in my case, it was inswapper_128.onnx)

cp inswapper_128_fp16_v1.onnx inswapper_128.onnx

After that, try running the following CLI command. If the same issue persists, try using a different version(_v2.onnx) that you downloaded. I hope this resolves the error! 🎉

python run.py \
  --source samples/image.jpg \
  --target samples/video.mp4 \
  --output samples/output.mp4 \
  --frame-processor face_swapper \
  --keep-fps \
  --keep-audio \
  --execution-provider cuda

Additionally, please check if there are any non-English characters in the file path.

(I suddenly encountered the issue of the output video file disappearing again, but after rebooting the server and repeating the above process, it was resolved.)

gibiee avatar Sep 23 '24 05:09 gibiee

For me, the problem is caused by ffmpeg. In the create_video() step after the processing, because ffmpeg did not have the libx264 encoder, no temp.mp4 file was generated. Therefore, the subsequent steps were not executed.

NKdryer avatar Oct 11 '24 07:10 NKdryer