Skip to content

Commit ca11180

Browse files
author
RandomEngy
committed
Fixing a few issues with queue restoration. Adding Android presets.
1 parent 2ffc785 commit ca11180

4 files changed

Lines changed: 130 additions & 11 deletions

File tree

VidCoder/BuiltInPresets.xml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,4 +534,122 @@
534534
</AudioEncodings>
535535
</EncodingProfile>
536536
</Preset>
537+
<Preset>
538+
<Name>Android Mid</Name>
539+
<IsBuiltIn>true</IsBuiltIn>
540+
<IsModified>false</IsModified>
541+
<IsQueue>false</IsQueue>
542+
<EncodingProfile>
543+
<OutputFormat>Mp4</OutputFormat>
544+
<PreferredExtension>Mp4</PreferredExtension>
545+
<IncludeChapterMarkers>false</IncludeChapterMarkers>
546+
<LargeFile>false</LargeFile>
547+
<Optimize>false</Optimize>
548+
<IPod5GSupport>false</IPod5GSupport>
549+
<Width>0</Width>
550+
<Height>0</Height>
551+
<MaxWidth>480</MaxWidth>
552+
<MaxHeight>0</MaxHeight>
553+
<CustomCropping>false</CustomCropping>
554+
<Cropping>
555+
<Top>0</Top>
556+
<Bottom>0</Bottom>
557+
<Left>0</Left>
558+
<Right>0</Right>
559+
</Cropping>
560+
<Anamorphic>None</Anamorphic>
561+
<UseDisplayWidth>false</UseDisplayWidth>
562+
<DisplayWidth>1920</DisplayWidth>
563+
<KeepDisplayAspect>true</KeepDisplayAspect>
564+
<PixelAspectX>99</PixelAspectX>
565+
<PixelAspectY>100</PixelAspectY>
566+
<Modulus>16</Modulus>
567+
<Deinterlace>Off</Deinterlace>
568+
<Decomb>Off</Decomb>
569+
<Detelecine>Off</Detelecine>
570+
<Denoise>Off</Denoise>
571+
<Deblock>0</Deblock>
572+
<Grayscale>false</Grayscale>
573+
<VideoEncoder>X264</VideoEncoder>
574+
<X264Options>cabac=0:ref=2:me=umh:bframes=0:weightp=0:subq=6:8x8dct=0:trellis=0</X264Options>
575+
<VideoEncodeRateType>ConstantQuality</VideoEncodeRateType>
576+
<Quality>22</Quality>
577+
<TargetSize>0</TargetSize>
578+
<VideoBitrate>900</VideoBitrate>
579+
<TwoPass>false</TwoPass>
580+
<TurboFirstPass>false</TurboFirstPass>
581+
<Framerate>29.97</Framerate>
582+
<PeakFramerate>true</PeakFramerate>
583+
<AudioEncodings>
584+
<AudioEncoding>
585+
<InputNumber>0</InputNumber>
586+
<Encoder>Faac</Encoder>
587+
<Bitrate>128</Bitrate>
588+
<Mixdown>DolbyProLogicII</Mixdown>
589+
<SampleRateRaw>0</SampleRateRaw>
590+
<Gain>0</Gain>
591+
<Drc>0</Drc>
592+
</AudioEncoding>
593+
</AudioEncodings>
594+
</EncodingProfile>
595+
</Preset>
596+
<Preset>
597+
<Name>Android High</Name>
598+
<IsBuiltIn>true</IsBuiltIn>
599+
<IsModified>false</IsModified>
600+
<IsQueue>false</IsQueue>
601+
<EncodingProfile>
602+
<OutputFormat>Mp4</OutputFormat>
603+
<PreferredExtension>Mp4</PreferredExtension>
604+
<IncludeChapterMarkers>false</IncludeChapterMarkers>
605+
<LargeFile>false</LargeFile>
606+
<Optimize>false</Optimize>
607+
<IPod5GSupport>false</IPod5GSupport>
608+
<Width>0</Width>
609+
<Height>0</Height>
610+
<MaxWidth>720</MaxWidth>
611+
<MaxHeight>0</MaxHeight>
612+
<CustomCropping>false</CustomCropping>
613+
<Cropping>
614+
<Top>0</Top>
615+
<Bottom>0</Bottom>
616+
<Left>0</Left>
617+
<Right>0</Right>
618+
</Cropping>
619+
<Anamorphic>Loose</Anamorphic>
620+
<UseDisplayWidth>false</UseDisplayWidth>
621+
<DisplayWidth>1920</DisplayWidth>
622+
<KeepDisplayAspect>true</KeepDisplayAspect>
623+
<PixelAspectX>99</PixelAspectX>
624+
<PixelAspectY>100</PixelAspectY>
625+
<Modulus>16</Modulus>
626+
<Deinterlace>Off</Deinterlace>
627+
<Decomb>Off</Decomb>
628+
<Detelecine>Off</Detelecine>
629+
<Denoise>Off</Denoise>
630+
<Deblock>0</Deblock>
631+
<Grayscale>false</Grayscale>
632+
<VideoEncoder>X264</VideoEncoder>
633+
<X264Options>weightp=0:cabac=0</X264Options>
634+
<VideoEncodeRateType>ConstantQuality</VideoEncodeRateType>
635+
<Quality>22</Quality>
636+
<TargetSize>110</TargetSize>
637+
<VideoBitrate>900</VideoBitrate>
638+
<TwoPass>false</TwoPass>
639+
<TurboFirstPass>false</TurboFirstPass>
640+
<Framerate>29.97</Framerate>
641+
<PeakFramerate>true</PeakFramerate>
642+
<AudioEncodings>
643+
<AudioEncoding>
644+
<InputNumber>0</InputNumber>
645+
<Encoder>Faac</Encoder>
646+
<Bitrate>128</Bitrate>
647+
<Mixdown>DolbyProLogicII</Mixdown>
648+
<SampleRateRaw>0</SampleRateRaw>
649+
<Gain>0</Gain>
650+
<Drc>0</Drc>
651+
</AudioEncoding>
652+
</AudioEncodings>
653+
</EncodingProfile>
654+
</Preset>
537655
</PresetCollection>

VidCoder/View/EncodingWindow.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
Text="{Binding ProfileName}" Margin="0,4,0,0"
3636
Height="24" HorizontalAlignment="Left" VerticalAlignment="Top" Width="158" FontWeight="Bold" FontSize="14" TextAlignment="Center" TextTrimming="CharacterEllipsis" />
3737
<Button Height="24" Width="70"
38-
Visibility="{Binding IsBuiltIn, Converter={StaticResource VisibilityConverter}, ConverterParameter=True}"
38+
Visibility="{Binding SaveRenameButtonsVisible, Converter={StaticResource VisibilityConverter}}"
3939
Command="{Binding SaveCommand}">
4040
<StackPanel Orientation="Horizontal">
4141
<Image Source="/Icons/save.png" Width="16" Height="16" />
@@ -46,7 +46,7 @@
4646
Command="{Binding SaveAsCommand}">Save As...</Button>
4747
<Button
4848
Content="Rename"
49-
Visibility="{Binding IsBuiltIn, Converter={StaticResource VisibilityConverter}, ConverterParameter=True}"
49+
Visibility="{Binding SaveRenameButtonsVisible, Converter={StaticResource VisibilityConverter}}"
5050
Height="24" Width="65"
5151
Command="{Binding RenameCommand}" />
5252
<Button

VidCoder/ViewModel/EncodingViewModel.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ public Preset EditingPreset
6969

7070
set
7171
{
72-
if (value.IsModified)
72+
if (value.IsModified || value.IsQueue)
7373
{
74-
// If already modified, use the existing profile.
74+
// If already modified or this is the scrap queue preset, use existing profile.
7575
this.profile = value.EncodingProfile;
7676
}
7777
else
7878
{
79-
// If not modified, clone the profile
79+
// If not modified regular preset, clone the profile
8080
this.profile = value.EncodingProfile.Clone();
8181
}
8282

@@ -189,12 +189,13 @@ public bool IsModified
189189
this.NotifyPropertyChanged("IsModified");
190190
this.NotifyPropertyChanged("WindowTitle");
191191
this.NotifyPropertyChanged("DeleteButtonVisible");
192-
}
193192

194-
// If we've made a modification, we need to save the user presets.
195-
if (value)
196-
{
197-
this.mainViewModel.SaveUserPresets();
193+
// If we've made a modification, we need to save the user presets. The temporary queue preset will
194+
// not be persisted so we don't need to save user presets when it changes.
195+
if (value)
196+
{
197+
this.mainViewModel.SaveUserPresets();
198+
}
198199
}
199200
}
200201
}

VidCoder/ViewModel/MainViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3259,7 +3259,7 @@ public void EditQueueJob(EncodeJobViewModel jobVM)
32593259
IsModified = false,
32603260
IsQueue = true,
32613261
Name = "Restored from Queue",
3262-
EncodingProfile = jobVM.Job.EncodingProfile
3262+
EncodingProfile = jobVM.Job.EncodingProfile.Clone()
32633263
});
32643264

32653265
this.AllPresets.Insert(0, queuePreset);

0 commit comments

Comments
 (0)