zocker-160 / handbrake-nvenc-docker

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

How-to encode multiple files in parallel #19

Open yayaasd opened 1 month ago

yayaasd commented 1 month ago

Dear all, docker with nvenc support ist running and automatic conversion from watched folder is just fine. only missing how to convert multiple files at the same time?

the GPU is kind of bored ;-) image

EDIT: Found some additional info: https://github.com/HandBrake/HandBrake/issues/1445

zocker-160 commented 1 month ago

Thank you for this suggestion, there are actually 3 separate notes I have to mention:

  1. GPU-Util is not a useful indicator for "GPU is bored", because Handbrake does use the NVEnc dedicated encoder on the GPU which is not included in the GPU-Util metric in your screenshot. As you can see in this screenshot, the ENC is 100% while GPU is actually at 0% load for ghb. Screenshot_20240808_153137

This is because GPU-Util only measures the compute / graphics load of the CUDA cores and not the dedicated video encoder.

Given that your 3050 has only one encoder chip, I am pretty sure that it is fully loaded and running multiple encodes at the same time probably would not increase your encoding speed. Screenshot_20240808_153625 source

  1. Making parallel encodings could be implemented either on the docker image side of things, where the script which detects new files and runs the encoder command calls handbrake multiple times or
  2. wait for Handbrake to support it natively, which I think would be the best solution, but I am not sure how long it will take them to actually do it, given that they are only lacking the support for the Linux version