DinoMan / speech-driven-animation

949 stars 289 forks source link

ffmpeg._run.Error: ffmpeg error #29

Closed Mombin closed 4 years ago

Mombin commented 4 years ago

hi, I'm hanbin. first, i appriciate you to provide open source. it is so useful model

I use your code in Python3(tensorflow 1.3), and I got this error

<subprocess.Popen object at 0x7fc3908a1ba8>
Traceback (most recent call last):
  File "test2.py", line 11, in <module>
    va.save_video(vid, aud, "generated3.mp4")
  File "/home/jjck5938/speech-driven-animation/sda/sda.py", line 187, in save_video
    out.run()
  File "/home/jjck5938/.local/lib/python3.5/site-packages/ffmpeg/_run.py", line 328, in run
    raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

I so confused....so I search All of ffmpeg-python code but It isn't work well

finally, I found solution that error. if you use python code and you want save video. follow the code open sda/sda.py

go line 191. fix it experimental_ffmpeg=False to experimental_ffmpeg=True and save that you can run code very well def save_video(self, video, audio, path, overwrite=True, experimental_ffmpeg=True, scale=None):

DinoMan commented 4 years ago

Hi Hanbin, Glad you found the problem. Actually the ffmpeg experimental flag has to do with the version of ffmpeg installed on your computer and not with python. Some machines have older ffmpeg versions so they must use the experimental=True. For those with newer ffmpeg versions the code should work as is.