zocker-160 / handbrake-nvenc-docker

Handbrake GUI with Web browser and VNC access. Supports NVENC encoding
47 stars 11 forks source link

H265 NVEnc not working and sync problem with H264 #8

Closed leuchtrakete666 closed 2 years ago

leuchtrakete666 commented 2 years ago

hi,

i have a quadro m2000 in my truenas scale server. it should be h265 capable, but in the logs i get the error:

hevc_nvenc @ 0x7f4acc5d6780] No capable devices found

h264 works. its extremly fast but i would prefer to use h265. the problem i have with h264 is a sync problem. encoding with x264 everthing is perfectly synced, but with h264 i have about 3 seconds async.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.91.03    Driver Version: 460.91.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro M2000        Off  | 00000000:01:00.0 Off |                  N/A |
| 56%   40C    P8     9W /  75W |      3MiB /  4043MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
leuchtrakete666 commented 2 years ago

ok, the sync issue is "solved". i set compression speed from slowest to slow. it seems, its not related to the docker.

but the h265 issue really bothers me. i hope there will be a solution.

zocker-160 commented 2 years ago

Thanks for this report, sadly I do not have the hardware to test this.

According to the official NVENC support matrix there should be support for H.265 encode on your GPU, but only for YUV 4:2:0 and not 4:4:4.

Have you managed to successfully encode H265 on this GPU with Handbrake on a different setup?

I need to double check if the h265_nvenc module inside the container actually works as it should.

EDIT: the support matrix https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new

leuchtrakete666 commented 2 years ago

unfortunately i have no option to test this gpu on other hardware. i only have laptops. in this small powerfull homebuild nas is the only pci express slot i have access to.

the decoding works. on my emby server i run a 4k h265 video and it transcode it to h264 to my mobile without issues.

leuchtrakete666 commented 2 years ago

its the gpu. i buy a new used quadro p2200 for a really good price and it works. seems to be really the YUV thing.

ripping all dvds, convert them with handbrake in nvenc 265, slowest preset, 60000 kbps, 2 pass, no dimension change, audio and subtitle passthrough and finaly watch them with emby on the nvidia shield with ai upscaling. its a viewing pleasure. ok, its not perfect, but pretty close.

zocker-160 commented 2 years ago

so I did some testing on my own hardware with different video sources and I am very sure it is the YUV 4:2:0 limitation of the M2000 since DVD video (and especially BD sources) do not seem to be chroma sub-sampled.

Testing with a GTX 1080ti, I did not encounter any problems, so I will close this issue.