feat: add smart audio copy and audio mix presets for configurable 5.1 downmixing

This commit is contained in:
Trevor Mears
2026-01-17 13:31:13 -08:00
parent 9919975663
commit c1f8077438
8 changed files with 80 additions and 13 deletions
+6 -1
View File
@@ -806,7 +806,12 @@ class VideoPlayer {
const statusText = videoMode === 'copy' ? 'Transcoding (Audio)' : 'Transcoding (Video)';
this.updateTranscodeStatus('transcoding', statusText);
const playlistUrl = await this.startTranscodeSession(streamUrl, { videoMode, videoCodec: info.video });
const playlistUrl = await this.startTranscodeSession(streamUrl, {
videoMode,
videoCodec: info.video,
audioCodec: info.audio,
audioChannels: info.audioChannels
});
this.currentUrl = playlistUrl; // Update currentUrl for HLS reload
this.playHls(playlistUrl);
+10
View File
@@ -149,6 +149,16 @@ class SettingsPage {
this.app.player.saveSettings();
});
// Audio Mix Preset
const audioMixSelect = document.getElementById('setting-audio-mix');
if (audioMixSelect) {
audioMixSelect.value = this.app.player?.settings?.audioMixPreset || 'auto';
audioMixSelect.addEventListener('change', () => {
this.app.player.settings.audioMixPreset = audioMixSelect.value;
this.app.player.saveSettings();
});
}
// Stream processing toggles
forceProxyToggle?.addEventListener('change', () => {
this.app.player.settings.forceProxy = forceProxyToggle.checked;
+6 -1
View File
@@ -330,7 +330,12 @@ class WatchPage {
const statusText = videoMode === 'copy' ? 'Transcoding (Audio)' : 'Transcoding (Video)';
this.updateTranscodeStatus('transcoding', statusText);
const playlistUrl = await this.startTranscodeSession(url, { videoMode, videoCodec: info.video });
const playlistUrl = await this.startTranscodeSession(url, {
videoMode,
videoCodec: info.video,
audioCodec: info.audio,
audioChannels: info.audioChannels
});
this.playHls(playlistUrl);
this.setVolumeFromStorage();
return;