Nvidia NVENC Encoder not working ?

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
Lagodass
Posts: 4
Joined: Sun Apr 28, 2019 4:33 am

Nvidia NVENC Encoder not working ?

Post by Lagodass »

Hello,

I try to shrink down the size of my BD and DVD collection, so I try to use HandBrake.
The probem is, the option "NVENC" doesn't seem to work : a test video takes the same amount of time to encode, NVENC enabled or not.

My CPU is Core i5-2500k @3.30 GHz
My GPU is GTX 1080 Ti

I guess the GPU should make a difference in the time of achievement...

Am I right ?
Any Idea to fix it ?

Cheers
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Nvidia NVENC Encoder not working ?

Post by mduell »

Post the encode logs in the support forum.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Nvidia NVENC Encoder not working ?

Post by Woodstock »

"NVENC" and "GPU" are not the same thing - the NVENC hardware is installed on the same board as the GPU, but isn't the same hardware.

Without the logs, it is impossible to say what is wrong or how to fix it. Logs tell us what hardware was seen and what drivers are present.
Lagodass
Posts: 4
Joined: Sun Apr 28, 2019 4:33 am

Re: Nvidia NVENC Encoder not working ?

Post by Lagodass »

Here is one of the logs :

Code: Select all

HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
Ram: 16365 MB, 
GPU Information:
  NVIDIA GeForce GTX 1080 Ti - 24.21.13.9764
Screen: 2560x1440
Temp Dir: E:\TEMP\
Install Dir: E:\Program Files\HandBrake
Data Dir: C:\Users\feiqqvurz\AppData\Roaming\HandBrake

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


# Starting Encode ...

[08:06:00] hb_init: starting libhb thread
[08:06:00] 1 job(s) to process
[08:06:00] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": "av_aac",
        "Gain": 0.0,
        "Mixdown": 4,
        "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"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "E:\\Ripp\\Handbrake\\Test installé 2-12.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 5,
        "Settings": {
          "mode": "3"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 7,
        "Settings": {
          "qp": "7"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "E:\\Ripp\\backup\\GAMEOFTHRONES_D1\\BDMV\\STREAM\\01057.m2ts"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": true,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 2,
        "Offset": 0,
        "Track": 1
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 3,
        "Offset": 0,
        "Track": 2
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 4,
        "Offset": 0,
        "Track": 3
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 5,
        "Offset": 0,
        "Track": 4
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 6,
        "Offset": 0,
        "Track": 5
      }
    ]
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "strong-intra-smoothing=0:rect=0",
    "Preset": "slow",
    "Profile": "main",
    "Quality": 12.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[08:06:00] CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
[08:06:00]  - Intel microarchitecture Sandy Bridge
[08:06:00]  - logical processor count: 4
[08:06:00] Intel Quick Sync Video support: no
[08:06:00] hb_scan: path=E:\Ripp\backup\GAMEOFTHRONES_D1\BDMV\STREAM\01057.m2ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image E:\Ripp\backup\GAMEOFTHRONES_D1\BDMV\STREAM\01057.m2ts
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
[08:06:00] 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
[08:06:00] dvd: not a dvd - trying as a stream/file instead
[08:06:00] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[08:06:00] Found the following PIDS
[08:06:00]     Video PIDS :
[08:06:00]       0x1011 type H.264 (0x1b)
[08:06:00]     Audio PIDS :
[08:06:00]       0x1100 type DTS (0x82)
[08:06:00]     Subtitle PIDS :
[08:06:00]       0x1200 type PGS Subtitle (0x90)
[08:06:00]       0x1201 type PGS Subtitle (0x90)
[08:06:00]       0x1202 type PGS Subtitle (0x90)
[08:06:00]       0x1203 type PGS Subtitle (0x90)
[08:06:00]       0x1204 type PGS Subtitle (0x90)
[08:06:00]       0x1205 type PGS Subtitle (0x90)
[08:06:00]     Other PIDS :
[08:06:00]       0x1001 type Unknown (0xff) (PCR)
[08:06:00] stream id 0x1100 (type 0x82 substream 0x0) audio 0x1100
[08:06:00] stream id 0x1200 (type 0x90 substream 0x0) subtitle 0x1200
[08:06:00] stream id 0x1201 (type 0x90 substream 0x0) subtitle 0x1201
[08:06:00] stream id 0x1202 (type 0x90 substream 0x0) subtitle 0x1202
[08:06:00] stream id 0x1203 (type 0x90 substream 0x0) subtitle 0x1203
[08:06:00] stream id 0x1204 (type 0x90 substream 0x0) subtitle 0x1204
[08:06:00] stream id 0x1205 (type 0x90 substream 0x0) subtitle 0x1205
[08:06:00] scan: decoding previews for title 1
[08:06:00] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[08:06:00] scan: audio 0x1100: dca, rate=48000Hz, bitrate=768000 Unknown (DTS) (2.0 ch)
[08:06:01] stream: 28 good frames, 0 errors (0%)
[08:06:01] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[08:06:01] scan: supported video decoders: avcodec qsv
[08:06:01] libhb: scan thread found 1 valid title(s)
[08:06:01] starting job
[08:06:01] decomb filter thread started for segment 0
[08:06:01] decomb filter thread started for segment 1
[08:06:01] decomb filter thread started for segment 2
[08:06:01] decomb filter thread started for segment 3
[08:06:01] decomb check thread started for segment 0
[08:06:01] decomb check thread started for segment 1
[08:06:01] decomb check thread started for segment 2
[08:06:01] decomb check thread started for segment 3
[08:06:01] mask filter thread started for segment 0
[08:06:01] mask filter thread started for segment 1
[08:06:01] mask filter thread started for segment 2
[08:06:01] mask filter thread started for segment 3
[08:06:01] mask erode thread started for segment 0
[08:06:01] mask erode thread started for segment 1
[08:06:01] mask erode thread started for segment 2
[08:06:01] mask erode thread started for segment 3
[08:06:01] mask dilate thread started for segment 0
[08:06:01] mask dilate thread started for segment 1
[08:06:01] mask dilate thread started for segment 2
[08:06:01] mask dilate thread started for segment 3
[08:06:01] work: only 1 chapter, disabling chapter markers
[08:06:01] job configuration:
[08:06:01]  * source
[08:06:01]    + E:\Ripp\backup\GAMEOFTHRONES_D1\BDMV\STREAM\01057.m2ts
[08:06:01]    + title 1, chapter(s) 1 to 1
[08:06:01]  * destination
[08:06:01]    + E:\Ripp\Handbrake\Test installé 2-12.mkv
[08:06:01]    + container: Matroska (libavformat)
[08:06:01]  * video track
[08:06:01]    + decoder: h264
[08:06:01]      + bitrate 200 kbps
[08:06:01]    + filters
[08:06:01]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[08:06:01]      + avfilter (yadif='mode=send_frame:deint=interlaced')
[08:06:01]        + yadif: mode=send_frame, deint=interlaced
[08:06:01]      + Framerate Shaper (mode=1:rate=27000000/900000)
[08:06:01]        + frame rate: 29.970 fps -> constant 30.000 fps
[08:06:01]      + Deblock (pp7) (qp=7)
[08:06:01]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[08:06:01]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[08:06:01]    + Output geometry
[08:06:01]      + storage dimensions: 1920 x 1080
[08:06:01]      + pixel aspect ratio: 1 : 1
[08:06:01]      + display dimensions: 1920 x 1080
[08:06:01]  * Foreign Audio Search: Passthrough
[08:06:01]    + subtitle, Unknown [PGS] (track 2, id 0x1200, Picture)
[08:06:01]    + subtitle, Unknown [PGS] (track 3, id 0x1201, Picture)
[08:06:01]    + subtitle, Unknown [PGS] (track 4, id 0x1202, Picture)
[08:06:01]    + subtitle, Unknown [PGS] (track 5, id 0x1203, Picture)
[08:06:01]    + subtitle, Unknown [PGS] (track 6, id 0x1204, Picture)
[08:06:01]    + subtitle, Unknown [PGS] (track 7, id 0x1205, Picture)
[08:06:01] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[08:06:01] sync: expecting 4008 video frames
[08:06:01] hb_ts_stream_decode - eof
[08:06:01] reader: done. 1 scr changes
[08:06:01] work: average encoding speed for job is 0.000000 fps
[08:06:01] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[08:06:01] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[08:06:01] vfr: lost time: 0 (0 frames)
[08:06:01] vfr: gained time: 0 (0 frames) (0 not accounted for)
[08:06:01] stream: 4256 good frames, 0 errors (0%)
[08:06:01] h264-decoder done: 0 frames, 1 decoder errors
[08:06:01] sync: got 0 frames, 4008 expected
[08:06:01] Subtitle track 2 (id 0x1200) 'Unknown [PGS]': 48 hits (0 forced)
[08:06:01] Subtitle track 3 (id 0x1201) 'Unknown [PGS]': 48 hits (0 forced)
[08:06:01] Subtitle track 4 (id 0x1202) 'Unknown [PGS]': 48 hits (0 forced)
[08:06:01] Subtitle track 5 (id 0x1203) 'Unknown [PGS]': 48 hits (0 forced)
[08:06:01] Subtitle track 6 (id 0x1204) 'Unknown [PGS]': 48 hits (0 forced)
[08:06:01] Subtitle track 7 (id 0x1205) 'Unknown [PGS]': 48 hits (0 forced)
[08:06:01] No candidate detected during subtitle scan
[08:06:01] starting job
[08:06:01] decomb filter thread started for segment 0
[08:06:01] decomb filter thread started for segment 1
[08:06:01] decomb filter thread started for segment 2
[08:06:01] decomb filter thread started for segment 3
[08:06:01] decomb check thread started for segment 0
[08:06:01] decomb check thread started for segment 1
[08:06:01] decomb check thread started for segment 2
[08:06:01] decomb check thread started for segment 3
[08:06:01] mask filter thread started for segment 0
[08:06:01] mask filter thread started for segment 1
[08:06:01] mask filter thread started for segment 2
[08:06:01] mask erode thread started for segment 0
[08:06:01] mask erode thread started for segment 1
[08:06:01] mask filter thread started for segment 3
[08:06:01] mask erode thread started for segment 3
[08:06:01] mask dilate thread started for segment 0
[08:06:01] mask dilate thread started for segment 1
[08:06:01] mask dilate thread started for segment 2
[08:06:01] mask erode thread started for segment 2
[08:06:01] mask dilate thread started for segment 3
[08:06:01] work: only 1 chapter, disabling chapter markers
[08:06:01] job configuration:
[08:06:01]  * source
[08:06:01]    + E:\Ripp\backup\GAMEOFTHRONES_D1\BDMV\STREAM\01057.m2ts
[08:06:01]    + title 1, chapter(s) 1 to 1
[08:06:01]  * destination
[08:06:01]    + E:\Ripp\Handbrake\Test installé 2-12.mkv
[08:06:01]    + container: Matroska (libavformat)
[08:06:01]  * video track
[08:06:01]    + decoder: h264
[08:06:01]      + bitrate 200 kbps
[08:06:01]    + filters
[08:06:01]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[08:06:01]      + avfilter (yadif='mode=send_frame:deint=interlaced')
[08:06:01]        + yadif: mode=send_frame, deint=interlaced
[08:06:01]      + Framerate Shaper (mode=1:rate=27000000/900000)
[08:06:01]        + frame rate: 29.970 fps -> constant 30.000 fps
[08:06:01]      + Deblock (pp7) (qp=7)
[08:06:01]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[08:06:01]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[08:06:01]    + Output geometry
[08:06:01]      + storage dimensions: 1920 x 1080
[08:06:01]      + pixel aspect ratio: 1 : 1
[08:06:01]      + display dimensions: 1920 x 1080
[08:06:01]    + encoder: H.265 (libx265)
[08:06:01]      + preset:  slow
[08:06:01]      + options: strong-intra-smoothing=0:rect=0
[08:06:01]      + profile: main
[08:06:01]      + quality: 12.00 (RF)
[08:06:01]      + color profile: 1-1-1
[08:06:01]  * subtitle track 1, Unknown [PGS] (track 0, id 0x1200, Picture) -> Passthrough
[08:06:01]  * subtitle track 2, Unknown [PGS] (track 1, id 0x1201, Picture) -> Passthrough
[08:06:01]  * subtitle track 3, Unknown [PGS] (track 2, id 0x1202, Picture) -> Passthrough
[08:06:01]  * subtitle track 4, Unknown [PGS] (track 3, id 0x1203, Picture) -> Passthrough
[08:06:01]  * subtitle track 5, Unknown [PGS] (track 4, id 0x1204, Picture) -> Passthrough
[08:06:01]  * subtitle track 6, Unknown [PGS] (track 5, id 0x1205, Picture) -> Passthrough
[08:06:01]  * audio track 1
[08:06:01]    + decoder: Unknown (DTS) (2.0 ch) (track 1, id 0x1100)
[08:06:01]      + bitrate: 768 kbps, samplerate: 48000 Hz
[08:06:01]    + mixdown: Stereo
[08:06:01]    + dither: none
[08:06:01]    + encoder: AAC (libavcodec)
[08:06:01]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:06:01] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[08:06:01] sync: expecting 4008 video frames
x265 [info]: HEVC encoder version 2.9
x265 [info]: build info [Windows][GCC 8.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias: 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-12.0 / 0.60
x265 [info]: tools: limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00 rskip
x265 [info]: tools: signhide tmvp lslices=4 deblock sao
[08:06:01] sync: first pts video is 0
[08:06:01] sync: first pts audio 0x1100 is 0
[08:06:03] sync: first pts subtitle 0x1200 is 201201
[08:06:04] sync: first pts subtitle 0x1201 is 201201
[08:06:04] sync: first pts subtitle 0x1202 is 201201
[08:06:04] sync: first pts subtitle 0x1203 is 201201
[08:06:04] sync: first pts subtitle 0x1204 is 201201
[08:06:04] sync: first pts subtitle 0x1205 is 201201
[08:21:27] hb_ts_stream_decode - eof
[08:21:30] reader: done. 1 scr changes
[08:21:40] work: average encoding speed for job is 4.520128 fps
[08:21:40] comb detect: heavy 1642 | light 443 | uncombed 2171 | total 4256
[08:21:40] vfr: 4260 frames output, 0 dropped and 4 duped for CFR/PFR
[08:21:40] vfr: lost time: 0 (0 frames)
[08:21:40] vfr: gained time: 0 (0 frames) (0 not accounted for)
[08:21:40] stream: 4256 good frames, 0 errors (0%)
[08:21:40] dca-decoder done: 13315 frames, 0 decoder errors
[08:21:40] h264-decoder done: 4256 frames, 0 decoder errors
[08:21:40] sync: got 4256 frames, 4008 expected
[08:21:40] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x265 [info]: frame I:     52, Avg QP:9.47  kb/s: 35791.51
x265 [info]: frame P:    922, Avg QP:11.62  kb/s: 18420.58
x265 [info]: frame B:   3286, Avg QP:16.18  kb/s: 3640.78
x265 [info]: Weighted P-Frames: Y:2.7% UV:0.8%
x265 [info]: consecutive B-frames: 6.8% 2.5% 8.0% 12.1% 70.6%
encoded 4260 frames in 938.42s (4.54 fps), 7232.05 kb/s, Avg QP:15.11
[08:21:40] mux: track 0, 4260 frames, 128385884 bytes, 7231.31 kbps, fifo 512
[08:21:40] mux: track 1, 6658 frames, 2812419 bytes, 158.41 kbps, fifo 1024
[08:21:40] mux: track 2, 96 frames, 1485859 bytes, 83.69 kbps, fifo 16
[08:21:40] mux: track 3, 96 frames, 1441351 bytes, 81.18 kbps, fifo 16
[08:21:40] mux: track 4, 96 frames, 1516967 bytes, 85.44 kbps, fifo 16
[08:21:40] mux: track 5, 96 frames, 1522047 bytes, 85.73 kbps, fifo 16
[08:21:40] mux: track 6, 96 frames, 1503939 bytes, 84.71 kbps, fifo 16
[08:21:40] mux: track 7, 96 frames, 1291843 bytes, 72.76 kbps, fifo 16
[08:21:40] libhb: work result = 0

# Encode Completed ...
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Nvidia NVENC Encoder not working ?

Post by BradleyS »

Moved to Windows support forum.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Nvidia NVENC Encoder not working ?

Post by BradleyS »

Just to be sure, you went to the video tab and changed the encoder to NVENC?
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Nvidia NVENC Encoder not working ?

Post by Woodstock »

[08:06:00] CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
[08:06:00] - Intel microarchitecture Sandy Bridge
[08:06:00] - logical processor count: 4
[08:06:00] Intel Quick Sync Video support: no
Handbrake is not detecting support for either QSV or NVENC on your system. You're using the x265 encoder, which is software only.

Support for hardware encoding is dependent upon having both the hardware AND drivers that support the encoders.
Deleted User 11865

Re: Nvidia NVENC Encoder not working ?

Post by Deleted User 11865 »

NVENC support is listed separately from the QSV stuff (or not listed at all, cannot remember). The GPU at least should be NVENC HEVC capable, but no idea about whether other requirements are missing.
Lagodass
Posts: 4
Joined: Sun Apr 28, 2019 4:33 am

Re: Nvidia NVENC Encoder not working ?

Post by Lagodass »

Hello,
I investigated the stuff a little bit further...
@BradleyS : I did, for sure. I tested with and without it ticked.
@Woodstock : I'm not sure about what you exactly mean, but my computer has drivers and hardware able to encode with h265 HEVC

I spent time to investigate, and here is the point where I am :
- I probably didn't selected the good video codec, in the video tab.
- If you enable NVENC in the preferences menu, you have to restart Handbrake to make it appears in the codecs list (I got this idea when writing this post ^^ ).
- I don't know if adding a Fast Fourrier Transforming dll was necessary (libfftw3-3.dll , libfftw3f-3.dll , libfftw3l-3.dll )

I almost manage to find the solution, but :
- Despite the encoding speed is about 3 times faster (4-5 fps, vs 14-17 fps, in average), it's quite disappointing, because (assuming my CPU is a bottleneck in this task) neither my GPU (obvious) nor my CPU (strange) are at full load.
- I first managed to use my GPU with StaxRip, and the encoding speed is about 150-180 fps (yes, approximately 30 times faster than only with my CPU, and 10 times than handbrake), all things almost equal otherwise, for what I know.

Here is my last log :

Code: Select all

HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
Ram: 16365 MB, 
GPU Information:
  NVIDIA GeForce GTX 1080 Ti - 24.21.13.9764
Screen: 2560x1440
Temp Dir: E:\TEMP\
Install Dir: E:\Program Files\HandBrake
Data Dir: C:\Users\feiqqvurz\AppData\Roaming\HandBrake

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


# Starting Encode ...

[03:23:42] hb_init: starting libhb thread
[03:23:42] 1 job(s) to process
[03:23:42] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": "av_aac",
        "Gain": 0.0,
        "Mixdown": 4,
        "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"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "E:\\Ripp\\Handbrake\\test QP29.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 5,
        "Settings": {
          "mode": "3"
        }
      },
      {
        "ID": 7,
        "Settings": {
          "qp": "7"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "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": "E:\\Ripp\\Saison 1\\BR 1\\GAMEOFTHRONES_D1\\BDMV\\STREAM\\01057.m2ts"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": true,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": true,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 2,
        "Offset": 0,
        "Track": 1
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 3,
        "Offset": 0,
        "Track": 2
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 4,
        "Offset": 0,
        "Track": 3
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 5,
        "Offset": 0,
        "Track": 4
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 6,
        "Offset": 0,
        "Track": 5
      }
    ]
  },
  "Video": {
    "Encoder": "nvenc_h265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "default",
    "Profile": "auto",
    "Quality": 29.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[03:23:42] CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
[03:23:42]  - Intel microarchitecture Sandy Bridge
[03:23:42]  - logical processor count: 4
[03:23:42] Intel Quick Sync Video support: no
[03:23:42] hb_scan: path=E:\Ripp\Saison 1\BR 1\GAMEOFTHRONES_D1\BDMV\STREAM\01057.m2ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image E:\Ripp\Saison 1\BR 1\GAMEOFTHRONES_D1\BDMV\STREAM\01057.m2ts
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
[03:23:42] 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
[03:23:42] dvd: not a dvd - trying as a stream/file instead
[03:23:42] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[03:23:42] Found the following PIDS
[03:23:42]     Video PIDS :
[03:23:42]       0x1011 type H.264 (0x1b)
[03:23:42]     Audio PIDS :
[03:23:42]       0x1100 type DTS (0x82)
[03:23:42]     Subtitle PIDS :
[03:23:42]       0x1200 type PGS Subtitle (0x90)
[03:23:42]       0x1201 type PGS Subtitle (0x90)
[03:23:42]       0x1202 type PGS Subtitle (0x90)
[03:23:42]       0x1203 type PGS Subtitle (0x90)
[03:23:42]       0x1204 type PGS Subtitle (0x90)
[03:23:42]       0x1205 type PGS Subtitle (0x90)
[03:23:42]     Other PIDS :
[03:23:42]       0x1001 type Unknown (0xff) (PCR)
[03:23:42] stream id 0x1100 (type 0x82 substream 0x0) audio 0x1100
[03:23:42] stream id 0x1200 (type 0x90 substream 0x0) subtitle 0x1200
[03:23:42] stream id 0x1201 (type 0x90 substream 0x0) subtitle 0x1201
[03:23:42] stream id 0x1202 (type 0x90 substream 0x0) subtitle 0x1202
[03:23:42] stream id 0x1203 (type 0x90 substream 0x0) subtitle 0x1203
[03:23:42] stream id 0x1204 (type 0x90 substream 0x0) subtitle 0x1204
[03:23:42] stream id 0x1205 (type 0x90 substream 0x0) subtitle 0x1205
[03:23:42] scan: decoding previews for title 1
[03:23:42] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[03:23:42] scan: audio 0x1100: dca, rate=48000Hz, bitrate=768000 Unknown (DTS) (2.0 ch)
[03:23:43] stream: 28 good frames, 0 errors (0%)
[03:23:43] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[03:23:43] scan: supported video decoders: avcodec qsv
[03:23:43] libhb: scan thread found 1 valid title(s)
[03:23:43] starting job
[03:23:43] work: only 1 chapter, disabling chapter markers
[03:23:43] job configuration:
[03:23:43]  * source
[03:23:43]    + E:\Ripp\Saison 1\BR 1\GAMEOFTHRONES_D1\BDMV\STREAM\01057.m2ts
[03:23:43]    + title 1, chapter(s) 1 to 1
[03:23:43]  * destination
[03:23:43]    + E:\Ripp\Handbrake\test QP29.mkv
[03:23:43]    + container: Matroska (libavformat)
[03:23:43]  * video track
[03:23:43]    + decoder: h264
[03:23:43]      + bitrate 200 kbps
[03:23:43]    + filters
[03:23:43]      + avfilter (yadif='mode=send_frame')
[03:23:43]        + yadif: mode=send_frame
[03:23:43]      + Framerate Shaper (mode=1)
[03:23:43]        + frame rate: 29.970 fps -> constant 29.970 fps
[03:23:43]      + Deblock (pp7) (qp=7)
[03:23:43]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[03:23:43]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[03:23:43]    + Output geometry
[03:23:43]      + storage dimensions: 1920 x 1080
[03:23:43]      + pixel aspect ratio: 1 : 1
[03:23:43]      + display dimensions: 1920 x 1080
[03:23:43]  * Foreign Audio Search: Passthrough
[03:23:43]    + subtitle, Unknown [PGS] (track 2, id 0x1200, Picture)
[03:23:43]    + subtitle, Unknown [PGS] (track 3, id 0x1201, Picture)
[03:23:43]    + subtitle, Unknown [PGS] (track 4, id 0x1202, Picture)
[03:23:43]    + subtitle, Unknown [PGS] (track 5, id 0x1203, Picture)
[03:23:43]    + subtitle, Unknown [PGS] (track 6, id 0x1204, Picture)
[03:23:43]    + subtitle, Unknown [PGS] (track 7, id 0x1205, Picture)
[03:23:43] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[03:23:43] sync: expecting 4008 video frames
[03:23:43] hb_ts_stream_decode - eof
[03:23:43] reader: done. 1 scr changes
[03:23:43] work: average encoding speed for job is 0.000000 fps
[03:23:43] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[03:23:43] vfr: lost time: 0 (0 frames)
[03:23:43] vfr: gained time: 0 (0 frames) (0 not accounted for)
[03:23:43] stream: 4256 good frames, 0 errors (0%)
[03:23:43] h264-decoder done: 0 frames, 1 decoder errors
[03:23:43] sync: got 0 frames, 4008 expected
[03:23:43] Subtitle track 2 (id 0x1200) 'Unknown [PGS]': 48 hits (0 forced)
[03:23:43] Subtitle track 3 (id 0x1201) 'Unknown [PGS]': 48 hits (0 forced)
[03:23:43] Subtitle track 4 (id 0x1202) 'Unknown [PGS]': 48 hits (0 forced)
[03:23:43] Subtitle track 5 (id 0x1203) 'Unknown [PGS]': 48 hits (0 forced)
[03:23:43] Subtitle track 6 (id 0x1204) 'Unknown [PGS]': 48 hits (0 forced)
[03:23:43] Subtitle track 7 (id 0x1205) 'Unknown [PGS]': 48 hits (0 forced)
[03:23:43] No candidate detected during subtitle scan
[03:23:43] starting job
[03:23:43] work: only 1 chapter, disabling chapter markers
[03:23:43] job configuration:
[03:23:43]  * source
[03:23:43]    + E:\Ripp\Saison 1\BR 1\GAMEOFTHRONES_D1\BDMV\STREAM\01057.m2ts
[03:23:43]    + title 1, chapter(s) 1 to 1
[03:23:43]  * destination
[03:23:43]    + E:\Ripp\Handbrake\test QP29.mkv
[03:23:43]    + container: Matroska (libavformat)
[03:23:43]  * video track
[03:23:43]    + decoder: h264
[03:23:43]      + bitrate 200 kbps
[03:23:43]    + filters
[03:23:43]      + avfilter (yadif='mode=send_frame')
[03:23:43]        + yadif: mode=send_frame
[03:23:43]      + Framerate Shaper (mode=1)
[03:23:43]        + frame rate: 29.970 fps -> constant 29.970 fps
[03:23:43]      + Deblock (pp7) (qp=7)
[03:23:43]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[03:23:43]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[03:23:43]    + Output geometry
[03:23:43]      + storage dimensions: 1920 x 1080
[03:23:43]      + pixel aspect ratio: 1 : 1
[03:23:43]      + display dimensions: 1920 x 1080
[03:23:43]    + encoder: H.265 (NVEnc)
[03:23:43]      + preset:  default
[03:23:43]      + profile: auto
[03:23:43]      + level:   auto
[03:23:43]      + quality: 29.00 (CQ)
[03:23:43]      + color profile: 1-1-1
[03:23:43]  * subtitle track 1, Unknown [PGS] (track 0, id 0x1200, Picture) -> Passthrough, Default
[03:23:43]  * subtitle track 2, Unknown [PGS] (track 1, id 0x1201, Picture) -> Passthrough
[03:23:43]  * subtitle track 3, Unknown [PGS] (track 2, id 0x1202, Picture) -> Passthrough
[03:23:43]  * subtitle track 4, Unknown [PGS] (track 3, id 0x1203, Picture) -> Passthrough
[03:23:43]  * subtitle track 5, Unknown [PGS] (track 4, id 0x1204, Picture) -> Passthrough
[03:23:43]  * subtitle track 6, Unknown [PGS] (track 5, id 0x1205, Picture) -> Passthrough
[03:23:43]  * audio track 1
[03:23:43]    + decoder: Unknown (DTS) (2.0 ch) (track 1, id 0x1100)
[03:23:43]      + bitrate: 768 kbps, samplerate: 48000 Hz
[03:23:43]    + mixdown: Stereo
[03:23:43]    + dither: none
[03:23:43]    + encoder: AAC (libavcodec)
[03:23:43]      + bitrate: 160 kbps, samplerate: 48000 Hz
[03:23:43] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[03:23:43] sync: expecting 4008 video frames
[03:23:43] encavcodecInit: H.265 (Nvidia NVENC)
[03:23:43] encavcodec: encoding at rc=constqp QP 29.00
[03:23:43] encavcodec: encoding with stored aspect 1/1
[03:23:43] sync: first pts video is 0
[03:23:43] sync: first pts audio 0x1100 is 0
[03:23:46] sync: first pts subtitle 0x1200 is 201201
[03:23:46] sync: first pts subtitle 0x1201 is 201201
[03:23:46] sync: first pts subtitle 0x1202 is 201201
[03:23:46] sync: first pts subtitle 0x1203 is 201201
[03:23:46] sync: first pts subtitle 0x1204 is 201201
[03:23:46] sync: first pts subtitle 0x1205 is 201201
[03:28:26] hb_ts_stream_decode - eof
[03:28:26] reader: done. 1 scr changes
[03:28:33] work: average encoding speed for job is 14.801770 fps
[03:28:33] vfr: 4256 frames output, 0 dropped and 0 duped for CFR/PFR
[03:28:33] vfr: lost time: 0 (0 frames)
[03:28:33] vfr: gained time: 0 (0 frames) (0 not accounted for)
[03:28:33] stream: 4256 good frames, 0 errors (0%)
[03:28:33] dca-decoder done: 13315 frames, 0 decoder errors
[03:28:33] h264-decoder done: 4256 frames, 0 decoder errors
[03:28:33] sync: got 4256 frames, 4008 expected
[03:28:33] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
[03:28:33] mux: track 0, 4256 frames, 18653083 bytes, 1050.57 kbps, fifo 2048
[03:28:33] mux: track 1, 6658 frames, 2812419 bytes, 158.40 kbps, fifo 4096
[03:28:33] mux: track 2, 96 frames, 1485859 bytes, 83.69 kbps, fifo 64
[03:28:33] mux: track 3, 96 frames, 1441351 bytes, 81.18 kbps, fifo 64
[03:28:33] mux: track 4, 96 frames, 1516967 bytes, 85.44 kbps, fifo 64
[03:28:33] mux: track 5, 96 frames, 1522047 bytes, 85.72 kbps, fifo 64
[03:28:33] mux: track 6, 96 frames, 1503939 bytes, 84.70 kbps, fifo 64
[03:28:33] mux: track 7, 96 frames, 1291843 bytes, 72.76 kbps, fifo 64
[03:28:33] libhb: work result = 0

# Encode Completed ...

Last edited by Lagodass on Tue Apr 30, 2019 2:00 am, edited 2 times in total.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Nvidia NVENC Encoder not working ?

Post by BradleyS »

Disable any filters you don't need and be mindful of audio encoding happening on the CPU.
Lagodass
Posts: 4
Joined: Sun Apr 28, 2019 4:33 am

Re: Nvidia NVENC Encoder not working ?

Post by Lagodass »

BradleyS wrote: Tue Apr 30, 2019 1:56 am Disable any filters you don't need and be mindful of audio encoding happening on the CPU.
I use yadif to deinterlace (curiously necessary...) but, it seems the slowness comes from the "deblock" filter. I reduced it to 0, and I have an average fps of 150 (vs 170 with StaxRip, but probably with a different way to calculate it).

It seems I reached a correct speed of work !

Thank you all
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Nvidia NVENC Encoder not working ?

Post by BradleyS »

That would do it. Deblock is single-threaded. We're looking at replacing the current deblock with a better one, which should also be faster: https://github.com/HandBrake/HandBrake/pull/2028

Glad you got it sorted. :)
Post Reply