nerdyrodent / VQGAN-CLIP

Just playing with getting VQGAN+CLIP running locally, rather than having to use colab.
Other
2.61k stars 428 forks source link

Unknown encoder 'h264_nvenc' #137

Closed peejmich closed 2 years ago

peejmich commented 2 years ago

I recently installed this on my Ubuntu 20.04 system with an Nvidia graphics card and what seems to be the latest drivers, and the image generation itself does work. However, when I try to enable the -vid or -zvid function , it's unable to compile the frames together into a video file, leaving a string of errors that I'm having trouble figuring out.

The first error appears in orange "Unknown encoder 'h264_nvenc' It then tells me that in ImageFile.py, line 504, in _save "AttributeError: '_idat' object has no attribute 'fileno'" It then goes to list off the other files that have errors because of this, ending with "BrokenPipeError: [Errno 32] Broken pipe

Ive gathered that it's an issue between ffmpeg, nvenc, and the Nvidia drivers, and I've tried reinstalling all three using this guide (to no avail).

https://developer.download.nvidia.com/compute/redist/ffmpeg/1511-patch/FFMPEG-with-NVIDIA-Acceleration-on-Ubuntu_UG_v01.pdf

I did have an older version of this repository succsessfully generating videos on a Windows machine, so I was surprised to run into the issue with a newer version running on Linux. Makes me believe I have something installed incorrectly.

I will continue troubleshooting, but as someone with limited python knowledge, I'm starting to run out of google searches! Any advice would be greatly appreciated!

x264 version 0.155.2917 ffmpeg version 4.3 nvidia-smi 510.47.03 Screenshot from 2022-03-02 11-30-27

nerdyrodent commented 2 years ago

sudo apt install ffmpeg will install ffmpeg

peejmich commented 2 years ago

sudo apt install ffmpeg will install ffmpeg

Yes I already tried that, ffmpeg is installed as version 4.3, still produces same results. The error seems to be with the 'h264_nvenc' codec. Am I missing something? Or should I just do a fresh install?

vendablefall commented 2 years ago

I am getting the same error after installing ffmpeg, any solutions?