DinoMan / speech-driven-animation

949 stars 289 forks source link

ffmpeg._run.Error #61

Closed Scient122 closed 3 years ago

Scient122 commented 3 years ago

Hi, I use python3 and when I type 'python3 testModel.py' this error appears:

[W NNPACK.cpp:80] Could not initialize NNPACK! Reason: Unsupported hardware. Traceback (most recent call last): File "testModel.py", line 4, in va.save_video(vid, aud, "generated.mp4") File "/home/ludovico/speech-driven-animation/sda/sda.py", line 188, in save_video out.run() File "/home/ludovico/.local/lib/python3.8/site-packages/ffmpeg/_run.py", line 325, in run raise Error('ffmpeg', out, err) ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

I've already found and seen this issue https://github.com/DinoMan/speech-driven-animation/issues/29. I've fixed experimental_ffmpeg=False to experimental_ffmpeg = True but nothing changes. How could I solve this?

DinoMan commented 3 years ago

I can't say for certain what the problem is (except that it seems to be with ffmpeg). You can change the log level from panic to debu gin the following line to get some more information: https://github.com/DinoMan/speech-driven-animation/blob/482eb5c8af0fab3b4e2ff77093308a49b27b3560/sda/sda.py#L184

Also, you don't necessarily have to use the saving functionality of the library and can use your own method for saving the video. The video is provided as a numpy array so you can use whatever method you want to save it (e.g. OpenCV).

Scient122 commented 3 years ago

Ok, I've managed to fix it and now "generated.mp4" is created but this is empty, it lasts 0 seconds and it's all black. This is my code:

import sda va = sda.VideoAnimator(gpu=-1)# Instantiate the animator vid, aud = va("/home/ludovico/speech-driven-animation/example/image.bmp","/home/ludovico/speech-driven-animation/example/audio.wav") va.save_video(vid, aud, "generated.mp4")

Is there anything wrong?