1.4.1 NVEnc encode slower than 1.2.2

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
silvertiger
Posts: 6
Joined: Wed Sep 15, 2021 1:58 pm

1.4.1 NVEnc encode slower than 1.2.2

Post by silvertiger »

I've found that using 1.4.1 to encode using H.264 NVEnc is about half as fast as the same thing in 1.2.2. I have Nvidia GeForce GTX 1050, Windows 10 21H1, ASUS Prime Z390A MB, Intel I7 9th gen.

Reproduce by encoding the same .TS file with the two different version.

1.4.1 and 1.2.2

Windows 10 21H1

I'm new to the forum, so I'm not sure which version's log I should include. I can include both if needed. Here is log from a 1.4.1 run.
HandBrake 1.4.1 (2021081500)
OS: Microsoft Windows NT 10.0.19043.0
CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Ram: 16224 MB,
GPU Information:
Intel(R) UHD Graphics 630 - 30.0.100.9864
NVIDIA GeForce GTX 1050 - 30.0.14.7141
Screen: 1920x1080
Temp Dir: C:\Users\Walt\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\Walt\AppData\Roaming\HandBrake

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


# Starting Encode ...
[13:10:50] base preset: Nvidia
[13:10:50] hb_init: starting libhb thread
[13:10:50] Starting work at: Sat Sep 11 13:10:50 2021
[13:10:50] 1 job(s) to process
[13:10:50] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0,
"Encoder": "copy:ac3",
"Gain": 0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
},
{
"Bitrate": 160,
"DRC": 0,
"Encoder": "av_aac",
"Gain": 0,
"Mixdown": 6,
"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",
"copy:mp2"
],
"FallbackEncoder": "ac3"
},
"Destination": {
"ChapterList": [],
"ChapterMarkers": false,
"AlignAVStart": true,
"File": "F:\\NPVRV5 Recordings\\College Football\\2021-09-04 Georgia-32.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": "1080",
"width": "1920"
}
},
{
"ID": 6,
"Settings": {
"mode": "0"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "F:\\NPVRV5 Recordings\\College Football\\2021-09-04 Georgia.ts"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "nvenc_h264",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "medium",
"Profile": "auto",
"Quality": 32,
"QSV": {
"Decode": false
}
}
}
[13:10:50] CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
[13:10:50] - Intel microarchitecture Kaby Lake
[13:10:50] - logical processor count: 8
[13:10:50] Intel Quick Sync Video support: yes, gpu list: 1
[13:10:50] Intel Quick Sync Video integrated adapter with index 1
[13:10:50] - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[13:10:50] - Decode support: h264 hevc (8bit: yes, 10bit: yes)
[13:10:50] - H.264 encoder: yes
[13:10:50] - preferred implementation: hardware (2) via D3D11
[13:10:50] - capabilities (hardware): breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[13:10:50] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[13:10:50] - preferred implementation: hardware (2) via D3D11
[13:10:50] - capabilities (hardware): bpyramid icq vsinfo opt1
[13:10:50] hb_scan: path=F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia.ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia.ts
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(F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia.ts\) failed
[13:10:50] 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:10:50] dvd: not a dvd - trying as a stream/file instead
[13:10:50] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[13:10:50] Found the following PIDS
[13:10:50] Video PIDS :
[13:10:50] 0x100 type H.264 (0x1b) (PCR)
[13:10:50] Audio PIDS :
[13:10:50] 0x101 type AC3 (0x81)
[13:10:50] Subtitle PIDS :
[13:10:50] Other PIDS :
[13:10:50] stream id 0x101 (type 0x81 substream 0x0) audio 0x101
[13:10:50] scan: decoding previews for title 1
[13:10:50] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[13:10:50] scan: audio 0x101: ac3, rate=48000Hz, bitrate=640000 Unknown (AC3) (5.1 ch) (640 kbps)
[13:10:50] stream: 31 good frames, 0 errors (0%)
[13:10:50] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1
[13:10:50] scan: supported video decoders: avcodec qsv
[13:10:50] libhb: scan thread found 1 valid title(s)
[13:10:50] Starting Task: Encoding Pass
[13:10:50] Skipping vfr filter
[13:10:50] Skipping crop/scale filter
[13:10:50] work: track 2, dithering not supported by codec
[13:10:50] job configuration:
[13:10:50] * source
[13:10:50] + F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia.ts
[13:10:50] + title 1, chapter(s) 1 to 1
[13:10:50] * destination
[13:10:50] + F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia-32.mp4
[13:10:50] + container: MPEG-4 (libavformat)
[13:10:50] + align initial A/V stream timestamps
[13:10:50] * video track
[13:10:50] + decoder: h264 8-bit
[13:10:50] + bitrate 200 kbps
[13:10:50] + Output geometry
[13:10:50] + storage dimensions: 1920 x 1080
[13:10:50] + pixel aspect ratio: 1 : 1
[13:10:50] + display dimensions: 1920 x 1080
[13:10:50] + encoder: H.264 (NVEnc)
[13:10:50] + preset: medium
[13:10:50] + profile: auto
[13:10:50] + level: auto
[13:10:50] + quality: 32.00 (CQ)
[13:10:50] + color profile: 1-1-1
[13:10:50] * audio track 1
[13:10:50] + decoder: Unknown (AC3) (5.1 ch) (640 kbps) (track 1, id 0x101)
[13:10:50] + bitrate: 640 kbps, samplerate: 48000 Hz
[13:10:50] + AC3 Passthru
[13:10:50] * audio track 2
[13:10:50] + decoder: Unknown (AC3) (5.1 ch) (640 kbps) (track 1, id 0x101)
[13:10:50] + bitrate: 640 kbps, samplerate: 48000 Hz
[13:10:50] + mixdown: Dolby Pro Logic II
[13:10:50] + encoder: AAC (libavcodec)
[13:10:50] + bitrate: 160 kbps, samplerate: 48000 Hz
[13:10:50] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[13:10:50] sync: expecting 218923 video frames
[13:10:50] encavcodecInit: H.264 (Nvidia NVENC)
[13:10:50] encavcodec: encoding at rc=vbr, multipass=fullres, 32.00
[13:10:50] encavcodec: encoding with stored aspect 1/1
[13:10:50] sync: first pts video is 0
[13:10:50] sync: first pts audio 0x101 is 1804
[13:10:50] sync: first pts audio 0x101 is 1804
[13:16:13] sync: audio 0x101 time went backwards 32 ms, dropped 1 frames. PTS 254693796
[13:16:13] sync: audio 0x101 time went backwards 32 ms, dropped 1 frames. PTS 254693796
[13:23:33] sync: video time went backwards 33 ms, dropped 1 frames. PTS 604239636
[13:24:40] hb_ts_stream_decode - eof
[13:24:40] hb_ts_stream_decode - eof
[13:24:40] reader: done. 1 scr changes
[13:24:40] work: average encoding speed for job is 263.834442 fps
[13:24:41] stream: 218985 good frames, 0 errors (0%)
[13:24:41] ac3-decoder done: 228338 frames, 0 decoder errors
[13:24:41] ac3-decoder done: 228338 frames, 0 decoder errors
[13:24:41] h264-decoder done: 218985 frames, 0 decoder errors
[13:24:41] sync: got 218984 frames, 218923 expected
[13:24:41] sync: framerate min 14.985 fps, max 29.970 fps, avg 29.970 fps
[aac @ 0000015d86aa0a80] Ignoring attempt to flush encoder that doesn't support it
[aac @ 0000015d86aa0a80] Qavg: 164.905
[13:24:41] mux: track 0, 218984 frames, 4007274868 bytes, 4387.43 kbps, fifo 1024
[13:24:41] mux: track 1, 228337 frames, 584542720 bytes, 640.00 kbps, fifo 1024
[13:24:41] mux: track 2, 342506 frames, 146979588 bytes, 160.92 kbps, fifo 2048
[13:24:41] Finished work at: Sat Sep 11 13:24:41 2021
[13:24:41] libhb: work result = 0

# Job Completed!
rollin_eng
Veteran User
Posts: 4836
Joined: Wed May 04, 2011 11:06 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by rollin_eng »

We need both logs thanks.
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by s55 »

Can you also provide a 1.2.2 log as well please.

The performance numbers seem reasonable in you 1.4.1 log based on the settings and hardware you have.
mduell
Veteran User
Posts: 8182
Joined: Sat Apr 21, 2007 8:54 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by mduell »

Your 1050 was previously doing 500+ fps 1080p encodes? Yow!
silvertiger
Posts: 6
Joined: Wed Sep 15, 2021 1:58 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by silvertiger »

Sorry, not receiving notices of replies. Here is a 1.2.2 log and yes, it does run at over 500 fps on my system.

HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 10.0.19043.0
CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Ram: 16224 MB,
GPU Information:
Intel(R) UHD Graphics 630 - 30.0.100.9864
NVIDIA GeForce GTX 1050 - 30.0.14.7141
Screen: 1920x1080
Temp Dir: C:\Users\Walt\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Walt\AppData\Roaming\HandBrake

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


# Starting Encode ...

[12:32:30] hb_init: starting libhb thread
[12:32:30] 1 job(s) to process
[12:32:30] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0.0,
"Encoder": "copy:ac3",
"Gain": 0.0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
},
{
"Bitrate": 160,
"DRC": 0.0,
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": 4,
"NormalizeMixLevel": false,
"Samplerate": 48000,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:eac3",
"copy:mp3",
"copy:truehd"
],
"FallbackEncoder": "ac3"
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
}
],
"ChapterMarkers": true,
"AlignAVStart": true,
"File": "F:\\NPVRV5 Recordings\\College Football\\2021-09-04 Georgia-32.mp4",
"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": "1080",
"width": "1920"
}
},
{
"ID": 6,
"Settings": {
"mode": "2",
"rate": "27000000/900000"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "F:\\NPVRV5 Recordings\\College Football\\2021-09-04 Georgia.ts"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "nvenc_h264",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "slow",
"Profile": "auto",
"Quality": 32.0,
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[12:32:30] CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
[12:32:30] - Intel microarchitecture Kaby Lake
[12:32:30] - logical processor count: 8
[12:32:30] Intel Quick Sync Video support: yes
[12:32:30] - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[12:32:30] - H.264 encoder: yes
[12:32:30] - preferred implementation: hardware (any) via D3D11
[12:32:30] - capabilities (hardware): breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[12:32:30] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[12:32:30] - preferred implementation: hardware (any) via D3D11
[12:32:30] - capabilities (hardware): bpyramid icq vsinfo opt1
[12:32:30] hb_scan: path=F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia.ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia.ts
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
[12:32:30] 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
[12:32:30] dvd: not a dvd - trying as a stream/file instead
[12:32:30] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:32:30] Found the following PIDS
[12:32:30] Video PIDS :
[12:32:30] 0x100 type H.264 (0x1b) (PCR)
[12:32:30] Audio PIDS :
[12:32:30] 0x101 type AC3 (0x81)
[12:32:30] Subtitle PIDS :
[12:32:30] Other PIDS :
[12:32:30] stream id 0x101 (type 0x81 substream 0x0) audio 0x101
[12:32:30] scan: decoding previews for title 1
[12:32:30] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:32:30] scan: audio 0x101: ac3, rate=48000Hz, bitrate=640000 Unknown (AC3) (5.1 ch)
[12:32:31] stream: 31 good frames, 0 errors (0%)
[12:32:31] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[12:32:31] scan: supported video decoders: avcodec qsv
[12:32:31] libhb: scan thread found 1 valid title(s)
[12:32:31] starting job
[12:32:31] work: only 1 chapter, disabling chapter markers
[12:32:31] job configuration:
[12:32:31] * source
[12:32:31] + F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia.ts
[12:32:31] + title 1, chapter(s) 1 to 1
[12:32:31] * destination
[12:32:31] + F:\NPVRV5 Recordings\College Football\2021-09-04 Georgia-32.mp4
[12:32:31] + container: MPEG-4 (libavformat)
[12:32:31] + align initial A/V stream timestamps
[12:32:31] * video track
[12:32:31] + decoder: h264
[12:32:31] + bitrate 200 kbps
[12:32:31] + filters
[12:32:31] + Framerate Shaper (mode=2:rate=27000000/900000)
[12:32:31] + frame rate: 29.970 fps -> peak rate limited to 30.000 fps
[12:32:31] + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[12:32:31] + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[12:32:31] + Output geometry
[12:32:31] + storage dimensions: 1920 x 1080
[12:32:31] + pixel aspect ratio: 1 : 1
[12:32:31] + display dimensions: 1920 x 1080
[12:32:31] + encoder: H.264 (NVEnc)
[12:32:31] + preset: slow
[12:32:31] + profile: auto
[12:32:31] + level: auto
[12:32:31] + quality: 32.00 (CQ)
[12:32:31] + color profile: 1-1-1
[12:32:31] * audio track 1
[12:32:31] + decoder: Unknown (AC3) (5.1 ch) (track 1, id 0x101)
[12:32:31] + bitrate: 640 kbps, samplerate: 48000 Hz
[12:32:31] + AC3 Passthru
[12:32:31] * audio track 2
[12:32:31] + decoder: Unknown (AC3) (5.1 ch) (track 1, id 0x101)
[12:32:31] + bitrate: 640 kbps, samplerate: 48000 Hz
[12:32:31] + mixdown: Stereo
[12:32:31] + dither: none
[12:32:31] + encoder: AAC (libavcodec)
[12:32:31] + bitrate: 160 kbps, samplerate: 48000 Hz
[12:32:31] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:32:31] sync: expecting 218923 video frames
[12:32:31] encavcodecInit: H.264 (Nvidia NVENC)
[12:32:31] encavcodec: encoding at rc=constqp QP 32.00
[12:32:31] encavcodec: encoding with stored aspect 1/1
[12:32:31] sync: first pts video is 0
[12:32:31] sync: first pts audio 0x101 is 1804
[12:32:31] sync: first pts audio 0x101 is 1804

# Encode Stopped

[12:32:50] work: average encoding speed for job is 412.851196 fps
[12:32:51] vfr: 8076 frames output, 0 dropped and 0 duped for CFR/PFR
[12:32:51] vfr: lost time: 0 (0 frames)
[12:32:51] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:32:51] stream: 8146 good frames, 0 errors (0%)
[12:32:51] ac3-decoder done: 8491 frames, 0 decoder errors
[12:32:51] ac3-decoder done: 8492 frames, 0 decoder errors
[12:32:51] h264-decoder done: 8139 frames, 0 decoder errors
[12:32:51] sync: got 8092 frames, 218923 expected
[12:32:51] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
[aac @ 0000021eccb97180] Qavg: 167.713
[aac @ 0000021eccb97180] 2 frames left in the queue on closing
[12:32:51] mux: track 0, 8073 frames, 190687129 bytes, 5649.92 kbps, fifo 1024
[12:32:51] mux: track 1, 8436 frames, 21596160 bytes, 639.88 kbps, fifo 1024
[12:32:51] mux: track 2, 12653 frames, 5429804 bytes, 160.88 kbps, fifo 2048
[12:32:51] libhb: work result = 1

# Encode Completed ...
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by s55 »

You did not let the encode run long enough for the average to calculate. You're not actually getting >=500fps in 1.2.2. Even with the short encode, it's average has dropped to ~412fps and I suspect it would drop further if you let it run to the end.
To compare properly, you'd need to let both encodes complete.

It's common for the start of a video file to be simplistic and thus, creates a large spike in fps that's not reflecting of the reality.
Usually after the opening clip, the fps can drop a few hundred fps and settle in.

500fps is more than I'd expect from a 1050.
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by s55 »

The other thing to note is the NEnc encoder presets different now in 1.4.2. We use the newer Nvidia preset system.
No idea what's changed since I haven't seen any documentation for it but they may also have turned on more features.

Another change could be the rate control method used in 1.4.2. We switched it because the one used in 1.2.2 was awful and produced much larger files than necessary.

Edit: Also, 1.4.2 does frame-multi-pass where as 1.2.2 does not.
silvertiger
Posts: 6
Joined: Wed Sep 15, 2021 1:58 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by silvertiger »

Again, apologies for the delay. I can do the same encodes in both 1.2.2 and 1.4.1 and send them both for comparison. HOWEVER, it is clear to me from watching the two versions that 1.4.1 is clearly slower than 1.2.2 in my environment. I have gone back to 1.2.2 for this reason. BTW, I have now subscribed to my own post so will now get notifications. Sorry to all, this was an oversight on my part.
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by s55 »

Did some testing and have confirmed that 1.2.2 is about 21.4% faster on my RTX 3070.
1.4.2 is 100% utilising the 3070 NVenc unit.

This however, is infact correct. It's a result of the change of rate control and use of frame-multi-pass and possibly presets.

This is a GOOD thing and how we want it to behave. 1.2.2 is not using NVEnc correctly. It's giving sub-par results due to it being poorly configured.
silvertiger
Posts: 6
Joined: Wed Sep 15, 2021 1:58 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by silvertiger »

That's unfortunate. I am happy with 1.2.2 results. The videos are fine for my purposes and Handbrake 1.2.2 is very fast. In fact, I have tried some other software that supposedly uses NVEnc and the results have been sub-par compared to Handbrake. Should I still send the two log files?
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by s55 »

up-to-you. We can double check them but it seems everything is working normally in 1.4
silvertiger
Posts: 6
Joined: Wed Sep 15, 2021 1:58 pm

Re: 1.4.1 NVEnc encode slower than 1.2.2

Post by silvertiger »

Here are standard logs from 1.2.2 and 1.4.1. Everything should be the same except for Handbrake. I tried to make sure all the settings were the same.
HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 10.0.19044.0
CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Ram: 16224 MB,
GPU Information:
Intel(R) UHD Graphics 630 - 30.0.101.1191
NVIDIA GeForce GTX 1050 - 30.0.14.7141
Screen: 1920x1080
Temp Dir: C:\Users\Walt\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Walt\AppData\Roaming\HandBrake

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


# Starting Encode ...

[18:06:02] hb_init: starting libhb thread
[18:06:02] 1 job(s) to process
[18:06:02] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0.0,
"Encoder": "copy:ac3",
"Gain": 0.0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 48000,
"Track": 0,
"DitherMethod": 0
},
{
"Bitrate": 160,
"DRC": 0.0,
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": 6,
"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": [
{
"Name": "Chapter 1"
}
],
"ChapterMarkers": true,
"AlignAVStart": true,
"File": "F:\\NPVRV5 Recordings\\1.2.2 Test.mp4",
"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": "1080",
"width": "1920"
}
},
{
"ID": 6,
"Settings": {
"mode": "2",
"rate": "27000000/900000"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "F:\\NPVRV5 Recordings\\Yellowstone\\Season 03\\Yellowstone S03E01 Youre the Indian Now.ts"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "nvenc_h264",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "slow",
"Profile": "auto",
"Quality": 33.0,
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[18:06:02] CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
[18:06:02] - Intel microarchitecture Kaby Lake
[18:06:02] - logical processor count: 8
[18:06:02] Intel Quick Sync Video support: yes
[18:06:02] - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[18:06:02] - H.264 encoder: yes
[18:06:02] - preferred implementation: hardware (any) via D3D11
[18:06:02] - capabilities (hardware): breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[18:06:02] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[18:06:02] - preferred implementation: hardware (any) via D3D11
[18:06:02] - capabilities (hardware): bpyramid icq vsinfo opt1
[18:06:02] hb_scan: path=F:\NPVRV5 Recordings\Yellowstone\Season 03\Yellowstone S03E01 Youre the Indian Now.ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image F:\NPVRV5 Recordings\Yellowstone\Season 03\Yellowstone S03E01 Youre the Indian Now.ts
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
[18:06:02] 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
[18:06:02] dvd: not a dvd - trying as a stream/file instead
[18:06:02] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:06:02] Found the following PIDS
[18:06:02] Video PIDS :
[18:06:02] 0x100 type H.264 (0x1b) (PCR)
[18:06:02] Audio PIDS :
[18:06:02] 0x101 type AC3 (0x81)
[18:06:02] Subtitle PIDS :
[18:06:02] Other PIDS :
[18:06:02] stream id 0x101 (type 0x81 substream 0x0) audio 0x101
[18:06:02] scan: decoding previews for title 1
[18:06:02] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:06:02] scan: audio 0x101: ac3, rate=48000Hz, bitrate=640000 Unknown (AC3) (5.1 ch)
[18:06:02] stream: 5 good frames, 0 errors (0%)
[18:06:02] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 60/60/0/0, aspect 16:9, PAR 1:1
[18:06:02] scan: supported video decoders: avcodec qsv
[18:06:02] libhb: scan thread found 1 valid title(s)
[18:06:02] starting job
[18:06:02] work: only 1 chapter, disabling chapter markers
[18:06:02] job configuration:
[18:06:02] * source
[18:06:02] + F:\NPVRV5 Recordings\Yellowstone\Season 03\Yellowstone S03E01 Youre the Indian Now.ts
[18:06:02] + title 1, chapter(s) 1 to 1
[18:06:02] * destination
[18:06:02] + F:\NPVRV5 Recordings\1.2.2 Test.mp4
[18:06:02] + container: MPEG-4 (libavformat)
[18:06:02] + align initial A/V stream timestamps
[18:06:02] * video track
[18:06:02] + decoder: h264
[18:06:02] + bitrate 200 kbps
[18:06:02] + filters
[18:06:02] + Framerate Shaper (mode=2:rate=27000000/900000)
[18:06:02] + frame rate: 29.970 fps -> peak rate limited to 30.000 fps
[18:06:02] + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[18:06:02] + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[18:06:02] + Output geometry
[18:06:02] + storage dimensions: 1920 x 1080
[18:06:02] + pixel aspect ratio: 1 : 1
[18:06:02] + display dimensions: 1920 x 1080
[18:06:02] + encoder: H.264 (NVEnc)
[18:06:02] + preset: slow
[18:06:02] + profile: auto
[18:06:02] + level: auto
[18:06:02] + quality: 33.00 (CQ)
[18:06:02] + color profile: 1-1-1
[18:06:02] * audio track 1
[18:06:02] + decoder: Unknown (AC3) (5.1 ch) (track 1, id 0x101)
[18:06:02] + bitrate: 640 kbps, samplerate: 48000 Hz
[18:06:02] + AC3 Passthru
[18:06:02] * audio track 2
[18:06:02] + decoder: Unknown (AC3) (5.1 ch) (track 1, id 0x101)
[18:06:02] + bitrate: 640 kbps, samplerate: 48000 Hz
[18:06:02] + mixdown: Dolby Pro Logic II
[18:06:02] + dither: none
[18:06:02] + encoder: AAC (libavcodec)
[18:06:02] + bitrate: 160 kbps, samplerate: 48000 Hz
[18:06:02] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:06:02] sync: expecting 70262 video frames
[18:06:02] encavcodecInit: H.264 (Nvidia NVENC)
[18:06:02] encavcodec: encoding at rc=constqp QP 33.00
[18:06:02] encavcodec: encoding with stored aspect 1/1
[18:06:02] sync: first pts video is 0
[18:06:02] sync: first pts audio 0x101 is 1249
[18:06:02] sync: first pts audio 0x101 is 1249
[18:08:40] hb_ts_stream_decode - eof
[18:08:40] hb_ts_stream_decode - eof
[18:08:40] reader: done. 1 scr changes
[18:08:40] work: average encoding speed for job is 446.082825 fps
[18:08:41] vfr: 70414 frames output, 0 dropped and 0 duped for CFR/PFR
[18:08:41] vfr: lost time: 0 (0 frames)
[18:08:41] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:08:41] stream: 70414 good frames, 0 errors (0%)
[18:08:41] ac3-decoder done: 73422 frames, 0 decoder errors
[18:08:41] ac3-decoder done: 73422 frames, 0 decoder errors
[18:08:41] h264-decoder done: 70414 frames, 0 decoder errors
[18:08:41] sync: got 70414 frames, 70262 expected
[18:08:41] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
[aac @ 000001a06d460a00] Qavg: 205.975
[18:08:41] mux: track 0, 70414 frames, 373355420 bytes, 1271.24 kbps, fifo 4096
[18:08:41] mux: track 1, 73422 frames, 187960320 bytes, 639.99 kbps, fifo 4096
[18:08:41] mux: track 2, 110134 frames, 47183646 bytes, 160.66 kbps, fifo 4096
[18:08:41] libhb: work result = 0

# Encode Completed ...

HandBrake 1.4.1 (2021081500)
OS: Microsoft Windows NT 10.0.19044.0
CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Ram: 16224 MB,
GPU Information:
Intel(R) UHD Graphics 630 - 30.0.101.1191
NVIDIA GeForce GTX 1050 - 30.0.14.7141
Screen: 1920x1080
Temp Dir: C:\Users\Walt\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake 1.4.1\HandBrake\
Data Dir: C:\Users\Walt\AppData\Roaming\HandBrake

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


# Starting Encode ...
[18:16:33] base preset: Nvidia
Remote Process started with Process ID: 5184 using port: 8037. Max Allowed Instances: 1
Worker: Starting HandBrake Engine ...
Worker: Starting Web Server on port 8037 ...
Worker: Disconnected worker monitoring enabled!
[18:16:34] Compile-time hardening features are enabled
init: starting libhb thread
[18:16:34] Starting work at: Tue Jan 04 18:16:34 2022
[18:16:34] 1 job(s) to process
[18:16:34] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0,
"Encoder": "copy:ac3",
"Gain": 0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
},
{
"Bitrate": 160,
"DRC": 0,
"Encoder": "av_aac",
"Gain": 0,
"Mixdown": 6,
"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",
"copy:mp2"
],
"FallbackEncoder": "ac3"
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
}
],
"ChapterMarkers": true,
"AlignAVStart": true,
"File": "F:\\1.4.1 test.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": "1080",
"width": "1920"
}
},
{
"ID": 6,
"Settings": {
"mode": "2",
"rate": "27000000/900000"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "F:\\NPVRV5 Recordings\\Yellowstone\\Season 03\\Yellowstone S03E01 Youre the Indian Now.ts"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "nvenc_h264",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "medium",
"Profile": "auto",
"Quality": 33,
"QSV": {
"Decode": false
}
}
}
[18:16:34] CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
[18:16:34] - Intel microarchitecture Kaby Lake
[18:16:34] - logical processor count: 8
[18:16:34] Intel Quick Sync Video support: yes, gpu list: 0
[18:16:34] Intel Quick Sync Video integrated adapter with index 0
[18:16:34] - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[18:16:34] - Decode support: h264 hevc (8bit: yes, 10bit: yes)
[18:16:34] - H.264 encoder: yes
[18:16:34] - preferred implementation: hardware (1) via D3D11
[18:16:34] - capabilities (hardware): breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[18:16:34] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[18:16:34] - preferred implementation: hardware (1) via D3D11
[18:16:34] - capabilities (hardware): bpyramid icq vsinfo opt1
[18:16:34] hb_scan: path=F:\NPVRV5 Recordings\Yellowstone\Season 03\Yellowstone S03E01 Youre the Indian Now.ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image F:\NPVRV5 Recordings\Yellowstone\Season 03\Yellowstone S03E01 Youre the Indian Now.ts
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(F:\NPVRV5 Recordings\Yellowstone\Season 03\Yellowstone S03E01 Youre the Indian Now.ts\) failed
[18:16:34] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvlibdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
dread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[18:16:34] dvd: not a dvd - trying as a stream/file instead
[18:16:34] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:16:34] Found the following PIDS
[18:16:34] Video PIDS :
[18:16:34] 0x100 type H.264 (0x1b) (PCR)
[18:16:34] Audio PIDS :
[18:16:34] 0x101 type AC3 (0x81)
[18:16:34] Subtitle PIDS :
[18:16:34] Other PIDS :
[18:16:34] stream id 0x101 (type 0x81 substream 0x0) audio 0x101
[18:16:34] scan: decoding previews for title 1
[18:16:34] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:16:34] scan: audio 0x101: ac3, rate=48000Hz, bitrate=640000 Unknown (AC3) (5.1 ch) (640 kbps)
[18:16:35] stream: 5 good frames, 0 errors (0%)
[18:16:35] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 60/60/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1
[18:16:35] scan: supported video decoders: avcodec qsv
[18:16:35] libhb: scan thread found 1 valid title(s)
[18:16:35] Starting Task: Encoding Pass
[18:16:35] Skipping crop/scale filter
[18:16:35] work: track 2, dithering not supported by codec
[18:16:35] work: only 1 chapter, disabling chapter markers
[18:16:35] job configuration:
[18:16:35] * source
[18:16:35] + F:\NPVRV5 Recordings\Yellowstone\Season 03\Yellowstone S03E01 Youre the Indian Now.ts
[18:16:35] + title 1, chapter(s) 1 to 1
[18:16:35] * destination
[18:16:35] + F:\1.4.1 test.mp4
[18:16:35] + container: MPEG-4 (libavformat)
[18:16:35] + align initial A/V stream timestamps
[18:16:35] * video track
[18:16:35] + decoder: h264 8-bit
[18:16:35] + bitrate 200 kbps
[18:16:35] + filter
[18:16:35] + Framerate Shaper (mode=2:rate=27000000/900000)
[18:16:35] + frame rate: 29.970 fps -> peak rate limited to 30.000 fps
[18:16:35] + Output geometry
[18:16:35] + storage dimensions: 1920 x 1080
[18:16:35] + pixel aspect ratio: 1 : 1
[18:16:35] + display dimensions: 1920 x 1080
[18:16:35] + encoder: H.264 (NVEnc)
[18:16:35] + preset: medium
[18:16:35] + profile: auto
[18:16:35] + level: auto
[18:16:35] + quality: 33.00 (CQ)
[18:16:35] + color profile: 1-1-1
[18:16:35] * audio track 1
[18:16:35] + decoder: Unknown (AC3) (5.1 ch) (640 kbps) (track 1, id 0x101)
[18:16:35] + bitrate: 640 kbps, samplerate: 48000 Hz
[18:16:35] + AC3 Passthru
[18:16:35] * audio track 2
[18:16:35] + decoder: Unknown (AC3) (5.1 ch) (640 kbps) (track 1, id 0x101)
[18:16:35] + bitrate: 640 kbps, samplerate: 48000 Hz
[18:16:35] + mixdown: Dolby Pro Logic II
[18:16:35] + encoder: AAC (libavcodec)
[18:16:35] + bitrate: 160 kbps, samplerate: 48000 Hz
[18:16:35] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:16:35] sync: expecting 70262 video frames
[18:16:35] encavcodecInit: H.264 (Nvidia NVENC)
[18:16:35] encavcodec: encoding at rc=vbr, multipass=fullres, 33.00
[18:16:35] encavcodec: encoding with stored aspect 1/1
[18:16:35] sync: first pts video is 0
[18:16:35] sync: first pts audio 0x101 is 1249
[18:16:35] sync: first pts audio 0x101 is 1249
[18:20:43] hb_ts_stream_decode - eof
[18:20:43] hb_ts_stream_decode - eof
[18:20:43] reader: done. 1 scr changes
[18:20:44] work: average encoding speed for job is 283.478729 fps
[18:20:44] vfr: 70414 frames output, 0 dropped and 0 duped for CFR/PFR
[18:20:44] vfr: lost time: 0 (0 frames)
[18:20:44] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:20:44] stream: 70414 good frames, 0 errors (0%)
[18:20:44] ac3-decoder done: 73422 frames, 0 decoder errors
[18:20:44] ac3-decoder done: 73422 frames, 0 decoder errors
[18:20:44] h264-decoder done: 70414 frames, 0 decoder errors
[18:20:44] sync: got 70414 frames, 70262 expected
[18:20:44] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
[aac @ 0000011cfb27e7c0] Ignoring attempt to flush encoder that doesn't support it
[aac @ 0000011cfb27e7c0] Qavg: 205.883
[18:20:44] mux: track 0, 70414 frames, 527034269 bytes, 1794.50 kbps, fifo 2048
[18:20:44] mux: track 1, 73422 frames, 187960320 bytes, 639.99 kbps, fifo 2048
[18:20:44] mux: track 2, 110134 frames, 47183631 bytes, 160.66 kbps, fifo 4096
[18:20:44] Finished work at: Tue Jan 04 18:20:44 2022
[18:20:44] libhb: work result = 0

# Job Completed!
Post Reply