detached 8654af7

fix(codec): improve video streaming with VP8 fallback and larger buffers

Adjust video codec and buffering configuration for better streaming performance:

Changes:
- BlockVP8: false (was true) - Allow VP8 fallback for ad segments
  - Prevents playback interruptions when ads use VP8 codec
  - VP8 is lower priority but still useful for compatibility

- VideoBufferSizeMB: 64 MB (was 16 MB)
  - Larger buffer handles bursty Twitch/AV1 segments better
  - Reduces buffering events during variable bitrate streams

- QueueBufferTimeSec: 20 seconds (was 10 seconds)
  - More buffering time for smooth playback
  - Better tolerance for network jitter

Updated documentation in CONFIG.md to reflect new defaults.

This improves video streaming reliability, particularly for platforms
like Twitch that may mix different codecs for content and ads.
commit
8654af746c37606931096294901b02c3ee9e0ce4
author
bnema · · 2025-11-18 18:06 UTC
parent
5879e38
signature
GPG Unverified2B82207D370127A0 The key is unknown
2 files · +6 -6
M docs/CONFIG.md +3 -3
@@ -152,11 +152,11 @@ border = "#363636"
152152 | `codec_preferences.preferred_codecs` | string | `"av1,h264"` | Comma-separated | Codec priority order |
153153 | `codec_preferences.force_av1` | bool | `false` | - | Force AV1 codec |
154154 | `codec_preferences.block_vp9` | bool | `false` | - | Block VP9 codec |
155-| `codec_preferences.block_vp8` | bool | `true` | - | Block VP8 codec |
155+| `codec_preferences.block_vp8` | bool | `false` | - | Block VP8 codec |
156156 | `codec_preferences.av1_hardware_only` | bool | `false` | - | Disable AV1 software fallback |
157157 | `codec_preferences.disable_vp9_hardware` | bool | `false` | - | Disable VP9 hardware accel |
158-| `codec_preferences.video_buffer_size_mb` | int | `16` | > 0 | Video buffer size in MB |
159-| `codec_preferences.queue_buffer_time_sec` | int | `10` | > 0 | Queue buffer time in seconds |
158+| `codec_preferences.video_buffer_size_mb` | int | `64` | > 0 | Video buffer size in MB |
159+| `codec_preferences.queue_buffer_time_sec` | int | `20` | > 0 | Queue buffer time in seconds |
160160 | `codec_preferences.custom_user_agent` | string | Chrome UA | any | Custom user agent string |
161161 | `codec_preferences.av1_max_resolution` | string | `"1080p"` | `720p`, `1080p`, `1440p`, `4k`, `unlimited` | Max AV1 resolution |
162162 | `codec_preferences.disable_twitch_codec_control` | bool | `true` | - | Disable codec control on Twitch |
@@ -152,11 +152,11 @@ border = "#363636"
152 | `codec_preferences.preferred_codecs` | string | `"av1,h264"` | Comma-separated | Codec priority order |152 | `codec_preferences.preferred_codecs` | string | `"av1,h264"` | Comma-separated | Codec priority order |
153 | `codec_preferences.force_av1` | bool | `false` | - | Force AV1 codec |153 | `codec_preferences.force_av1` | bool | `false` | - | Force AV1 codec |
154 | `codec_preferences.block_vp9` | bool | `false` | - | Block VP9 codec |154 | `codec_preferences.block_vp9` | bool | `false` | - | Block VP9 codec |
155-| `codec_preferences.block_vp8` | bool | `true` | - | Block VP8 codec |155+| `codec_preferences.block_vp8` | bool | `false` | - | Block VP8 codec |
156 | `codec_preferences.av1_hardware_only` | bool | `false` | - | Disable AV1 software fallback |156 | `codec_preferences.av1_hardware_only` | bool | `false` | - | Disable AV1 software fallback |
157 | `codec_preferences.disable_vp9_hardware` | bool | `false` | - | Disable VP9 hardware accel |157 | `codec_preferences.disable_vp9_hardware` | bool | `false` | - | Disable VP9 hardware accel |
158-| `codec_preferences.video_buffer_size_mb` | int | `16` | > 0 | Video buffer size in MB |158+| `codec_preferences.video_buffer_size_mb` | int | `64` | > 0 | Video buffer size in MB |
159-| `codec_preferences.queue_buffer_time_sec` | int | `10` | > 0 | Queue buffer time in seconds |159+| `codec_preferences.queue_buffer_time_sec` | int | `20` | > 0 | Queue buffer time in seconds |
160 | `codec_preferences.custom_user_agent` | string | Chrome UA | any | Custom user agent string |160 | `codec_preferences.custom_user_agent` | string | Chrome UA | any | Custom user agent string |
161 | `codec_preferences.av1_max_resolution` | string | `"1080p"` | `720p`, `1080p`, `1440p`, `4k`, `unlimited` | Max AV1 resolution |161 | `codec_preferences.av1_max_resolution` | string | `"1080p"` | `720p`, `1080p`, `1440p`, `4k`, `unlimited` | Max AV1 resolution |
162 | `codec_preferences.disable_twitch_codec_control` | bool | `true` | - | Disable codec control on Twitch |162 | `codec_preferences.disable_twitch_codec_control` | bool | `true` | - | Disable codec control on Twitch |
M internal/config/defaults.go +3 -3
@@ -124,11 +124,11 @@ func DefaultConfig() *Config {
124124 PreferredCodecs: "av1,h264", // AV1 first, but allow VP9 fallback for higher resolutions
125125 ForceAV1: false, // Use smart AV1 negotiation instead of forcing
126126 BlockVP9: false, // Allow VP9 for higher resolutions
127- BlockVP8: true, // Still block VP8 as it's outdated
127+ BlockVP8: false, // Allow VP8 fallback for ad segments (lower priority)
128128 AV1HardwareOnly: false, // Allow software AV1 fallback
129129 DisableVP9Hardware: false, // Allow VP9 hardware for high res content
130- VideoBufferSizeMB: 16, // Larger buffer for AV1 streams
131- QueueBufferTimeSec: 10, // More buffering time for smooth playback
130+ VideoBufferSizeMB: 64, // Larger buffer for bursty Twitch/AV1 segments
131+ QueueBufferTimeSec: 20, // More buffering time for smooth playback
132132 CustomUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15", // WebKitGTK default (same as Epiphany)
133133 AV1MaxResolution: "1080p", // Optimal AV1 up to 1080p, fallback to VP9 for higher res
134134 DisableTwitchCodecControl: true, // Disable codec control on Twitch by default (prevents theater/fullscreen freezing)
@@ -124,11 +124,11 @@ func DefaultConfig() *Config {
124 PreferredCodecs: "av1,h264", // AV1 first, but allow VP9 fallback for higher resolutions124 PreferredCodecs: "av1,h264", // AV1 first, but allow VP9 fallback for higher resolutions
125 ForceAV1: false, // Use smart AV1 negotiation instead of forcing125 ForceAV1: false, // Use smart AV1 negotiation instead of forcing
126 BlockVP9: false, // Allow VP9 for higher resolutions126 BlockVP9: false, // Allow VP9 for higher resolutions
127- BlockVP8: true, // Still block VP8 as it's outdated127+ BlockVP8: false, // Allow VP8 fallback for ad segments (lower priority)
128 AV1HardwareOnly: false, // Allow software AV1 fallback128 AV1HardwareOnly: false, // Allow software AV1 fallback
129 DisableVP9Hardware: false, // Allow VP9 hardware for high res content129 DisableVP9Hardware: false, // Allow VP9 hardware for high res content
130- VideoBufferSizeMB: 16, // Larger buffer for AV1 streams130+ VideoBufferSizeMB: 64, // Larger buffer for bursty Twitch/AV1 segments
131- QueueBufferTimeSec: 10, // More buffering time for smooth playback131+ QueueBufferTimeSec: 20, // More buffering time for smooth playback
132 CustomUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15", // WebKitGTK default (same as Epiphany)132 CustomUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15", // WebKitGTK default (same as Epiphany)
133 AV1MaxResolution: "1080p", // Optimal AV1 up to 1080p, fallback to VP9 for higher res133 AV1MaxResolution: "1080p", // Optimal AV1 up to 1080p, fallback to VP9 for higher res
134 DisableTwitchCodecControl: true, // Disable codec control on Twitch by default (prevents theater/fullscreen freezing)134 DisableTwitchCodecControl: true, // Disable codec control on Twitch by default (prevents theater/fullscreen freezing)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close