NVENC h264 works, but not h265

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
RedAero
Posts: 2
Joined: Thu Apr 11, 2019 2:29 pm

NVENC h264 works, but not h265

Post by RedAero » Thu Apr 11, 2019 2:37 pm

Description of problem or question:

I have the same exact problem as was reported in this thread, except I have a different GPU and the latest drivers.

In short, using H.264 with Nvidia NVEnc works fine, using H.265 Nvidia NVEnc fails with the error shown in the log:
[hevc_nvenc @ 00000190f6d08940] No NVENC capable devices found

As you can see here, the M2000 series does support H.265 compression (click the Quadro button on the bottom) with the latest drivers, which I installed on the day of writing.

Steps to reproduce the problem (If Applicable):


HandBrake version (e.g., 1.0.0):

1.2.2

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

Win 10 Enterprise x64
10.0.16299 Build 16299


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

Code: Select all

HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 10.0.16299.0
CPU: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Ram: 8072 MB, 
GPU Information:
  Intel(R) HD Graphics 530 - 20.19.15.4483
  NVIDIA Quadro M2000M - 25.21.14.1967
Screen: 1920x1080
Temp Dir: C:\Users\[redacted]\AppData\Local\Temp\
Install Dir: C:\Users\[redacted]\Mine\Progs\HandBrake 1.2.2
Data Dir: C:\Users\[redacted]\AppData\Roaming\HandBrake

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


# Starting Encode ...

[16:16:52] hb_init: starting libhb thread
[16:16:52] thread 190f6974d40 started ("libhb")
[16:16:52] thread 190f672a1d0 started ("work")
[16:16:52] 1 job(s) to process
[16:16:52] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "AlignAVStart": false,
    "File": "C:\\Users\\[redacted]\\Mine\\Vids\\Compressed\\video_x265.m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "720",
          "width": "1280"
        }
      },
      {
        "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": "C:\\Users\\[redacted]\\Mine\\Vids\\Compress\\video.mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "nvenc_h265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "crf-max=26:keyint=60:scenecut=60",
    "Preset": "slow",
    "Profile": "auto",
    "Quality": 23.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[16:16:52] CPU: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
[16:16:52]  - Intel microarchitecture Skylake
[16:16:52]  - logical processor count: 8
[16:16:52] Intel Quick Sync Video support: yes
[16:16:52]  - Intel Media SDK hardware: API 1.19 (minimum: 1.3)
[16:16:52]  - H.264 encoder: yes
[16:16:52]     - preferred implementation: hardware (any) via D3D11
[16:16:52]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[16:16:52]  - H.265 encoder: yes (8bit: yes, 10bit: no)
[16:16:52]     - preferred implementation: hardware (any) via D3D11
[16:16:52]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[16:16:52] hb_scan: path=C:\Users\[redacted]\Mine\Vids\Compress\video.mp4, title_index=1
[16:16:52] thread 190f672a010 started ("scan")
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image C:\Users\[redacted]\Mine\Vids\Compress\video.mp4
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
[16:16:52] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[16:16:52] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\[redacted]\Mine\Vids\Compress\video.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2018-07-31T21:28:53.000000Z
  Duration: 00:19:41.44, start: 0.000000, bitrate: 8322 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 7998 kb/s, 60 fps, 60 tbr, 60k tbn, 120 tbc (default)
    Metadata:
      creation_time   : 2018-07-31T21:28:53.000000Z
      handler_name    : ?Mainconcept Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
    Metadata:
      creation_time   : 2018-07-31T21:28:53.000000Z
      handler_name    : #Mainconcept MP4 Sound Media Handler
[16:16:52] Found ffmpeg 0 chapters, container=mov,mp4,m4a,3gp,3g2,mj2
[16:16:52] scan: decoding previews for title 1
[16:16:52] scan: preview 1
[16:16:52] fifo_close: trashing 0 buffer(s)
[16:16:52] scan: audio 0x1: aac, rate=48000Hz, bitrate=317375 English (AAC LC) (2.0 ch)
[16:16:52] scan: preview 2
[16:16:52] scan: preview 3
[16:16:52] scan: preview 4
[16:16:52] scan: preview 5
[16:16:52] scan: preview 6
[16:16:52] scan: preview 7
[16:16:53] scan: preview 8
[16:16:53] scan: preview 9
[16:16:53] scan: preview 10
[16:16:53] scan: 10 previews, 1920x1080, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[16:16:53] scan: supported video decoders: avcodec qsv
[16:16:53] Freed 1 buffers of size 1024
[16:16:53] Freed 1 buffers of size 2048
[16:16:53] Freed 1 buffers of size 16384
[16:16:53] Freed 1 buffers of size 32768
[16:16:53] Freed 1 buffers of size 65536
[16:16:53] Freed 1 buffers of size 131072
[16:16:53] Freed 1 buffers of size 262144
[16:16:53] Freed 2 buffers of size 4194304
[16:16:53] Freed 1 buffers of size 8388608
[16:16:53] Allocated 17288192 bytes of buffers on this pass and Freed 17288192 bytes, 0 bytes leaked
[16:16:53] thread 190f672a010 exited ("scan")
[16:16:53] thread 190f672a010 joined ("scan")
[16:16:53] libhb: scan thread found 1 valid title(s)
[16:16:53] starting job
[16:16:53] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[16:16:53] Auto Passthru: fallback is AC3
[16:16:53] Auto Passthru: using AAC Passthru for track 1
[16:16:53] job configuration:
[16:16:53]  * source
[16:16:53]    + C:\Users\[redacted]\Mine\Vids\Compress\video.mp4
[16:16:53]    + title 1, chapter(s) 1 to 1
[16:16:53]    + container: mov,mp4,m4a,3gp,3g2,mj2
[16:16:53]    + data rate: 8322 kbps
[16:16:53]  * destination
[16:16:53]    + C:\Users\[redacted]\Mine\Vids\Compressed\video_x265.m4v
[16:16:53]    + container: MPEG-4 (libavformat)
[16:16:53]  * video track
[16:16:53]    + decoder: h264
[16:16:53]      + bitrate 7998 kbps
[16:16:53]    + filters
[16:16:53]      + Framerate Shaper (mode=1)
[16:16:53]        + frame rate: 60.000 fps -> constant 60.000 fps
[16:16:53]      + Crop and Scale (width=1280:height=720:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[16:16:53]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1280 * 720
[16:16:53]    + Output geometry
[16:16:53]      + storage dimensions: 1280 x 720
[16:16:53]      + pixel aspect ratio: 1 : 1
[16:16:53]      + display dimensions: 1280 x 720
[16:16:53]    + encoder: H.265 (NVEnc)
[16:16:53]      + preset:  slow
[16:16:53]      + options: crf-max=26:keyint=60:scenecut=60
[16:16:53]      + profile: auto
[16:16:53]      + level:   auto
[16:16:53]      + quality: 23.00 (CQ)
[16:16:53]      + color profile: 1-1-1
[16:16:53]  * audio track 1
[16:16:53]    + decoder: English (AAC LC) (2.0 ch) (track 1, id 0x1)
[16:16:53]      + bitrate: 317 kbps, samplerate: 48000 Hz
[16:16:53]    + AAC Passthru
[16:16:53] sync: expecting 70886 video frames
[16:16:53] thread 190f672a010 started ("Audio Synchronization")
[16:16:53] encavcodecInit: H.265 (Nvidia NVENC)
[16:16:53] encavcodec: encoding at rc=constqp QP 23.00
[16:16:53] encavcodec: encoding with stored aspect 1/1
[hevc_nvenc @ 00000190f6d08940] No NVENC capable devices found
[16:16:53] encavcodecInit: avcodec_open failed
Failure to initialise thread 'FFMPEG encoder (libavcodec)'
[16:16:53] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[16:16:53] vfr: lost time: 0 (0 frames)
[16:16:53] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] aac-decoder done: 0 frames, 0 decoder errors
[16:16:53] h264-decoder done: 0 frames, 0 decoder errors
[16:16:53] sync: got 0 frames, 70886 expected
[16:16:53] thread 190f672a010 exited ("Audio Synchronization")
[16:16:53] thread 190f672a010 joined ("Audio Synchronization")
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] fifo_close: trashing 0 buffer(s)
[16:16:53] Allocated 0 bytes of buffers on this pass and Freed 0 bytes, 0 bytes leaked
[16:16:53] thread 190f672a1d0 exited ("work")
[16:16:53] thread 190f672a1d0 joined ("work")
[16:16:53] libhb: work result = 3

# Encode Completed ...



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

Re: NVENC h264 works, but not h265

Post by s55 » Thu Apr 11, 2019 6:22 pm

We are not supporting anything older than Pascal I'm afraid. Your GPU doesn't have the full H.265 capabilities so it's most likely failing because we are initialising with capabilities it doesn't support.

We still have an open ticket to implement proper hardware checking on NVEnc so unfortunately the encoder shows up, even when it's not going to work.

Your system does have QuickSync H.265 supported so I'd recommend using that. Generally does a better job if not quite as fast.

RedAero
Posts: 2
Joined: Thu Apr 11, 2019 2:29 pm

Re: NVENC h264 works, but not h265

Post by RedAero » Fri Apr 12, 2019 10:17 am

That's a pity... Is there compression software that does support H.265 on this model of GPU? I mean, I have it, I might as well use it.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5452
Joined: Sat Feb 09, 2008 7:21 pm

Re: NVENC h264 works, but not h265

Post by JohnAStebbins » Fri Apr 12, 2019 2:06 pm

GPUs are not good at encoding/compression. Even the most recent "GPUs" do not match software encoders for quality. And the only way that "GPU" encoding has gotten fast is by the hardware manufacturers adding a dedicated hardware encoder that sits on the same silicon as the GPU but in no way contributes to the GPUs regular function of rendering and displaying graphics on the screen. These are really separate co-processors designed specifically for encoding video and not a "GPU".

NVidia has a CUDA based encoder that actually uses the GPU for encoding that might work on your hardware. But HandBrake has never supported encoding with CUDA because the results were so awful. It is not particularly fast and the quality is really poor.

Post Reply