Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1354,16 +1354,15 @@ namespace video {
},
{
// Common options
// Note: max_ref_frames is intentionally omitted for H.264 because
// VideoToolbox on Apple Silicon produces all-IDR output when
// ReferenceBufferCount=1 is set for H.264, causing massive bandwidth
// inflation (~3x) and frame drops. HEVC and AV1 are unaffected and
// retain max_ref_frames=1. See LizardByte/Sunshine#5013.
// ReferenceBufferCount=1 produces all-IDR output on Apple Silicon,
// while automatic selection can stall H.264 after the initial IDR on M1.
// Two buffers avoid both failure modes. HEVC and AV1 retain one.
{
{"allow_sw"s, &config::video.vt.vt_allow_sw},
{"require_sw"s, &config::video.vt.vt_require_sw},
{"realtime"s, &config::video.vt.vt_realtime},
{"prio_speed"s, 1},
{"max_ref_frames"s, 2},
},
{}, // SDR-specific options
{}, // HDR-specific options
Expand Down