wyhsirius / g3an-project

[CVPR 20] G3AN: Disentangling Appearance and Motion for Video Generation
https://wyhsirius.github.io/G3AN/
MIT License
38 stars 8 forks source link

Video save error #4

Closed LiZhiHao97 closed 3 years ago

LiZhiHao97 commented 3 years ago

Hello ! When I ran demo_random.py using the pre-trained model g3an.pth in accordance with the instructions in the Inference, the following error occurred. How can I solve this problem

Traceback (most recent call last): File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/skvideo/io/ffmpeg.py", line 466, in writeFrame self._proc.stdin.write(vid.tostring()) BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "demo_random.py", line 66, in main() File "demo_random.py", line 59, in main save_videos(vid_path, vid_fake, args.n) File "demo_random.py", line 19, in save_videos skvideo.io.vwrite(os.path.join(path, "%d.mp4"%(i)), v, outputdict={"-vcodec":"libx264"}) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/skvideo/io/io.py", line 64, in vwrite writer.writeFrame(videodata[t]) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/skvideo/io/ffmpeg.py", line 471, in writeFrame raise IOError(msg) OSError: [Errno 32] Broken pipe

FFMPEG COMMAND: /root/miniconda3/envs/myconda/bin/ffmpeg -y -f rawvideo -pix_fmt rgb24 -s 64x64 -i - -vcodec libx264 /root/project/g3an-project/demos/v1/vids/0.mp4

FFMPEG STDERR OUTPUT:

wyhsirius commented 3 years ago

@LiZhiHao97 Hi, I tested the code. It seems that it works fine with me, could you please test your ffmpeg and scikit-video to see whether they have been installed correctly ? I use scikit-video 1.1.11

LiZhiHao97 commented 3 years ago

@wyhsirius Thank you for your prompt reply!I used apt-get update and apt-get install ffmpeg to reinstall my ffmpeg, and it works.