summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/PresetService.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs24
2 files changed, 25 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
index 0879c67d8..9ee511ca8 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
@@ -490,6 +490,7 @@ namespace HandBrakeWPF.Services.Presets
preset.IsBuildIn = true;
preset.Category = category.PresetName;
preset.Task.AllowedPassthruOptions = new AllowedPassthru(true); // We don't want to override the built-in preset
+ preset.IsPresetDisabled = this.IsPresetDisabled(preset);
this.Add(preset, true);
}
@@ -776,6 +777,7 @@ namespace HandBrakeWPF.Services.Presets
Preset preset = JsonPresetFactory.ImportPreset(hbPreset);
preset.Category = UserPresetCatgoryName;
preset.IsBuildIn = hbPreset.Type == 1;
+ preset.IsPresetDisabled = this.IsPresetDisabled(preset);
// IF we are using Source Max, Set the Max Width / Height values.
if (preset.PictureSettingsMode == PresetPictureSettingsMode.SourceMaximum)
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
index 24f32211a..7ca879cd6 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
@@ -515,10 +515,32 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.Task);
if (this.Task.OutputFormat == OutputFormat.Mp4 &&
- (this.AudioEncoderFallback == AudioEncoder.ffflac || this.AudioEncoderFallback == AudioEncoder.ffflac24 || this.AudioEncoderFallback == AudioEncoder.Vorbis))
+ (this.AudioEncoderFallback == AudioEncoder.ffflac || this.AudioEncoderFallback == AudioEncoder.ffflac24 || this.AudioEncoderFallback == AudioEncoder.Vorbis || this.AudioEncoderFallback == AudioEncoder.Opus))
{
this.AudioEncoderFallback = AudioEncoder.ffaac;
}
+
+ if (this.Task.OutputFormat == OutputFormat.WebM &&
+ (this.AudioEncoderFallback != AudioEncoder.Opus && this.AudioEncoderFallback != AudioEncoder.Vorbis))
+ {
+ this.AudioEncoderFallback = AudioEncoder.Vorbis;
+ }
+
+ if (this.Task.OutputFormat == OutputFormat.Mp4)
+ {
+ foreach (AudioBehaviourTrack track in this.BehaviourTracks.Where(track => track.Encoder == AudioEncoder.ffflac || track.Encoder == AudioEncoder.ffflac24 || track.Encoder == AudioEncoder.Opus || track.Encoder == AudioEncoder.Vorbis))
+ {
+ track.Encoder = AudioEncoder.ffaac;
+ }
+ }
+
+ if (this.Task.OutputFormat == OutputFormat.WebM)
+ {
+ foreach (AudioBehaviourTrack track in this.BehaviourTracks.Where(track => track.Encoder != AudioEncoder.Vorbis && track.Encoder != AudioEncoder.Opus))
+ {
+ track.Encoder = AudioEncoder.Vorbis;
+ }
+ }
}
public void LaunchHelp()