From 3b14a17bfb2f8838cba9baf703e0291750fe972b Mon Sep 17 00:00:00 2001 From: Trevor Mears Date: Mon, 29 Dec 2025 22:55:09 -0800 Subject: [PATCH] Updated transcoding to support surround sound --- public/js/components/VideoPlayer.js | 4 ++-- server/routes/transcode.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/public/js/components/VideoPlayer.js b/public/js/components/VideoPlayer.js index 837ba55..f5f6896 100644 --- a/public/js/components/VideoPlayer.js +++ b/public/js/components/VideoPlayer.js @@ -302,7 +302,7 @@ class VideoPlayer { // Buffer stalled - seek forward to unstick console.log('[HLS] Buffer stalled, seeking to recover...'); if (!this.video.paused && this.video.currentTime > 0) { - this.video.currentTime += 0.5; + this.video.currentTime += 1; } } } @@ -323,7 +323,7 @@ class VideoPlayer { if (!wasFirstDetection && !this.video.paused && this.video.currentTime > 0) { // Seek forward slightly to skip past any corrupted audio frames console.log('[HLS] Seeking past discontinuity boundary'); - this.video.currentTime += 0.5; + this.video.currentTime += 1; } } } diff --git a/server/routes/transcode.js b/server/routes/transcode.js index 093ae39..8a7619c 100644 --- a/server/routes/transcode.js +++ b/server/routes/transcode.js @@ -31,9 +31,8 @@ router.get('/', (req, res) => { '-c:v', 'copy', // Audio: Transcode to browser-compatible AAC with consistent parameters '-c:a', 'aac', - '-ac', '2', '-ar', '48000', - '-b:a', '128k', + '-b:a', '256k', // Increased for surround sound '-af', 'aresample=48000:async=1', // Fragmented MP4 for streaming (browser-compatible) '-f', 'mp4',