Hello, there is an important memory leak when I try to encode a particular 4K video file into 1080p. I hope you can fix it because it BSODed my PC twice and it took me a lot of time to know that it was Handbrake that was crashing my computer I have to say that it's the 1st time in years of encodes that I have this bug, Handbrake had always been remarkably stable.
Steps to reproduce the problem (If Applicable):
It's easily reproducible, it happens everytime I launch the encode of the 4K video file that has the below Media Info. If necessary, I can provide a private download link to the developpers or post a video capture of the Handbrake memory leak happening live.
MEDIA INFO The 4k video file I'm trying to encode :
Code: Select all
General
ID : 1 (0x1)
Complete name : I:\TEMP\TORRENT\FINI\20190708_Wimbledon_2019_04R_Joao Sousa - Rafael Nadal_[rgfootball.net]_2160p_RUS_ENG --- FAIT PLANTER HANDBRAKE.ts
Format : MPEG-TS
File size : 9.63 GiB
Duration : 2 h 3 min
Overall bit rate mode : Variable
Overall bit rate : 11.2 Mb/s
Video
ID : 211 (0xD3)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L5.1@Main
Codec ID : 36
Duration : 23 h 42 min
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Audio #1
ID : 221 (0xDD)
Menu ID : 1 (0x1)
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Format version : Version 4
Muxing mode : ADTS
Codec ID : 15-2
Duration : 2 h 3 min
Bit rate mode : Variable
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : 1 ms
Language : Russian
Audio #2
ID : 222 (0xDE)
Menu ID : 1 (0x1)
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Format version : Version 4
Muxing mode : ADTS
Codec ID : 15-2
Duration : 2 h 3 min
Bit rate mode : Variable
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : 6 ms
Language : English
Code: Select all
SUMMARY : Format MP4, Web optimized, Align A/V Start
DIMENSIONS : 1920x1080
FILTERS : none
VIDEO : H265(x265), 50fps, CFR, AvgBitrate=2000, 2-Pass, Turbo 1st Pass,
- Optimize Video : EncodePreset=Medium, EncoderTune=None, EncodeProfile=Auto
AUDIO : Track #2, AAC(avcodec), 128Kbs, Stereo
HandBrake version (e.g., 1.0.0):
1.2.2 (2019022300)
Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
OS : Windows 7 Professional SP1
PC : i7-3770 @3.4Ghz overclocked to 4.3Ghz
RAM : 32GB
VID CARD : AMD RADEON RX580
HandBrake Activity Log ***required*** (see How-to get an activity log)
Here's the last log of the memory leak (Handbrake never crashes, it makes the PC freeze then crash by using always more memory).
Code: Select all
HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
Ram: 32728 MB,
GPU Information:
Radeon RX 580 Series - 24.20.13019.1008
Screen: 1920x1080
Temp Dir: D:\TEMP\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\rio\AppData\Roaming\HandBrake
-------------------------------------------
# Starting Encode ...
[19:55:08] hb_init: starting libhb thread
[19:55:08] 1 job(s) to process
[19:55:08] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 128,
"DRC": 0.0,
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": 4,
"NormalizeMixLevel": false,
"Samplerate": 48000,
"Track": 1,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:eac3",
"copy:flac",
"copy:mp3",
"copy:truehd"
],
"FallbackEncoder": "av_aac"
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
}
],
"ChapterMarkers": true,
"AlignAVStart": true,
"File": "J:\\[Tennis FR] Wimbledon 2019 (8e de Finale), Rafael Nadal vs Joao Sousa, MULTILANGUAGE, EUROSPORT HD.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",
"rate": "27000000/540000"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "I:\\TEMP\\TORRENT\\FINI\\20190708_Wimbledon_2019_04R_Joao Sousa - Rafael Nadal_[rgfootball.net]_2160p_RUS_ENG.ts"
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": true,
"Forced": true
},
"SubtitleList": []
},
"Video": {
"Encoder": "x265",
"Level": "auto",
"Bitrate": 2000,
"TwoPass": true,
"Turbo": true,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "medium",
"Profile": "auto",
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[19:55:08] CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
[19:55:08] - Intel microarchitecture Ivy Bridge
[19:55:08] - logical processor count: 8
[19:55:08] Intel Quick Sync Video support: no
[19:55:08] hb_scan: path=I:\TEMP\TORRENT\FINI\20190708_Wimbledon_2019_04R_Joao Sousa - Rafael Nadal_[rgfootball.net]_2160p_RUS_ENG.ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image I:\TEMP\TORRENT\FINI\20190708_Wimbledon_2019_04R_Joao Sousa - Rafael Nadal_[rgfootball.net]_2160p_RUS_ENG.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
[19:55:08] 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
[19:55:08] dvd: not a dvd - trying as a stream/file instead
[19:55:08] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[19:55:51] hb_ts_stream_find_pids - end of file
Input #0, mpegts, from 'I:\TEMP\TORRENT\FINI\20190708_Wimbledon_2019_04R_Joao Sousa - Rafael Nadal_[rgfootball.net]_2160p_RUS_ENG.ts':
Duration: 02:03:34.50, start: 77953.744200, bitrate: 11158 kb/s
Program 1
Stream #0:0[0xd3]: Video: hevc (Main) (HEVC / 0x43564548), yuv420p(tv), 3840x2160 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0xdd](rus): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 131 kb/s
Stream #0:2[0xde](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 138 kb/s
[19:55:51] scan: decoding previews for title 1
[19:55:51] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[19:55:58] hb_ts_stream_find_pids - end of file
[19:55:58] scan: audio 0x1: aac, rate=48000Hz, bitrate=133125 ??????? (AAC LC) (2.0 ch)
[19:55:58] scan: audio 0x2: aac, rate=48000Hz, bitrate=139500 English (AAC LC) (2.0 ch)
[19:56:00] scan: 10 previews, 3840x2160, 50.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[19:56:00] scan: supported video decoders: avcodec qsv
[19:56:00] libhb: scan thread found 1 valid title(s)
[19:56:00] Skipping subtitle scan. No suitable subtitle tracks.
[19:56:00] starting job
[19:56:00] work: only 1 chapter, disabling chapter markers
[19:56:00] job configuration:
[19:56:00] * source
[19:56:00] + I:\TEMP\TORRENT\FINI\20190708_Wimbledon_2019_04R_Joao Sousa - Rafael Nadal_[rgfootball.net]_2160p_RUS_ENG.ts
[19:56:00] + title 1, chapter(s) 1 to 1
[19:56:00] + container: mpegts
[19:56:00] + data rate: 11158 kbps
[19:56:00] * destination
[19:56:00] + J:\[Tennis FR] Wimbledon 2019 (8e de Finale), Rafael Nadal vs Joao Sousa, MULTILANGUAGE, EUROSPORT HD.mp4
[19:56:00] + container: MPEG-4 (libavformat)
[19:56:00] + optimized for HTTP streaming (fast start)
[19:56:00] + align initial A/V stream timestamps
[19:56:00] * video track
[19:56:00] + decoder: hevc
[19:56:00] + filters
[19:56:00] + Framerate Shaper (mode=1:rate=27000000/540000)
[19:56:00] + frame rate: 50.000 fps -> constant 50.000 fps
[19:56:00] + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[19:56:00] + source: 3840 * 2160, crop (0/0/0/0): 3840 * 2160, scale: 1920 * 1080
[19:56:00] + Output geometry
[19:56:00] + storage dimensions: 1920 x 1080
[19:56:00] + pixel aspect ratio: 1 : 1
[19:56:00] + display dimensions: 1920 x 1080
[19:56:00] + encoder: H.265 (libx265)
[19:56:00] + preset: medium
[19:56:00] + profile: auto
[19:56:00] + bitrate: 2000 kbps, pass: 1
[19:56:00] + fast first pass
[19:56:00] + color profile: 1-1-1
[19:56:00] * audio track 1
[19:56:00] + decoder: English (AAC LC) (2.0 ch) (track 2, id 0x2)
[19:56:00] + bitrate: 139 kbps, samplerate: 48000 Hz
[19:56:00] + mixdown: Stereo
[19:56:00] + dither: none
[19:56:00] + encoder: AAC (libavcodec)
[19:56:00] + bitrate: 128 kbps, samplerate: 48000 Hz
[19:56:00] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[19:56:07] hb_ts_stream_find_pids - end of file
[19:56:07] sync: expecting 370725 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.1 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 3 / 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 : dia / 57 / 2 / 1
x265 [info]: Keyframe min / max / scenecut / bias: 50 / 500 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 1 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : ABR-2000 kbps / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip signhide tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock sao stats-write
[19:56:07] sync: first pts video is 0
[19:56:07] sync: "Chapter 1" (1) at frame 1 time 0
[19:56:07] sync: first pts audio 0x2 is 0