fix(streaming): optimize quality, audio sync, and content update refresh

- Increased FFmpeg video quality to 8Mbps and audio to 192kbps.
- Added audio resync filters and better presets.
- Optimized HLS buffer settings for mobile players to reduce interruptions.
- Reduced API cache duration to 15m and added refresh support for faster content updates.
This commit is contained in:
Michael committed 2026-03-10 10:26:24 +01:00
1 parent 1377b70aee
commit 33d0e0a80d
4 files changed
+57 -45

No files matched your search

+8 -5
View File
@@ -243,10 +243,12 @@
}
const hls = new Hls({
maxBufferLength: 60,
maxMaxBufferLength: 120,
maxBufferLength: 30, // 30s is plenty for desktop stability
maxMaxBufferLength: 60,
enableWorker: true,
liveSyncDurationCount: 5
liveSyncDurationCount: 3,
liveMaxLatencyDurationCount: 10,
lowLatencyMode: true
});
window.hlsInstance = hls;
@@ -281,8 +283,9 @@
url: url
}, {
enableWorker: true,
stashInitialSize: 1024 * 1024,
enableStashBuffer: true
stashInitialSize: 512 * 1024, // Smaller stash for faster start and better audio sync
enableStashBuffer: true,
lazyLoad: false
});
player.attachMediaElement(video);
+5 -5
View File
@@ -229,12 +229,12 @@
if (isHLS && Hls.isSupported()) {
log('Using Hls.js optimized for mobile');
const hls = new Hls({
maxBufferLength: 90,
maxMaxBufferLength: 180,
liveSyncDurationCount: 6,
liveMaxLatencyDurationCount: 12,
maxBufferLength: 30,
maxMaxBufferLength: 60,
liveSyncDurationCount: 3,
liveMaxLatencyDurationCount: 10,
enableWorker: true,
lowLatencyMode: false
lowLatencyMode: true
});
hls.loadSource(streamUrl);
hls.attachMedia(video);