feat: add smart audio copy and audio mix presets for configurable 5.1 downmixing
This commit is contained in:
@@ -548,6 +548,20 @@
|
||||
<option value="low">Low (Fastest)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="setting-info" style="flex: 1;">
|
||||
<span class="setting-label">Audio Mix Preset</span>
|
||||
<span class="setting-hint">How multi-channel audio (5.1/7.1) is mixed down to stereo for browser
|
||||
playback.</span>
|
||||
</div>
|
||||
<select id="setting-audio-mix" class="source-select" style="width: auto; min-width: 200px;">
|
||||
<option value="auto">Auto (Smart Copy/ITU)</option>
|
||||
<option value="itu">ITU-R BS.775 (Balanced)</option>
|
||||
<option value="night">Night Mode (Dialogue Boost)</option>
|
||||
<option value="cinematic">Cinematic (Wide)</option>
|
||||
<option value="passthrough">Passthrough (Copy)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user