I
Immich•2y ago
wes93

Hardware Decoding/Encoding Info

Dear all, I need some help and i hope somenoe could help me 😄 I have enabled the hardware encoding using the hwaccel.yml file and the relevant configuration, i can see infact in the immich-microservices log that for the encoding the GPU is used: LOG [MediaService] Start encoding video 1ca38ea7-ac2a-4a17-b207-cc85ed22dc3b {"inputOptions":["-init_hw_device cuda=cuda:0","-filter_hw_device cuda"],"outputOptions":["-tune hq","-qmin 0","-rc-lookahead 20","-i_qfactor 0.75","-c:v h264_nvenc","-c:a aac","-movflags faststart","-fps_mode passthrough","-map 0:0","-map 0:1","-g 256","-v verbose","-vf zscale=t=linear:npl=100,tonemap=hable:desat=0,zscale=p=bt709:t=bt709:m=bt709:range=pc,format=nv12,hwupload_cuda,scale_cuda=720:-2","-preset p1","-cq:v 23"],"twoPass":false} My question is why if the CPU is used for decoding the usage is 600% with only 1 transcoding JOB? Is this normal? there i a way to optimize this process? I have attached some screen. Best Regards Stefano
No description
No description
No description
No description
No description
2 Replies
sogan
sogan•2y ago
Hi! This is normal. The GPU is used for encoding (which is the most intensive part), but decoding and tone-mapping is done on CPU. These are less intensive than encoding, but still contribute to CPU usage since the CPU has to work hard to keep up with the GPU.
wes93
wes93OP•2y ago
Ok thanks a lot for your reply, i hope in teh future we have also the option to decode videos with GPU 3.7 GHz of CPU with just one Jobs and usage at 80% it's so much and it will take many hours of decoding and encoding

Did you find this page helpful?