Documentation on Intel Quick Sync Video is wrong about lookahead default
Problem Description
https://handbrake.fr/docs/en/1.6.0/technical/video-qsv.html This page says lookahead=1 is the default.
I verified that putting lookahead=1 in Advanced Options for H.264 (Intel QSV) makes a difference in the output file size and content.
Activity Log, Crash Log or any other details
HandBrake 1.6.1 (2023012300)
OS: Microsoft Windows NT 10.0.19045.0
CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
Ram: 16257 MB,
GPU Information:
Intel(R) HD Graphics 630 - 26.20.100.7528
NVIDIA GeForce GTX 1080 Ti - 31.0.15.2802
Screen: 2560x1440
Temp Dir: C:\Users\colem\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\colem\AppData\Roaming\HandBrake
-------------------------------------------
# Starting Encode ...
[22:40:06] base preset: H.264 NVENC (Modified)
[22:40:06] hb_init: starting libhb thread
[22:40:06] Starting work at: Thu Mar 16 22:40:06 2023
[22:40:06] 1 job(s) to process
[22:40:06] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 160,
"DRC": 0,
"Encoder": "av_aac",
"Gain": 0,
"Mixdown": 4,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac"
]
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
}
],
"ChapterMarkers": true,
"AlignAVStart": false,
"File": "C:\\Users\\colem\\Downloads\\a\\-Movies\\Womens.Prison.Massacre (1983)\\test-1.mp4",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "av_mp4"
},
"Filters": {
"FilterList": [
{
"ID": 14,
"Settings": {
"crop-bottom": "2",
"crop-left": "0",
"crop-right": "0",
"crop-top": "2",
"height": "1036",
"width": "1920"
}
},
{
"ID": 7,
"Settings": {
"mode": "1"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "C:\\Users\\colem\\Downloads\\a\\-Movies\\Womens.Prison.Massacre (1983)\\test.mov"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "qsv_h264",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "lookahead=1:lookahead-depth=40",
"Preset": "balanced",
"Profile": "auto",
"Quality": 36,
"QSV": {
"Decode": true
},
"HardwareDecode": 0
}
}
[22:40:06] CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
[22:40:06] - Intel microarchitecture Kaby Lake
[22:40:06] - logical processor count: 8
[22:40:06] Intel Quick Sync Video support: yes, gpu list: 1
[22:40:06] Intel Quick Sync Video integrated adapter with index 1
[22:40:06] Impl mfxhw64 library path: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_e709cb715c39d0e0\libmfxhw64.dll
[22:40:06] - Intel Media SDK hardware: API 1.30 (minimum: 1.3)
[22:40:06] - Decode support: h264 hevc (8bit: yes, 10bit: yes)
[22:40:06] - H.264 encoder: yes
[22:40:06] - preferred implementation: hardware (2) via D3D11
[22:40:06] - capabilities (hardware): breftype icq+la+i+downs vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[22:40:06] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[22:40:06] - preferred implementation: hardware (2) via D3D11
[22:40:06] - capabilities (hardware): bpyramid icq vsinfo masteringinfo cllinfo opt1
[22:40:06] - AV1 encoder: no
[22:40:06] hb_scan: path=C:\Users\colem\Downloads\a\-Movies\Womens.Prison.Massacre (1983)\test.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image C:\Users\colem\Downloads\a\-Movies\Womens.Prison.Massacre (1983)\test.mov
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
[22:40:06] 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
[22:40:06] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\colem\Downloads\a\-Movies\Womens.Prison.Massacre (1983)\test.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf57.79.100
Duration: 00:00:08.38, start: 0.000000, bitrate: 98946 kb/s
Stream #0:0[0x1](eng): Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, bt470bg/unknown/unknown), 1920x1040, 97414 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : FFMP
Stream #0:1[0x2](eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
[22:40:06] scan: decoding previews for title 1
[22:40:06] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 English (pcm_s16le) (2.0 ch) (1536 kbps)
[22:40:06] scan: 10 previews, 1920x1040, 23.976 fps, autocrop = 2/2/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-5, chroma location: unspecified
[22:40:06] libhb: scan thread found 1 valid title(s)
[22:40:06] qsv: integrated qsv adapter with index 1 has been selected
[22:40:06] Starting Task: Encoding Pass
[22:40:06] work: track 1, dithering not supported by codec
[22:40:06] work: only 1 chapter, disabling chapter markers
[22:40:06] job configuration:
[22:40:06] * source
[22:40:06] + C:\Users\colem\Downloads\a\-Movies\Womens.Prison.Massacre (1983)\test.mov
[22:40:06] + title 1, chapter(s) 1 to 1
[22:40:06] + container: mov,mp4,m4a,3gp,3g2,mj2
[22:40:06] + data rate: 98946 kbps
[22:40:06] * destination
[22:40:06] + C:\Users\colem\Downloads\a\-Movies\Womens.Prison.Massacre (1983)\test-1.mp4
[22:40:06] + container: MPEG-4 (libavformat)
[22:40:06] * video track
[22:40:06] + decoder: prores 10-bit (yuv422p10le)
[22:40:06] + bitrate 97414 kbps
[22:40:06] + filters
[22:40:06] + Framerate Shaper (mode=1)
[22:40:06] + frame rate: 23.976 fps -> constant 23.976 fps
[22:40:06] + Crop and Scale (width=1920:height=1036:crop-top=2:crop-bottom=2:crop-left=0:crop-right=0)
[22:40:06] + source: 1920 * 1040, crop (2/2/0/0): 1920 * 1036, scale: 1920 * 1036
[22:40:06] + Format (format=nv12)
[22:40:06] + Output geometry
[22:40:06] + storage dimensions: 1920 x 1036
[22:40:06] + pixel aspect ratio: 1 : 1
[22:40:06] + display dimensions: 1920 x 1036
[22:40:06] + encoder: H.264 (Intel Media SDK)
[22:40:06] + preset: balanced
[22:40:06] + options: lookahead=1:lookahead-depth=40
[22:40:06] + profile: auto
[22:40:06] + level: auto
[22:40:06] + quality: 36.00 (ICQ)
[22:40:06] + color profile: 1-1-5
[22:40:06] + chroma location: unspecified
[22:40:06] * audio track 1
[22:40:06] + decoder: English (pcm_s16le) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[22:40:06] + bitrate: 1536 kbps, samplerate: 48000 Hz
[22:40:06] + mixdown: Stereo
[22:40:06] + encoder: AAC (libavcodec)
[22:40:06] + bitrate: 160 kbps, samplerate: 48000 Hz
[22:40:06] sync: expecting 201 video frames
[22:40:06] Unknown Header.BufferId=1347637059
[22:40:06] encqsvInit: using encode-only path
[22:40:06] encqsvInit: H.264/AVC High profile @ level 4.0
[22:40:06] encqsvInit: TargetUsage 4 AsyncDepth 4
[22:40:06] encqsvInit: GopRefDist 4 GopPicSize 24 NumRefFrame 3 IdrInterval 0
[22:40:06] encqsvInit: BFramesMax 3 BRefType pyramid
[22:40:06] encqsvInit: RateControlMethod LA_ICQ ICQQuality 36 LookAheadDepth 40
[22:40:07] sync: first pts video is 0
[22:40:07] sync: "Chapter 1" (1) at frame 1 time 0
[22:40:07] sync: first pts audio 0x1 is 0
[22:40:07] qsv_enc_init: using 'hardware (2) via D3D11' implementation, API: 1.30
[22:40:08] reader: done. 1 scr changes
[22:40:10] work: average encoding speed for job is 0.000000 fps
[22:40:10] vfr: 201 frames output, 0 dropped and 0 duped for CFR/PFR
[22:40:10] vfr: lost time: 0 (0 frames)
[22:40:10] vfr: gained time: 0 (0 frames) (0 not accounted for)
[22:40:10] pcm_s16le-decoder done: 402 frames, 0 decoder errors
[22:40:10] prores-decoder done: 201 frames, 0 decoder errors
[22:40:10] sync: got 201 frames, 201 expected
[22:40:10] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[22:40:10] mux: track 0, 201 frames, 1097709 bytes, 1042.32 kbps, fifo 256
[22:40:10] mux: track 1, 393 frames, 167580 bytes, 159.12 kbps, fifo 512
[22:40:10] Finished work at: Thu Mar 16 22:40:10 2023
[22:40:10] libhb: work result = 0
# Job Completed!
What Operating System are you running?
Microsoft Windows NT 10.0.19045.0
What version of HandBrake are you running?
HandBrake 1.6.1 (2023012300)
Where did you download HandBrake from?
https://handbrake.fr/rotation.php?file=HandBrake-1.6.1-x86_64-Win_GUI.exe
I can confirm your observation and the default encoding setting use slightly different options for encoding.
The big difference is the use of 'mbbrc' setting, which produce bigger output filesize to get a higher quality in action scenes.
I am not a friend of default settings, because I prefer high quality in qsv encoding.
My recommend parameters in advanced video encoding settings: tu=1:la=1:la-depth=60
tu=1 slowest encode and max. quality in intel qsv encode! Great! la=lookahead activated la-depth=60 (highest positive value to analyse the video and get the best quality and compression)
Also use high profile level 4.1 for FullHD
Bitrate: min 4.000 kbit/s (standard quality), 6.000 kbit/s (good quality) and 8.000 kbit/s (fantastic details)
Looks like they fixed the doc.
lookahead (or la)
Use the LookAhead (LA or LA_ICQ) bitrate control algorithm. Default: 1 (on) Caveats: requires hardware support (4th gen. Intel Core processor or equivalent), and driver support for version 1.7 (1.8 for LA_ICQ) of the Media SDK API. lookahead-depth (or la-depth)
If LookAhead bitrate control is enabled, number of frames that are analyzed before encoding, from 11 to 60. Default: 40 Note: may be sanitized to a lower value in some cases to avoid hangs. Caveats: requires hardware support (4th gen. Intel Core processor or equivalent), and driver support for version 1.7 of the Media SDK API
lookahead=1 does not work for H264 QSV, High 4.1 level, constant framerate and average bitrate on 13th Gen i5-13500 and latest intel driver. it autoselects vbr ratecontrol instead. It is newer than minimum required 4th. gen and 1.8 SDK.
encqsvInit: hb_qsv_param_parse: unsupported option lookahead
HandBrake 1.9.2 (2025022300)
OS: Microsoft Windows NT 10.0.26100.0
CPU: 13th Gen Intel(R) Core(TM) i5-13500
Ram: 32517 MB,
GPU Information:
Intel(R) UHD Graphics 770 - 32.0.101.6790
Screen: 1920x1080
Temp Dir: C:\Users\diego\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\diego\AppData\Roaming\HandBrake
-------------------------------------------
# Starting Encode ...
[13:32:08] base preset: Fas (Modified)
[13:32:08] Remote Process started with Process ID: 2996 using port: 8037. Max Allowed Instances: 1
[13:32:09] Worker: Starting HandBrake Engine ...
[13:32:09] Worker: Parent Process Id 4952
[13:32:09] Worker: Starting Web Server on port 8037 ...
[13:32:09] Worker: Starting Listener: 1
[13:32:09] Worker: Server Started
[13:32:09] Worker: Disconnected worker monitoring enabled!
[13:32:09] Compile-time hardening features are enabled
Cannot load nvEncodeAPI64.dll
[13:32:09] vcn: not available on this system
[13:32:10] qsv: is available on this system
[13:32:10] hb_init: starting libhb thread
[13:32:10] Starting work at: Tue May 27 13:32:10 2025
[13:32:10] 1 job(s) to process
[13:32:10] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0,
"Encoder": "copy:aac",
"Gain": 0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:eac3",
"copy:truehd",
"copy:dts",
"copy:dtshd"
],
"FallbackEncoder": "av_aac"
},
"Destination": {
"ChapterList": [],
"ChapterMarkers": false,
"AlignAVStart": true,
"File": "C:\\Users\\diego\\Videos\\Nod(1).mp4",
"Options": {
"IpodAtom": false,
"Optimize": false
},
"Mux": "av_mp4"
},
"Filters": {
"FilterList": [
{
"ID": 20,
"Settings": {
"crop-bottom": "20",
"crop-left": "0",
"crop-right": "0",
"crop-top": "22",
"height": "1038",
"width": "1920"
}
},
{
"ID": 11,
"Settings": {
"mode": "1"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "C:\\Users\\diego\\Videos\\nod.mp4",
"HWDecode": 2,
"KeepDuplicateTitles": false
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "qsv_h264",
"Level": "4.1",
"Bitrate": 30000,
"MultiPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "lowpower=0:tu=1:ref=4:lookahead=1",
"Preset": "quality",
"Profile": "high",
"QSV": {
"Decode": true
},
"HardwareDecode": 0
}
}
[13:32:10] CPU: 13th Gen Intel(R) Core(TM) i5-13500
[13:32:10] - logical processor count: 20
[13:32:10] Intel Quick Sync Video support: yes, gpu list: 0
[13:32:10] Intel Quick Sync Video integrated adapter with index 0
[13:32:10] Impl mfx-gen library path: C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_9db6816fe4d1e6f9\libmfx64-gen.dll
[13:32:10] - Intel Media SDK hardware: API 2.14 (minimum: 1.3)
[13:32:10] - Decode support: h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[13:32:10] - H.264 encoder: yes
[13:32:10] - preferred implementation: hardware (1) via D3D11
[13:32:10] - capabilities (hardware): lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[13:32:10] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[13:32:10] - preferred implementation: hardware (1) via D3D11
[13:32:10] - capabilities (hardware): lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[13:32:10] - AV1 encoder: no
[13:32:10] hb_scan: path=C:\Users\diego\Videos\nod.mp4, title_index=1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\diego\Videos\nod.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2024-06-27T12:26:29.000000Z
Duration: 02:43:24.59, start: 0.000000, bitrate: 6406 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 5766 kb/s, 24 fps, 24 tbr, 24k tbn (default)
Metadata:
creation_time : 2024-06-27T12:26:29.000000Z
handler_name : BitmovinMP4Muxing
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
creation_time : 2024-06-27T12:28:02.000000Z
handler_name : BitmovinMP4Muxing
vendor_id : [0][0][0][0]
Stream #0:2[0x3](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 317 kb/s (default)
Metadata:
creation_time : 2024-06-27T12:28:07.000000Z
handler_name : BitmovinMP4Muxing
vendor_id : [0][0][0][0]
[13:32:10] scan: decoding previews for title 1
[13:32:10] scan: audio 0x1: aac, rate=48000Hz, bitrate=317375 Unknown (AAC LC, 2.0 ch, 317 kbps)
[13:32:10] scan: audio 0x2: aac, rate=48000Hz, bitrate=317375 Unknown (AAC LC, 5.1 ch, 317 kbps)
[13:32:10] using bitstream PAR 1:1
[13:32:10] scan: 10 previews, 1920x1080, 24.000 fps, autocrop = 22/20/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[13:32:10] scan: supported video decoders: avcodec qsv
[13:32:10] libhb: scan thread found 1 valid title(s)
[13:32:10] Starting Task: Encoding Pass
[13:32:10] job configuration:
[13:32:10] * source
[13:32:10] + C:\Users\diego\Videos\nod.mp4
[13:32:10] + title 1, chapter(s) 1 to 1
[13:32:10] + container: mov,mp4,m4a,3gp,3g2,mj2
[13:32:10] + data rate: 6406 kbps
[13:32:10] * destination
[13:32:10] + C:\Users\diego\Videos\Nod(1).mp4
[13:32:10] + container: MPEG-4 (libavformat)
[13:32:10] + align initial A/V stream timestamps
[13:32:10] * video track
[13:32:10] + decoder: h264_qsv 8-bit (yuv420p)
[13:32:10] + bitrate 5766 kbps
[13:32:10] + filters
[13:32:10] + Framerate Shaper (mode=1)
[13:32:10] + frame rate: 24.000 fps -> constant 24.000 fps
[13:32:10] + Crop and Scale (width=1920:height=1038:crop-top=22:crop-bottom=20:crop-left=0:crop-right=0)
[13:32:10] + source: 1920 * 1080, crop (22/20/0/0): 1920 * 1038, scale: 1920 * 1038
[13:32:10] + Format (format=nv12)
[13:32:10] + Output geometry
[13:32:10] + storage dimensions: 1920 x 1038
[13:32:10] + pixel aspect ratio: 1 : 1
[13:32:10] + display dimensions: 1920 x 1038
[13:32:10] + encoder: H.264 (Intel Media SDK)
[13:32:10] + preset: quality
[13:32:10] + options: lowpower=0:tu=1:ref=4:lookahead=1
[13:32:10] + profile: high
[13:32:10] + level: 4.1
[13:32:10] + bitrate: 30000 kbps, pass: 0
[13:32:10] + color profile: 1-1-1
[13:32:10] + color range: tv
[13:32:10] + chroma location: left
[13:32:10] * audio track 1
[13:32:10] + decoder: Unknown (AAC LC, 2.0 ch, 317 kbps) (track 1, id 0x1)
[13:32:10] + bitrate: 317 kbps, samplerate: 48000 Hz
[13:32:10] + AAC Passthru
[13:32:10] sync: expecting 235310 video frames
[13:32:10] encqsvInit: hb_qsv_param_parse: unsupported option lookahead
[13:32:10] Unknown Header.BufferId=1347637059
[13:32:10] encqsvInit: using encode-only via system memory path
[13:32:10] encqsvInit: H.264/AVC High profile @ level 4.1
[13:32:10] encqsvInit: TargetUsage 1 AsyncDepth 6
[13:32:10] encqsvInit: GopRefDist 4 GopPicSize 49 NumRefFrame 4 IdrInterval 0
[13:32:10] encqsvInit: BFramesMax 3 BRefType pyramid
[13:32:10] encqsvInit: RateControlMethod VBR TargetKbps 30000 MaxKbps 45000 BufferSizeInKB 11250 InitialDelayInKB 5625 BRCParamMultiplier 1
[13:32:11] sync: first pts video is 0
[13:32:11] sync: Chapter 1 at frame 1 time 0
[13:32:11] sync: first pts audio 0x1 is 0
[13:32:11] qsv_enc_init: using 'hardware (1) via D3D11' implementation, API: 2.14
# Encode Paused
# Encode Resumed
# Encode Stopped
[13:41:40] work: average encoding speed for job is 175.977127 fps
[13:41:40] vfr: 941 frames output, 0 dropped and 0 duped for CFR/PFR
[13:41:40] vfr: lost time: 0 (0 frames)
[13:41:40] vfr: gained time: 0 (0 frames) (0 not accounted for)
[13:41:40] aac-decoder done: 1979 frames, 0 decoder errors
[13:41:40] h264_qsv-decoder done: 1004 frames, 0 decoder errors
[13:41:40] sync: got 965 frames, 235310 expected
[13:41:40] sync: framerate min 24.000 fps, max 24.000 fps, avg 24.000 fps
[13:41:40] mux: track 0, 921 frames, 129475660 bytes, 25760.96 kbps, fifo 256
[13:41:40] mux: track 1, 1883 frames, 1593646 bytes, 317.08 kbps, fifo 512
[13:41:40] Finished work at: Tue May 27 13:41:40 2025
[13:41:40] libhb: work result = 1
# Job Cancelled!