H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 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
ryek
Posts: 6
Joined: Tue Oct 06, 2020 5:11 pm

H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by ryek »

Description of problem or question:
Sorry for my bad English.
I have bad quality with NVENC H265 encoded files with Handbrake 1.3.3 or above Nights.

Steps to reproduce the problem (If Applicable):

I compared with 1.2.2 with the same settings.
For example NVENC H265 Video Codec, CRF 32 in Handbrake 1.3.3 (55MB file size) vs 1.2.2 (38MB file size) = almost double filesize (2x high bitrate) with the same video quality.


HandBrake version (e.g., 1.0.0):

1.3.3 or above - Nights build


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

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

Re: H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by s55 »

Rate Control methods are not the same between 1.3 and 1.2 . Thus 32 in 1.2 does not equal 32 in 1.3. The scale has changed.

1.3 uses a more efficient rate control method, thus you'd need to adjust the quality slider to get acceptable results accordingly. Generally speaking, that should lead to 1.3 files being smaller but won't always be the case.
rollin_eng
Veteran User
Posts: 3558
Joined: Wed May 04, 2011 11:06 pm

Re: H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by rollin_eng »

Could you please post your HB logs, instructions can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html
ryek
Posts: 6
Joined: Tue Oct 06, 2020 5:11 pm

Re: H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by ryek »

s55 wrote: Tue Oct 06, 2020 5:47 pm Rate Control methods are not the same between 1.3 and 1.2 . Thus 32 in 1.2 does not equal 32 in 1.3. The scale has changed.

1.3 uses a more efficient rate control method, thus you'd need to adjust the quality slider to get acceptable results accordingly. Generally speaking, that should lead to 1.3 files being smaller but won't always be the case.
No. With another CRF 1.3.3 ex. 36 with compared exact file size in 1.2.2 with CRF 32, quality is much worse.
ryek
Posts: 6
Joined: Tue Oct 06, 2020 5:11 pm

Re: H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by ryek »

HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 7 4800H with Radeon Graphics
Ram: 15741 MB,
GPU Information:
AMD Radeon(TM) Graphics - 26.20.14034.4001
NVIDIA GeForce GTX 1650 - 26.21.14.4587
Screen: 1920x1080
Temp Dir: C:\Users\Tomek\AppData\Local\Temp\
Install Dir: D:\-\HandBrake 1.2.2
Data Dir: C:\Users\Tomek\AppData\Roaming\HandBrake

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


# Starting Encode ...

[20:05:59] hb_init: starting libhb thread
[20:05:59] 1 job(s) to process
[20:05:59] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0.0,
"Encoder": "copy",
"Gain": 0.0,
"Mixdown": -1,
"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": true,
"File": "D:\\t32-1.2.2.mp4",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": true
},
"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": "1"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "D:\\obs\\2020-09-30 15-57-13.mkv"
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": true,
"Forced": true
},
"SubtitleList": []
},
"Video": {
"Encoder": "nvenc_h265",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "slow",
"Profile": "auto",
"Quality": 32.0,
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[20:05:59] CPU: AMD Ryzen 7 4800H with Radeon Graphics
[20:05:59] - logical processor count: 16
[20:05:59] Intel Quick Sync Video support: no
[20:05:59] hb_scan: path=D:\obs\2020-09-30 15-57-13.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\obs\2020-09-30 15-57-13.mkv
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
[20:05:59] 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
[20:05:59] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\obs\2020-09-30 15-57-13.mkv':
Metadata:
ENCODER : Lavf58.29.100
Duration: 00:02:21.82, start: 0.000000, bitrate: 22909 kb/s
Stream #0:0: Video: h264 (Constrained Baseline), yuvj420p(pc, bt709, progressive), 1920x1080, 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
Metadata:
DURATION : 00:02:21.817000000
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
title : Track1
DURATION : 00:02:21.824000000
[20:05:59] scan: decoding previews for title 1
[20:05:59] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 Unknown (AAC LC) (2.0 ch)
[20:06:00] scan: 10 previews, 1920x1080, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[20:06:00] scan: supported video decoders: avcodec qsv
[20:06:00] libhb: scan thread found 1 valid title(s)
[20:06:00] Skipping subtitle scan. No suitable subtitle tracks.
[20:06:00] starting job
[20:06:00] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[20:06:00] Auto Passthru: fallback is AC3
[20:06:00] Auto Passthru: using AAC Passthru for track 1
[20:06:00] work: only 1 chapter, disabling chapter markers
[20:06:00] job configuration:
[20:06:00] * source
[20:06:00] + D:\obs\2020-09-30 15-57-13.mkv
[20:06:00] + title 1, chapter(s) 1 to 1
[20:06:00] + container: matroska,webm
[20:06:00] + data rate: 22909 kbps
[20:06:00] * destination
[20:06:00] + D:\t32-1.2.2.mp4
[20:06:00] + container: MPEG-4 (libavformat)
[20:06:00] + optimized for HTTP streaming (fast start)
[20:06:00] + align initial A/V stream timestamps
[20:06:00] * video track
[20:06:00] + decoder: h264
[20:06:00] + filters
[20:06:00] + Framerate Shaper (mode=1)
[20:06:00] + frame rate: 60.000 fps -> constant 60.000 fps
[20:06:00] + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[20:06:00] + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[20:06:00] + Output geometry
[20:06:00] + storage dimensions: 1920 x 1080
[20:06:00] + pixel aspect ratio: 1 : 1
[20:06:00] + display dimensions: 1920 x 1080
[20:06:00] + encoder: H.265 (NVEnc)
[20:06:00] + preset: slow
[20:06:00] + profile: auto
[20:06:00] + level: auto
[20:06:00] + quality: 32.00 (CQ)
[20:06:00] + color profile: 1-1-1
[20:06:00] * audio track 1
[20:06:00] + decoder: Unknown (AAC LC) (2.0 ch) (track 1, id 0x1)
[20:06:00] + samplerate: 48000 Hz
[20:06:00] + AAC Passthru
[20:06:00] sync: expecting 8509 video frames
[20:06:00] encavcodecInit: H.265 (Nvidia NVENC)
[20:06:00] encavcodec: encoding at rc=constqp QP 32.00
[20:06:00] encavcodec: encoding with stored aspect 1/1
[20:06:01] sync: first pts video is 0
[20:06:01] sync: "Chapter 1" (1) at frame 1 time 0
[20:06:01] sync: first pts audio 0x1 is 0
[20:06:37] reader: done. 1 scr changes
[20:06:37] work: average encoding speed for job is 231.777466 fps
[20:06:37] vfr: 8510 frames output, 0 dropped and 0 duped for CFR/PFR
[20:06:37] vfr: lost time: 0 (0 frames)
[20:06:37] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:06:37] aac-decoder done: 6649 frames, 0 decoder errors
[20:06:37] h264-decoder done: 8510 frames, 0 decoder errors
[20:06:37] sync: got 8510 frames, 8509 expected
[20:06:37] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
[20:06:38] mux: track 0, 8510 frames, 32535337 bytes, 1834.92 kbps, fifo 4096
[20:06:38] mux: track 1, 6649 frames, 2787791 bytes, 157.22 kbps, fifo 4096
[20:06:38] libhb: work result = 0

# Encode Completed ...
ryek
Posts: 6
Joined: Tue Oct 06, 2020 5:11 pm

Re: H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by ryek »

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 7 4800H with Radeon Graphics
Ram: 15741 MB,
GPU Information:
AMD Radeon(TM) Graphics - 26.20.14034.4001
NVIDIA GeForce GTX 1650 - 26.21.14.4587
Screen: 1920x1080
Temp Dir: C:\Users\Tomek\AppData\Local\Temp\
Install Dir: D:\-\HandBrake-1.3.3-x86_64-Win_GUI
Data Dir: C:\Users\Tomek\AppData\Roaming\HandBrake

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


# Starting Encode ...

[08:09:10] base preset: Fast 1080p30 (Modified)
[20:09:10] hb_init: starting libhb thread
[20:09:10] Starting work at: Tue Oct 06 20:09:10 2020
[20:09:10] 1 job(s) to process
[20:09:10] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0.0,
"Encoder": "copy",
"Gain": 0.0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Name": "Track1",
"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": "D:\\t32-1.3.3.mp4",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": true
},
"Mux": "av_mp4"
},
"Filters": {
"FilterList": [
{
"ID": 12,
"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": "D:\\obs\\2020-09-30 15-57-13.mkv"
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": true,
"Forced": true
},
"SubtitleList": []
},
"Video": {
"Encoder": "nvenc_h265",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "slow",
"Profile": "auto",
"Quality": 32.0,
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[20:09:10] CPU: AMD Ryzen 7 4800H with Radeon Graphics
[20:09:10] - logical processor count: 16
[20:09:10] Intel Quick Sync Video support: no
[20:09:10] hb_scan: path=D:\obs\2020-09-30 15-57-13.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\obs\2020-09-30 15-57-13.mkv
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
src/libbluray/bluray.c:2585: nav_get_title_list(D:\obs\2020-09-30 15-57-13.mkv\) failed
[20:09:10] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
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
[20:09:10] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\obs\2020-09-30 15-57-13.mkv':
Metadata:
ENCODER : Lavf58.29.100
Duration: 00:02:21.82, start: 0.000000, bitrate: 22909 kb/s
Stream #0:0: Video: h264 (Constrained Baseline), yuvj420p(pc, bt709, progressive), 1920x1080, 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
Metadata:
DURATION : 00:02:21.817000000
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
title : Track1
DURATION : 00:02:21.824000000
[20:09:11] scan: decoding previews for title 1
[20:09:11] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 Unknown (AAC LC) (2.0 ch)
[20:09:11] scan: 10 previews, 1920x1080, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[20:09:11] scan: supported video decoders: avcodec qsv
[20:09:11] libhb: scan thread found 1 valid title(s)
[20:09:11] Skipping subtitle scan. No suitable subtitle tracks.
[20:09:11] Starting Task: Encoding Pass
[20:09:11] Skipping crop/scale filter
[20:09:11] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[20:09:11] Auto Passthru: fallback is AC3
[20:09:11] Auto Passthru: using AAC Passthru for track 1
[20:09:11] work: only 1 chapter, disabling chapter markers
[20:09:11] job configuration:
[20:09:11] * source
[20:09:11] + D:\obs\2020-09-30 15-57-13.mkv
[20:09:11] + title 1, chapter(s) 1 to 1
[20:09:11] + container: matroska,webm
[20:09:11] + data rate: 22909 kbps
[20:09:11] * destination
[20:09:11] + D:\t32-1.3.3.mp4
[20:09:11] + container: MPEG-4 (libavformat)
[20:09:11] + optimized for HTTP streaming (fast start)
[20:09:11] + align initial A/V stream timestamps
[20:09:11] * video track
[20:09:11] + decoder: h264
[20:09:11] + filter
[20:09:11] + Framerate Shaper (mode=1)
[20:09:11] + frame rate: 60.000 fps -> constant 60.000 fps
[20:09:11] + Output geometry
[20:09:11] + storage dimensions: 1920 x 1080
[20:09:11] + pixel aspect ratio: 1 : 1
[20:09:11] + display dimensions: 1920 x 1080
[20:09:11] + encoder: H.265 (NVEnc)
[20:09:11] + preset: slow
[20:09:11] + profile: auto
[20:09:11] + level: auto
[20:09:11] + quality: 32.00 (CQ)
[20:09:11] + color profile: 1-1-1
[20:09:11] * audio track 1
[20:09:11] + name: Track1
[20:09:11] + decoder: Unknown (AAC LC) (2.0 ch) (track 1, id 0x1)
[20:09:11] + samplerate: 48000 Hz
[20:09:11] + AAC Passthru
[20:09:12] sync: expecting 8509 video frames
[20:09:12] encavcodecInit: H.265 (Nvidia NVENC)
[20:09:12] encavcodec: encoding at rc=vbr 32.00
[20:09:12] encavcodec: encoding with stored aspect 1/1
[20:09:12] sync: first pts video is 0
[20:09:12] sync: "Chapter 1" (1) at frame 1 time 0
[20:09:12] sync: first pts audio 0x1 is 0
[20:09:48] reader: done. 1 scr changes
[20:09:48] work: average encoding speed for job is 235.831604 fps
[20:09:48] vfr: 8510 frames output, 0 dropped and 0 duped for CFR/PFR
[20:09:48] vfr: lost time: 0 (0 frames)
[20:09:48] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:09:48] aac-decoder done: 6649 frames, 0 decoder errors
[20:09:48] h264-decoder done: 8510 frames, 0 decoder errors
[20:09:48] sync: got 8510 frames, 8509 expected
[20:09:48] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
[20:09:48] mux: track 0, 8510 frames, 55172308 bytes, 3111.59 kbps, fifo 2048
[20:09:48] mux: track 1, 6649 frames, 2787791 bytes, 157.22 kbps, fifo 2048
[20:09:48] Finished work at: Tue Oct 06 20:09:48 2020
[20:09:48] libhb: work result = 0

# Encode Completed ...
ryek
Posts: 6
Joined: Tue Oct 06, 2020 5:11 pm

Re: H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by ryek »

Then use CPU H265 encoding quality and file size is exact the same.
ryek
Posts: 6
Joined: Tue Oct 06, 2020 5:11 pm

Re: H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by ryek »

1.2.2 - 1835kbps
1.3.3 - 3112kbps
User avatar
s55
HandBrake Team
Posts: 9829
Joined: Sun Dec 24, 2006 1:05 pm

Re: H.265 NVENC High bitrate-same quality Handbrake 1.3.3 vs 1.2.2

Post by s55 »

Do you have some samples (ideally 20 seconds or so) or even screenshots to show us what your seeing?
1.2.2 - 1835kbps
1.3.3 - 3112kbps
This is perfectly normal and expected.

It's caused by:

[20:06:00] encavcodec: encoding at rc=constqp QP 32.00
vs
[20:09:12] encavcodec: encoding at rc=vbr 32.00


However, given the increased bit-rate, the Nvidia encoder shouldn't be producing worse results than the 1.2 release unless their rate control is acting up.
Post Reply