rigaya / NVEnc

NVENCによる高速エンコードの性能実験
https://rigaya34589.blog.fc2.com/blog-category-17.html
Other
1.09k stars 114 forks source link

GPU / VE (44%, 20%) (low usage, not at maximum)??? #160

Open zerowalkx opened 5 years ago

zerowalkx commented 5 years ago

Hi, rigaya

It's normal that you don't use 100% on the GPU and the VE ? I mean it's normal that this varies a lot ? sometimes it's 50% sometimes it's more and less, on other occasions.etc, is there any way to control this or depends on the video source ?

or I need to activate some option, and accelerate to use 100 % or as close to this maximum speed ?

For example in Avisynth+ I have to add at the end in the script: Prefetch(16)

with this option in Avisynth+ I can use the 16 threads that my processor has, it uses 100% of the capacity of the processor. and the encoding is finished much faster.

Here in NVEncC we have to activate some option to increase the speed and use 100% of the GPU and VE ?

Sin título

Thank you very much for your help

rigaya commented 5 years ago

Most of the time, especially for encoding a video smaller than fullHD (1920x1080), it is quite difficult to achieve 100% VE usage using Avisynth input, and usually requires hardware decoding to be enabled.

This can be used by using "--avhw" option and directly setting the target video file as input. If you require video editing by Avisynth+, it'll be difficult to fully utilize the VE.

zerowalkx commented 5 years ago

Most of the time, especially for encoding a video smaller than fullHD (1920x1080), it is quite difficult to achieve 100% VE usage using Avisynth input, and usually requires hardware decoding to be enabled.

This can be used by using "--avhw" option and directly setting the target video file as input. If you require video editing by Avisynth+, it'll be difficult to fully utilize the VE.

As I understand your answer is better to use the option --avhw as input directly, and not to use the Avisynth ?

could you please make an example of how it would be :

C:\ENCODE\0-NVEnc\Nvenc\NVEncC64.exe -i "C:\ENCODE\0-NVEnc\Led-Zeppelin.avs" --vpp-resize spline64 --crop 0,0,0,0 --output-res 0x0 --codec h265 --output-depth 10 --preset quality --level 5.1 --tier high --ref 7 --bframes 12 --mv-precision Q-pel --cqp 20 --vbv-bufsize 5000 --max-bitrate 5000 --aq --bref-mode each --lookahead 32 --deblock --strict-gop --chromaloc 2 --aud --sar 1:1 -o "Led-Zeppelin.mkv" --log Led-Zeppelin.log

Thanks for your help

Please check this link , thanks so much is very important :)

https://github.com/rigaya/NVEnc/issues/161

iykkim commented 5 years ago

Just FYI. I'm also doing lot of encoding with nvencc64 as situation below;

VE utilization and encoding fps that I experiencing are;

When I doing dual encoding ( you know, Nvidia GTX has dual nvenc encode chipset so it can run 2 encode jobs simultaneously ) then;

It's my assumption that VE utilization showing for overall of nvenc chipset usage so if you just doing single encoding then it will not over 50% as it will use only one nvenc encode chipset of GTX adapter. And I also agree to rigaya's reply above as it will not use all 100% for encode only. And Nvidia GTX adapter seems utilize enough of nvenc chipset resource when encoding.

I'm not a technical expert of Nvidia so just can say in my experience and I think more technical answer can be done by Nvidia support/forum...

Below image is single HEVC 4K encoding job capture. You can see that VE utilization is 48% and 72fps encoding speed in this one. This seems almost full usage of one of encode chipset resource of Nvidia GTX adapter. image

Below capture is one of dual Mpeg2 FullHD to HEVC FullHD encoding screen. As you can see VE utilization increased around 85%. image

pwacooijmans commented 5 years ago

Basicly to get higher GPU and VE usage you need a faster CPU with more threads etc etc....it just means your graphics card is not the bottle neck

pwacooijmans commented 5 years ago

Secondly your graphics card does NOT support B-frames so you better set bframes to 0. Third ref can't be 0. https://developer.nvidia.com/video-encode-decode-gpu-support-matrix#Encoder here a link to check weather your card supports b frames or not.

Aesthermortis commented 3 months ago

This happens to me when both the Intel and Nvidia GPUs are active. For example, when using a laptop with the integrated screen, NVENC does not show any GPU activity. However, when I connect the HDMI and the laptop uses the Nvidia GPU for the display instead of the Intel one, it does show GPU activity during encoding.