GPU Not Utilized Using NVENC

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Snaptrap
Posts: 25
Joined: Sat Dec 05, 2009 4:27 am

GPU Not Utilized Using NVENC

Post by Snaptrap »

Description of problem or question:The encoding speed of NVENC is almost identical to QuickSync and my GPU is barely active while the CPU is running at full just as it does with QuickSync.




Steps to reproduce the problem (If Applicable):




HandBrake version (e.g., 1.0.0):1.5.1




Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):Windows 10 x64




HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

HandBrake 1.5.1 (2022011000)
OS: Microsoft Windows NT 10.0.19044.0
CPU: Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
Ram: 32129 MB, 
GPU Information:
  Intel(R) UHD Graphics 630 - 31.0.101.2114
  NVIDIA GeForce RTX 3060 - 31.0.15.2756
Screen: 1920x1080
Temp Dir: C:\Users\Gunstar\AppData\Local\Temp\
Install Dir: D:\Backup Archive\Software\HandBrake\
Data Dir: C:\Users\Gunstar\AppData\Roaming\HandBrake

-------------------------------------------

 # Starting Scan ...

[13:13:17] hb_init: starting libhb thread
[13:13:17] CPU: Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
[13:13:17]  - Intel microarchitecture Comet Lake
[13:13:17]  - logical processor count: 20
[13:13:17] Intel Quick Sync Video support: yes, gpu list: 1
[13:13:17] Intel Quick Sync Video integrated adapter with index 1
[13:13:17]  - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[13:13:17]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes)
[13:13:17]  - H.264 encoder: yes
[13:13:17]     - preferred implementation: hardware (2) via D3D11
[13:13:17]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[13:13:17]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[13:13:17]     - preferred implementation: hardware (2) via D3D11
[13:13:17]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[13:13:17] hb_scan: path=D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2646: nav_get_title_list(D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv\) failed
[13:13:17] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[13:13:17] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv':
  Metadata:
    encoder         : libebml v1.4.2 + libmatroska v1.6.4
    creation_time   : 2022-11-11T08:53:44.000000Z
  Duration: 00:25:32.45, start: 0.000000, bitrate: 50935 kb/s
  Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 47659401
      DURATION        : 00:25:32.448000000
      NUMBER_OF_FRAMES: 36742
      NUMBER_OF_BYTES : 9129444402
      _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-11-11 08:53:44
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      BPS             : 3272391
      DURATION        : 00:25:32.449000000
      NUMBER_OF_FRAMES: 143667
      NUMBER_OF_BYTES : 626846636
      _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-11-11 08:53:44
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[13:13:17] scan: decoding previews for title 1
[13:13:17] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[13:13:39] scan: 60 previews, 3840x2160, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 9-16-9, chroma location: topleft
[13:13:39] scan: mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.005000, max_luminance=4000.000000
[13:13:39] scan: content light level: max_cll=1106, max_fall=180
[13:13:39] scan: supported video decoders: avcodec qsv
[13:13:39] libhb: scan thread found 1 valid title(s)

 # Scan Finished ...


rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: GPU Not Utilized Using NVENC

Post by rollin_eng »

Can you please post your encode log.
Snaptrap
Posts: 25
Joined: Sat Dec 05, 2009 4:27 am

Re: GPU Not Utilized Using NVENC

Post by Snaptrap »

Seems that the GPU isn't used when I have a filter active.

Code: Select all

HandBrake 1.5.1 (2022011000)
OS: Microsoft Windows NT 10.0.19044.0
CPU: Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
Ram: 32129 MB, 
GPU Information:
  Intel(R) UHD Graphics 630 - 31.0.101.2114
  NVIDIA GeForce RTX 3060 - 31.0.15.2756
Screen: 1920x1080
Temp Dir: C:\Users\Gunstar\AppData\Local\Temp\
Install Dir: D:\Backup Archive\Software\HandBrake\
Data Dir: C:\Users\Gunstar\AppData\Roaming\HandBrake

-------------------------------------------

 # Starting Encode ...

[16:02:35] base preset: UHD MP4 AAC 5.1
[16:02:35] Remote Process started with Process ID: 6552 using port: 8037. Max Allowed Instances: 1
[16:02:35] Worker: Starting HandBrake Engine ...
[16:02:35] Worker: Starting Web Server on port 8037 ...
[16:02:35] Worker: Disconnected worker monitoring enabled!
[16:02:35] Compile-time hardening features are enabled
[16:02:36] hb_init: starting libhb thread
[16:02:36] Starting work at: Sat Dec 17 16:02:36 2022
[16:02:36] 1 job(s) to process
[16:02:36] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 1152,
        "DRC": 0,
        "Encoder": "av_aac",
        "Gain": 0,
        "Mixdown": 7,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd",
      "copy:mp2"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "AlignAVStart": false,
    "File": "D:\\Backup Archive\\Media Files\\Converts\\A Charlie Brown Christmas --1(4).mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 13,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "2160",
          "width": "3840"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "D:\\Backup Archive\\Media Files\\Videos\\Movies\\UHD\\A Charlie Brown Christmas -.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "nvenc_h265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "temporal_aq=1:nonref_p=1:strict_gop=1",
    "Preset": "slowest",
    "Profile": "auto",
    "Quality": 15,
    "QSV": {
      "Decode": false
    }
  }
}
[16:02:36] CPU: Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
[16:02:36]  - Intel microarchitecture Comet Lake
[16:02:36]  - logical processor count: 20
[16:02:36] Intel Quick Sync Video support: yes, gpu list: 1
[16:02:36] Intel Quick Sync Video integrated adapter with index 1
[16:02:36]  - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[16:02:36]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes)
[16:02:36]  - H.264 encoder: yes
[16:02:36]     - preferred implementation: hardware (2) via D3D11
[16:02:36]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[16:02:36]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[16:02:36]     - preferred implementation: hardware (2) via D3D11
[16:02:36]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[16:02:36] hb_scan: path=D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2646: nav_get_title_list(D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv\) failed
[16:02:36] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdreadlibdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[16:02:36] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv':
  Metadata:
    encoder         : libebml v1.4.2 + libmatroska v1.6.4
    creation_time   : 2022-11-11T08:53:44.000000Z
  Duration: 00:25:32.45, start: 0.000000, bitrate: 50935 kb/s
  Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 47659401
      DURATION        : 00:25:32.448000000
      NUMBER_OF_FRAMES: 36742
      NUMBER_OF_BYTES : 9129444402
      _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-11-11 08:53:44
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      BPS             : 3272391
      DURATION        : 00:25:32.449000000
      NUMBER_OF_FRAMES: 143667
      NUMBER_OF_BYTES : 626846636
      _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-11-11 08:53:44
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[16:02:36] scan: decoding previews for title 1
[16:02:36] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[16:02:39] scan: 10 previews, 3840x2160, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 9-16-9, chroma location: topleft
[16:02:39] scan: mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.005000, max_luminance=4000.000000
[16:02:39] scan: content light level: max_cll=1106, max_fall=180
[16:02:39] scan: supported video decoders: avcodec qsv
[16:02:39] libhb: scan thread found 1 valid title(s)
[16:02:39] Starting Task: Encoding Pass
[16:02:39] Skipping crop/scale filter
[16:02:39] work: track 1, dithering not supported by codec
[16:02:39] job configuration:
[16:02:39]  * source
[16:02:39]    + D:\Backup Archive\Media Files\Videos\Movies\UHD\A Charlie Brown Christmas -.mkv
[16:02:39]    + title 1, chapter(s) 1 to 1
[16:02:39]    + container: matroska,webm
[16:02:39]    + data rate: 50935 kbps
[16:02:39]  * destination
[16:02:39]    + D:\Backup Archive\Media Files\Converts\A Charlie Brown Christmas --1(4).mp4
[16:02:39]    + container: MPEG-4 (libavformat)
[16:02:39]  * video track
[16:02:39]    + decoder: hevc 10-bit (yuv420p10le)
[16:02:39]    + filters
[16:02:39]      + Framerate Shaper (mode=1)
[16:02:39]        + frame rate: 23.976 fps -> constant 23.976 fps
[16:02:39]      + Format (format=yuv420p)
[16:02:39]    + Output geometry
[16:02:39]      + storage dimensions: 3840 x 2160
[16:02:39]      + pixel aspect ratio: 1 : 1
[16:02:39]      + display dimensions: 3840 x 2160
[16:02:39]    + encoder: H.265 (NVEnc)
[16:02:39]      + preset:  slowest
[16:02:39]      + options: temporal_aq=1:nonref_p=1:strict_gop=1
[16:02:39]      + profile: auto
[16:02:39]      + level:   auto
[16:02:39]      + quality: 15.00 (CQ)
[16:02:39]      + color profile: 9-16-9
[16:02:39]      + chroma location: topleft
[16:02:39]      + mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.005000, max_luminance=4000.000000
[16:02:39]      + content light level: max_cll=1106, max_fall=180
[16:02:39]  * audio track 1
[16:02:39]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[16:02:39]      + samplerate: 48000 Hz
[16:02:39]    + mixdown: 5.1 Channels
[16:02:39]    + encoder: AAC (libavcodec)
[16:02:39]      + bitrate: 1152 kbps, samplerate: 48000 Hz
[16:02:39] sync: expecting 36742 video frames
[16:02:39] encavcodecInit: H.265 (Nvidia NVENC)
[16:02:39] encavcodec: encoding at rc=vbr, multipass=fullres, 15.00
[16:02:39] encavcodec: encoding with stored aspect 1/1
[16:02:40] sync: first pts video is 0
[16:02:40] sync: Chapter 1 at frame 1 time 0
[16:02:40] sync: first pts audio 0x1 is 0

 # Encode Stopped

[16:06:25] work: average encoding speed for job is 31.241531 fps
[16:06:25] vfr: 7019 frames output, 0 dropped and 0 duped for CFR/PFR
[16:06:25] vfr: lost time: 0 (0 frames)
[16:06:25] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:06:25] dca-decoder done: 27751 frames, 0 decoder errors
[16:06:25] hevc-decoder done: 7079 frames, 0 decoder errors
[16:06:25] sync: got 7049 frames, 36742 expected
[16:06:25] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[16:06:25] mux: track 0, 6995 frames, 721477908 bytes, 19634.70 kbps, fifo 256
[16:06:25] mux: track 1, 13779 frames, 27500310 bytes, 748.41 kbps, fifo 512
[16:06:25] Finished work at: Sat Dec 17 16:06:25 2022
[16:06:25] libhb: work result = 1

 # Job Cancelled!

User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: GPU Not Utilized Using NVENC

Post by s55 »

NVEnc is not a GPU Encoder. It's a hardware encoder that happens to be on the GPU so depending on how your monitoring the card, little activity is normal. It's the encode engine that's active with very little activity on the GPU cores.

It's likely your heavily decode bottlenecked here. There isn't anything you can do about that I'm afraid. If you use QSV encoder instead, you can make sure the QSV decoder is turned on in preferences and it should be a little faster than the NVEnc engine for your particular circumstance here.

If you continue to use NVENC, the slowest preset on 1.5.1 is known to have issues. Move 1 up.
Snaptrap
Posts: 25
Joined: Sat Dec 05, 2009 4:27 am

Re: GPU Not Utilized Using NVENC

Post by Snaptrap »

I'll need something to take some of the load off the CPU because when I'm converting 4K using a denoise filter, my system becomes unstable though it is auto overclocked. Maybe I'll use stock settings and see how that runs.

Some of my 4K videos have plenty of grain which I want to reduce a bit for better compression. I was under the impression that a dedicated video card would do just that. The GPU shows plenty of activity when not using a filter, but when I enable them, all the work seems to transfer over to the CPU. I'll try figure something out.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: GPU Not Utilized Using NVENC

Post by mduell »

Fix your power and cooling.

Video cards don't run denoise filters.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: GPU Not Utilized Using NVENC

Post by wyliec2 »

You mentioned system stability and overclocking - FWIW, Handbrake is my ultimate system stability test.

I've overclocked multiple systems and successfully tested stability with extended P95, Aida64, Cinebench R20 & R23 runs only to have Handbrake fail during 4K runs of 24+ hours. Sometimes an outright PC crash and sometimes an App crash (Handbrake dies but PC is still running). CPU temps maxed at 80C, so not relevant to crashes.

Dropping the OC slightly resolves the problem. With my 5950X, I run an all-core OC and have found that 4.6 GHz (unstable) vs 4.4 GHz (stable) equates to a only few minutes per hour difference in encode time...
Deleted User 11865

Re: GPU Not Utilized Using NVENC

Post by Deleted User 11865 »

Snaptrap wrote: Sat Dec 17, 2022 11:07 pm Seems that the GPU isn't used when I have a filter active.
Most of HandBrake's filters are indeed CPU-only; the hardware encoder is still used but of course the CPU is the bottleneck here…
Snaptrap
Posts: 25
Joined: Sat Dec 05, 2009 4:27 am

Re: GPU Not Utilized Using NVENC

Post by Snaptrap »

mduell wrote: Sun Dec 18, 2022 6:32 am Fix your power and cooling.

Video cards don't run denoise filters.
It's an Asus Z490-I MB with a liquid cooler and a 850W Platinum PSU. All components checkout fine and temps never exceed 70c. The system is stable on auto settings with the power draw not much different than OC. Probably a software issue as the crashes usually occur when I'm browsing. Oh well, I don't really need OC anyway; I just like to get the most out of it. Thanks for the input.
anton_cimex
Posts: 1
Joined: Tue Dec 20, 2022 2:14 am

Re: GPU Not Utilized Using NVENC

Post by anton_cimex »

Snaptrap wrote: Mon Dec 19, 2022 9:53 pm
mduell wrote: Sun Dec 18, 2022 6:32 am Fix your power and cooling.

Video cards don't run denoise filters.
It's an Asus Z490-I MB with a liquid cooler and a 850W Platinum PSU. All components checkout fine and temps never exceed 70c. The system is stable on auto settings with the power draw not much different than OC. Probably a software issue as the crashes usually occur when I'm browsing. Oh well, I don't really need OC anyway; I just like to get the most out of it. Thanks for the input.
Long time ago I had a Intel, but remove that auto OC if it´s not a Intel feature, it´s usually pretty trash pre-set if it´s moderboard feature or most software. Do a manual all core OC for this situation, you can get about 5% extra performance (in Cinebench R20) if you can lock all cores to 5.1Ghz :)
And try do a rollback, handbreak 1.52 worked just after install for me and then crashed, now it won´t start.

For what I understand you can more or less just use the GPU to process file format.
If you use something like HWmonitor or GPU-Z it possible to see usage on "video engine". Plz post usage and how many times fast it is with is with NVenc, got similar setup and it would be nice to compare.
Snaptrap
Posts: 25
Joined: Sat Dec 05, 2009 4:27 am

Re: GPU Not Utilized Using NVENC

Post by Snaptrap »

I have had a single crash since reverting the BIOS to stock CPU speeds. Honestly, I think it's fast enough for my games and applications. I only wanted to build a fast ITX system that met my needs with little to no overclocking. I only get an extra 10fps with NVENC anyway while encoding 4K video.
Post Reply