Skip to content

Commit 3ee4144

Browse files
authored
fix(macos): drop max_ref_frames=1 for h264_videotoolbox and enable PARALLEL_ENCODING (#5200)
1 parent 3c7952b commit 3ee4144

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/video.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,12 +1134,16 @@ namespace video {
11341134
},
11351135
{
11361136
// Common options
1137+
// Note: max_ref_frames is intentionally omitted for H.264 because
1138+
// VideoToolbox on Apple Silicon produces all-IDR output when
1139+
// ReferenceBufferCount=1 is set for H.264, causing massive bandwidth
1140+
// inflation (~3x) and frame drops. HEVC and AV1 are unaffected and
1141+
// retain max_ref_frames=1. See LizardByte/Sunshine#5013.
11371142
{
11381143
{"allow_sw"s, &config::video.vt.vt_allow_sw},
11391144
{"require_sw"s, &config::video.vt.vt_require_sw},
11401145
{"realtime"s, &config::video.vt.vt_realtime},
11411146
{"prio_speed"s, 1},
1142-
{"max_ref_frames"s, 1},
11431147
},
11441148
{}, // SDR-specific options
11451149
{}, // HDR-specific options
@@ -1151,7 +1155,7 @@ namespace video {
11511155
},
11521156
"h264_videotoolbox"s,
11531157
},
1154-
DEFAULT
1158+
PARALLEL_ENCODING
11551159
};
11561160
#endif
11571161

0 commit comments

Comments
 (0)