mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
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:
1 parent
1377b70aee
commit
33d0e0a80d
4 files changed
+57
-45
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user