Updating Compiled Libraries

Updating to the newest version of butterflow.
This commit is contained in:
Jordan Wages 2019-08-17 00:48:18 -05:00
parent 13c4225fde
commit f912673f5f
352 changed files with 21285 additions and 313 deletions

View File

@ -17,7 +17,7 @@
</StackPanel>
<WrapPanel HorizontalAlignment="Center">
<TextBlock Text="{x:Static loc:Localization.VersionLabel}" />
<TextBlock Text=" - "/>
<TextBlock Text=" - " />
<TextBlock Name="txtVersion" Text="0.0.0.0" />
</WrapPanel>
<TextBlock Text="{x:Static loc:Localization.AboutWindowDescription}" TextAlignment="Center" />
@ -34,23 +34,25 @@
<Label Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Content="{x:Static loc:Localization.DevelopersLabel}" />
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center">
<Hyperlink NavigateUri="https://github.com/wagesj45" RequestNavigate="Hyperlink_RequestNavigate">Jordan Wages</Hyperlink>
<Hyperlink NavigateUri="https://github.com/wagesj45" RequestNavigate="Hyperlink_RequestNavigate">Jordan Wages</Hyperlink>
|
<Hyperlink NavigateUri="https://www.paypal.me/wagesj45" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.DonateLabel}" /></Hyperlink>
</TextBlock>
</StackPanel>
<Label Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="{x:Static loc:Localization.OpenSourceCreditsLabel}" />
<StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center">
butterflow
butterflow
| <Hyperlink NavigateUri="https://github.com/dthpham/butterflow" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowGithubLinkLabel}" /></Hyperlink>
| <Hyperlink NavigateUri="https://github.com/dthpham/butterflow/blob/master/LICENSE" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowLicenseLinkLabel}" /></Hyperlink>
</TextBlock>
<TextBlock HorizontalAlignment="Center">
cs-mic
cs-mic
| <Hyperlink NavigateUri="https://github.com/wagesj45/cs-mic" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowGithubLinkLabel}" /></Hyperlink>
| <Hyperlink NavigateUri="https://github.com/wagesj45/cs-mic/blob/master/LICENSE" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowLicenseLinkLabel}" /></Hyperlink>
</TextBlock>
<TextBlock HorizontalAlignment="Center">
Gu.Wpf.Media
Gu.Wpf.Media
| <Hyperlink NavigateUri="https://github.com/JohanLarsson/Gu.Wpf.Media" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowGithubLinkLabel}" /></Hyperlink>
| <Hyperlink NavigateUri="https://github.com/JohanLarsson/Gu.Wpf.Media/blob/master/LICENSE.md" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowLicenseLinkLabel}" /></Hyperlink>
</TextBlock>
@ -63,7 +65,7 @@
</Grid>
<Separator Margin="0,10" />
<TextBlock Text="{x:Static butterflow_ui:OctokitWrapper.CurrentVersionStatusDescription}" TextAlignment="Center" Margin="0,10" />
<Button Name="btnOK" MaxWidth="50" Content="{x:Static loc:Localization.OKLabel}" Click="btnOK_Click"/>
<Button Name="btnOK" MaxWidth="50" Content="{x:Static loc:Localization.OKLabel}" Click="btnOK_Click" />
</StackPanel>
</DockPanel>
</Window>
</Window>

View File

@ -14,7 +14,10 @@
<value>en-US</value>
</setting>
<setting name="Device" serializeAs="String">
<value>-1</value>
<value>0</value>
</setting>
<setting name="UseDefaultDevice" serializeAs="String">
<value>True</value>
</setting>
</butterflow_ui.Properties.Settings>
</userSettings>

View File

@ -312,6 +312,15 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to donate.
/// </summary>
public static string DonateLabel {
get {
return ResourceManager.GetString("DonateLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to _Edit.
/// </summary>
@ -861,6 +870,15 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to Use Default Compute Device.
/// </summary>
public static string UseDefaultDeviceLabel {
get {
return ResourceManager.GetString("UseDefaultDeviceLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Version.
/// </summary>

View File

@ -396,4 +396,10 @@
<data name="ForceCPU" xml:space="preserve">
<value>Force CPU</value>
</data>
<data name="UseDefaultDeviceLabel" xml:space="preserve">
<value>Use Default Compute Device</value>
</data>
<data name="DonateLabel" xml:space="preserve">
<value>donate</value>
</data>
</root>

View File

@ -15,13 +15,13 @@
<ObjectDataProvider x:Key="enumRegionTypeDataProvider" MethodName="GetValues"
ObjectType="{x:Type System:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="butterflow_ui:RegionType"/>
<x:Type TypeName="butterflow_ui:RegionType" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="enumFlowFilterTypeDataProvider" MethodName="GetValues"
ObjectType="{x:Type System:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="butterflow_ui:FlowFilterType"/>
<x:Type TypeName="butterflow_ui:FlowFilterType" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<butterflow_ui:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -56,7 +56,7 @@
</MenuItem>
</MenuItem>
<MenuItem Header="{x:Static loc:Localization.HelpMenu}">
<MenuItem Name="menuButterflowGithub" Header="{x:Static loc:Localization.AboutButterflowMenu}" Click="menuButterflowGithub_Click" >
<MenuItem Name="menuButterflowGithub" Header="{x:Static loc:Localization.AboutButterflowMenu}" Click="menuButterflowGithub_Click">
<MenuItem.Icon>
<ContentControl Template="{StaticResource LinkIcon}" />
</MenuItem.Icon>
@ -83,7 +83,7 @@
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*" />
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
@ -95,8 +95,8 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="{x:Static loc:Localization.FileLabel}"/>
<TextBox Name="txtFileName" Grid.Column="1" IsReadOnly="True"/>
<Label Grid.Column="0" Content="{x:Static loc:Localization.FileLabel}" />
<TextBox Name="txtFileName" Grid.Column="1" IsReadOnly="True" />
<Button Grid.Column="2" MinWidth="25" Name="btnFilePicker" Click="btnFilePicker_Click">...</Button>
</Grid>
</GroupBox>
@ -107,8 +107,8 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="{x:Static loc:Localization.FileLabel}"/>
<TextBox Name="txtFileOutputName" Grid.Column="1" IsReadOnly="True" Text="{Binding OptionsConfiguration.VideoOutput, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Column="0" Content="{x:Static loc:Localization.FileLabel}" />
<TextBox Name="txtFileOutputName" Grid.Column="1" IsReadOnly="True" Text="{Binding OptionsConfiguration.VideoOutput, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}" />
<Button Grid.Column="2" MinWidth="25" Name="btnFileOutputPicker" Click="btnFileOutputPicker_Click">...</Button>
</Grid>
</GroupBox>
@ -134,7 +134,7 @@
<GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Header="{x:Static loc:Localization.CommonOptionsGroupBox}">
<ScrollViewer>
<StackPanel>
<butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.PlaybackRateLabel}" >
<butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.PlaybackRateLabel}">
<StackPanel Orientation="Vertical">
<butterflow_ui:ButterflowOption LabelValue="">
<RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._2xLabel}" Tag="2x" />
@ -146,7 +146,7 @@
<RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._4xLabel}" Tag="4x" />
</butterflow_ui:ButterflowOption>
<butterflow_ui:ButterflowOption LabelValue="">
<RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._24fpsLabel}" Tag="24"/>
<RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._24fpsLabel}" Tag="24" />
</butterflow_ui:ButterflowOption>
<butterflow_ui:ButterflowOption LabelValue="">
<RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._30fpsLabel}" Tag="30" />
@ -158,7 +158,7 @@
<RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._120fpsLabel}" Tag="120" />
</butterflow_ui:ButterflowOption>
<butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.CustomPlaybackRateLabel}" DescriptionValue="{x:Static loc:Localization.PlaybackRateDescription}">
<TextBox Name="txtPlaybackRate" Text="{Binding OptionsConfiguration.PlaybackRate, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}" GotFocus="txtPlaybackRate_GotFocus" />
<TextBox Name="txtPlaybackRate" Text="{Binding OptionsConfiguration.PlaybackRate, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}" GotFocus="txtPlaybackRate_GotFocus" />
</butterflow_ui:ButterflowOption>
</StackPanel>
</butterflow_ui:ButterflowOption>
@ -203,7 +203,6 @@
</ToggleButton.Style>
</ToggleButton>
<Button BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="bntVideoStop_Click">
</Button>
<butterflow_ui:ButterflowOption Grid.Column="2" LabelValue="{x:Static loc:Localization.HeightLabel}">
<TextBox Text="{Binding OptionsConfiguration.Height, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=LostFocus}" IsReadOnly="{Binding OptionsConfiguration.LockAspectRatio, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}">
@ -233,10 +232,10 @@
<DataTemplate>
<DockPanel MaxHeight="24">
<TextBlock VerticalAlignment="Center" Text="{x:Static loc:Localization.StartLabel}" />
<TextBlock VerticalAlignment="Center" Text="{Binding Start, Converter={x:Static gu:TimeSpanToStringConverter.Default}}" ToolTip="{Binding Start}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Start, Converter={x:Static gu:TimeSpanToStringConverter.Default}}" ToolTip="{Binding Start}" />
<TextBlock VerticalAlignment="Center" Text="{x:Static loc:Localization.EndLabel}" />
<TextBlock VerticalAlignment="Center" Text="{Binding End, Converter={x:Static gu:TimeSpanToStringConverter.Default}}" ToolTip="{Binding End}"/>
<ComboBox VerticalAlignment="Center" ItemsSource="{Binding Source={StaticResource enumRegionTypeDataProvider}}" SelectedItem="{Binding SubregionType, Mode=TwoWay}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding End, Converter={x:Static gu:TimeSpanToStringConverter.Default}}" ToolTip="{Binding End}" />
<ComboBox VerticalAlignment="Center" ItemsSource="{Binding Source={StaticResource enumRegionTypeDataProvider}}" SelectedItem="{Binding SubregionType, Mode=TwoWay}" />
<TextBox VerticalAlignment="Center" MinWidth="35" Text="{Binding Value, Mode=TwoWay}" />
<TextBlock VerticalAlignment="Center" Text="{x:Static loc:Localization.ToEndLabel}" />
<CheckBox VerticalAlignment="Center" IsChecked="{Binding ToEnd, Mode=TwoWay}" />
@ -276,7 +275,7 @@
<TextBox Text="{Binding OptionsConfiguration.SmoothDerivativeStandardDeviation, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=LostFocus}" />
</butterflow_ui:ButterflowOption>
<butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.FlowFilterLabel}" DescriptionValue="{x:Static loc:Localization.FlowFilterTooltip}">
<ComboBox ItemsSource="{Binding Source={StaticResource enumFlowFilterTypeDataProvider}}" SelectedItem="{Binding OptionsConfiguration.FlowFilterType, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}"/>
<ComboBox ItemsSource="{Binding Source={StaticResource enumFlowFilterTypeDataProvider}}" SelectedItem="{Binding OptionsConfiguration.FlowFilterType, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}" />
</butterflow_ui:ButterflowOption>
</StackPanel>
</ScrollViewer>
@ -320,8 +319,8 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="{Binding ElementName=mediaPreview, Path=Position, Converter={x:Static gu:TimeSpanToStringConverter.Default}}" />
<Slider Grid.Column="1" Name="sliderMedia"
Value="{Binding ElementName=mediaPreview, Path=Position, Converter={x:Static gu:NullableTimeSpanToSecondsConverter.Default}}"
<Slider Grid.Column="1" Name="sliderMedia"
Value="{Binding ElementName=mediaPreview, Path=Position, Converter={x:Static gu:NullableTimeSpanToSecondsConverter.Default}}"
Maximum="{Binding Path=Length, ElementName=mediaPreview, Converter={x:Static gu:NullableTimeSpanToSecondsConverter.Default}}" />
<Label Grid.Column="2" Content="{Binding Path=Length, ElementName=mediaPreview, Converter={x:Static gu:TimeSpanToStringConverter.Default}}" />
</Grid>
@ -360,9 +359,9 @@
</Button>
</StatusBarItem>
<StatusBarItem Grid.Column="1">
<TextBlock Text="{Binding OptionsConfiguration.CommandLineOutput, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}}"/>
<TextBlock Text="{Binding OptionsConfiguration.CommandLineOutput, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}}" />
</StatusBarItem>
</StatusBar>
</Grid>
</DockPanel>
</Window>
</Window>

View File

@ -11,7 +11,6 @@ using csmic;
namespace butterflow_ui
{
/// <summary> The butterflow options configuration. Contians all the options necessary to run butterflow and process a video. </summary>
public class OptionsConfiguration : PropertyChangedAlerter
{
@ -19,67 +18,93 @@ namespace butterflow_ui
/// <summary> The default pyramid scale setting. </summary>
private const decimal DEFAULT_PYRAMID_SCALE = 0.5m;
/// <summary> The default levels setting. </summary>
private const int DEFAULT_LEVELS = 3;
/// <summary> The default window size setting. </summary>
private const int DEFAULT_WINDOW_SIZE = 25;
/// <summary> The default iterations setting. </summary>
private const int DEFAULT_ITERATIONS = 3;
/// <summary> The default pixel neighborhood setting. </summary>
private const int DEFAULT_PIXEL_NEIGHBORHOOD = 5;
/// <summary> The default smooth derivative standard deviation setting. </summary>
private const decimal DEFAULT_SMOOTH_DERIVATIVE_STANDARD_DEVIATION = 1.1m;
/// <summary> The default flow filter type setting. </summary>
private const FlowFilterType DEFAULT_FLOW_FILTER_TYPE = FlowFilterType.box;
/// <summary> The output file format when operating on more than one video. </summary>
private const string OUTPUT_FILE_FORMAT = "{0}_{1}";
/// <summary> An input interpreter used for converting string values to numeric values. </summary>
[NonSerialized]
private InputInterpreter interpreter = new InputInterpreter();
/// <summary> The aspect ratio used for calculating heights when the aspect ratio is locked. </summary>
private decimal aspectRatio = 0;
/// <summary> The playback rate. </summary>
private string playbackRate;
/// <summary> A value indicating whether or not to keep the original audio in the final video. </summary>
private bool keepAudio;
/// <summary> The width of the output video. </summary>
private int width;
/// <summary> The height of the output video. </summary>
private int height;
/// <summary> A value indicating whether or not to render unspecified subregions. </summary>
private bool keepSubregions;
/// <summary> A value indicating whether or not to render the final video with lossless quality. </summary>
private bool losslessQuality;
/// <summary> A value indicating whether or not to tune processing for smooth motion. </summary>
private bool smoothMotion;
/// <summary> A value indicating whether or not to lock the aspect ratio to the <seealso cref="width"/> of the video. </summary>
private bool lockAspectRatio;
/// <summary> The video input files. </summary>
private IEnumerable<string> videoInput;
/// <summary> The video output file. </summary>
private string videoOutput;
/// <summary> A value indicating whether or not to use fast pyramids when processing a video. </summary>
private bool fastPyramid;
/// <summary> The pyramid scale setting. </summary>
private decimal pyramidScale;
/// <summary> The level size setting. </summary>
private int levels;
/// <summary> Size of the windowing average. </summary>
private int windowSize;
/// <summary> The number of iterations per pyramid level. </summary>
private int iterations;
/// <summary> The size of pixel neighborhood. </summary>
private int pixelNeighborhood;
/// <summary> The standard deviation of smooth derivatives </summary>
private decimal smoothDerivativeStandardDeviation;
/// <summary> Type of the flow filter to use for processing. </summary>
private FlowFilterType flowFilterType = FlowFilterType.box;
/// <summary> The subregions of the video on which to process. </summary>
private ObservableCollection<ButterflowSubregion> subregions = new ObservableCollection<ButterflowSubregion>();
#endregion
#endregion Members
#region Properties
@ -158,7 +183,7 @@ namespace butterflow_ui
}
set
{
if (value && this.width != 0 && this.height != 0)
if(value && this.width != 0 && this.height != 0)
{
this.aspectRatio = Convert.ToDecimal(this.height) / Convert.ToDecimal(this.width);
}
@ -185,7 +210,7 @@ namespace butterflow_ui
OnPropertyChanged();
if (this.lockAspectRatio)
if(this.lockAspectRatio)
{
interpreter.Interpret(string.Format("{0} * {1}", this.aspectRatio, this.width));
this.height = interpreter.Int;
@ -364,7 +389,7 @@ namespace butterflow_ui
{
interpreter.Interpret(value);
if (interpreter.Int >= 5 && interpreter.Int <= 7)
if(interpreter.Int >= 5 && interpreter.Int <= 7)
{
this.pixelNeighborhood = interpreter.Int;
}
@ -419,7 +444,7 @@ namespace butterflow_ui
}
}
#endregion
#endregion Properties
#region Contructors
@ -445,16 +470,16 @@ namespace butterflow_ui
/// <param name="e"> Notify collection changed event information. </param>
private void Subregions_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.NewItems != null)
if(e.NewItems != null)
{
foreach (ButterflowSubregion newItem in e.NewItems)
foreach(ButterflowSubregion newItem in e.NewItems)
{
newItem.PropertyChanged += SubregionPropertyChanged;
}
}
if (e.OldItems != null)
if(e.OldItems != null)
{
foreach (ButterflowSubregion oldItem in e.OldItems)
foreach(ButterflowSubregion oldItem in e.OldItems)
{
oldItem.PropertyChanged -= SubregionPropertyChanged;
}
@ -463,7 +488,7 @@ namespace butterflow_ui
OnPropertyChanged("CommandLineOutput");
}
#endregion
#endregion Contructors
#region Methods
@ -532,7 +557,7 @@ namespace butterflow_ui
{
var stringBuilder = new StringBuilder("-v "); // Verbose
if (this.LockAspectRatio)
if(this.LockAspectRatio)
{
stringBuilder.AppendFormat("-vs {0}:-1 ", this.Width);
}
@ -541,37 +566,40 @@ namespace butterflow_ui
stringBuilder.AppendFormat("-vs {0}:{1} ", this.Width, this.Height);
}
if(Settings.Default.Device == 0)
if(!Settings.Default.UseDefaultDevice)
{
stringBuilder.Append("-sw ");
}
if(Settings.Default.Device > 0)
{
stringBuilder.AppendFormat("-device {0} ", Settings.Default.Device);
if(Settings.Default.Device == 0)
{
stringBuilder.Append("-sw ");
}
if(Settings.Default.Device > 0)
{
stringBuilder.AppendFormat("-device {0} ", Settings.Default.Device - 1);
}
}
if (!string.IsNullOrWhiteSpace(this.PlaybackRate)) stringBuilder.AppendFormat("-r {0} ", this.PlaybackRate);
if (this.KeepAudio) stringBuilder.Append("-audio ");
if (this.LosslessQuality) stringBuilder.Append("-l ");
if(!string.IsNullOrWhiteSpace(this.PlaybackRate)) stringBuilder.AppendFormat("-r {0} ", this.PlaybackRate);
if(this.KeepAudio) stringBuilder.Append("-audio ");
if(this.LosslessQuality) stringBuilder.Append("-l ");
if (this.Subregions.Any())
if(this.Subregions.Any())
{
stringBuilder.Append("-s ");
foreach (var anon in this.Subregions.Select((sr, index) => new { Index = index, Subregion = sr }))
foreach(var anon in this.Subregions.Select((sr, index) => new { Index = index, Subregion = sr }))
{
string format = "ss\\.fff";
if (anon.Index > 0)
if(anon.Index > 0)
{
stringBuilder.Append(":");
}
if (anon.Subregion.Start.TotalHours > 1)
if(anon.Subregion.Start.TotalHours > 1)
{
format = "h\\:m\\:s\\.fff";
}
else if (anon.Subregion.Start.TotalMinutes > 1)
else if(anon.Subregion.Start.TotalMinutes > 1)
{
format = "m\\:s\\.fff";
}
@ -581,26 +609,26 @@ namespace butterflow_ui
stringBuilder.Append(" ");
}
if (this.KeepSubregions) stringBuilder.Append("-k ");
if (this.SmoothMotion) stringBuilder.Append("-sm ");
if (this.FastPyramid) stringBuilder.Append("--fast-pyr ");
if (this.pyramidScale != DEFAULT_PYRAMID_SCALE) stringBuilder.AppendFormat("--pyr-scale {0} ", this.PyramidScale);
if (this.levels != DEFAULT_LEVELS) stringBuilder.AppendFormat("--levels {0} ", this.Levels);
if (this.windowSize != DEFAULT_WINDOW_SIZE) stringBuilder.AppendFormat("--winsize {0} ", this.WindowSize);
if (this.iterations != DEFAULT_ITERATIONS) stringBuilder.AppendFormat("--iters {0} ", this.Iterations);
if (this.pixelNeighborhood != DEFAULT_PIXEL_NEIGHBORHOOD) stringBuilder.AppendFormat("--poly-n {0} ", this.PixelNeighborhood);
if (this.smoothDerivativeStandardDeviation != DEFAULT_SMOOTH_DERIVATIVE_STANDARD_DEVIATION) stringBuilder.AppendFormat("--poly-s {0} ", this.SmoothDerivativeStandardDeviation);
if (this.FlowFilterType != DEFAULT_FLOW_FILTER_TYPE) stringBuilder.AppendFormat("-ff {0} ", this.FlowFilterType);
if(this.KeepSubregions) stringBuilder.Append("-k ");
if(this.SmoothMotion) stringBuilder.Append("-sm ");
if(this.FastPyramid) stringBuilder.Append("--fast-pyr ");
if(this.pyramidScale != DEFAULT_PYRAMID_SCALE) stringBuilder.AppendFormat("--pyr-scale {0} ", this.PyramidScale);
if(this.levels != DEFAULT_LEVELS) stringBuilder.AppendFormat("--levels {0} ", this.Levels);
if(this.windowSize != DEFAULT_WINDOW_SIZE) stringBuilder.AppendFormat("--winsize {0} ", this.WindowSize);
if(this.iterations != DEFAULT_ITERATIONS) stringBuilder.AppendFormat("--iters {0} ", this.Iterations);
if(this.pixelNeighborhood != DEFAULT_PIXEL_NEIGHBORHOOD) stringBuilder.AppendFormat("--poly-n {0} ", this.PixelNeighborhood);
if(this.smoothDerivativeStandardDeviation != DEFAULT_SMOOTH_DERIVATIVE_STANDARD_DEVIATION) stringBuilder.AppendFormat("--poly-s {0} ", this.SmoothDerivativeStandardDeviation);
if(this.FlowFilterType != DEFAULT_FLOW_FILTER_TYPE) stringBuilder.AppendFormat("-ff {0} ", this.FlowFilterType);
if (!string.IsNullOrWhiteSpace(this.VideoOutput))
if(!string.IsNullOrWhiteSpace(this.VideoOutput))
{
string videoOutputFile = string.Empty;
if (this.MultipleFiles)
if(this.MultipleFiles)
{
var format = new StringBuilder(Path.GetFileNameWithoutExtension(this.VideoOutput));
format.Append("_{0:");
for (int i = 0; i < this.videoInput.Count().ToString().Length; i++)
for(int i = 0; i < this.videoInput.Count().ToString().Length; i++)
{
format.Append("0");
}
@ -619,7 +647,7 @@ namespace butterflow_ui
stringBuilder.AppendFormat("-o \"{0}\" ", videoOutputFile);
}
if (this.VideoInput.Any())
if(this.VideoInput.Any())
{
stringBuilder.AppendFormat("\"{0}\"", this.VideoInput.ElementAt(videoInputIndex));
}
@ -634,6 +662,6 @@ namespace butterflow_ui
return ToButterflowArguments();
}
#endregion
#endregion Methods
}
}
}

View File

@ -8,19 +8,26 @@
xmlns:loc="clr-namespace:butterflow_ui.Localization"
mc:Ignorable="d"
Title="{x:Static loc:Localization.OptionsWindowTitle}" SizeToContent="WidthAndHeight">
<Window.Resources>
<butterflow_ui:InverseBoolVisibilityConverter x:Key="InverseBoolVisibilityConverter" />
</Window.Resources>
<DockPanel Margin="32">
<StackPanel>
<WrapPanel>
<Label Content="{x:Static loc:Localization.LanguageLabel}" />
<ComboBox DisplayMemberPath="DisplayName" ItemsSource="{Binding SupportedLanguages, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:OptionsWindow}}, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding Source={x:Static settings:Settings.Default}, Path=Language}" />
<ComboBox DisplayMemberPath="DisplayName" ItemsSource="{Binding SupportedLanguages, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:OptionsWindow}}, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding Source={x:Static settings:Settings.Default}, Path=Language}" VerticalAlignment="Center" />
</WrapPanel>
<TextBlock Text="{x:Static loc:Localization.OptionsWindowLanguageChangeNotice}" Foreground="Gray" />
<WrapPanel>
<Label Content="{x:Static loc:Localization.UseDefaultDeviceLabel}" />
<CheckBox Name="chkUseDefaultDevice" IsChecked="{Binding Source={x:Static settings:Settings.Default}, Path=UseDefaultDevice}" VerticalAlignment="Center" />
</WrapPanel>
<WrapPanel Visibility="{Binding Source={x:Static settings:Settings.Default}, Path=UseDefaultDevice, Converter={StaticResource InverseBoolVisibilityConverter}}">
<Label Content="{x:Static loc:Localization.DeviceLabel}" />
<ComboBox Name="comboDeviceList" DisplayMemberPath="Value" ItemsSource="{Binding ButterflowWrapper.Devices, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:OptionsWindow}}, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="{Binding Source={x:Static settings:Settings.Default}, Path=Device}" />
<ComboBox Name="comboDeviceList" DisplayMemberPath="Value" ItemsSource="{Binding ButterflowWrapper.Devices, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:OptionsWindow}}, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="{Binding Source={x:Static settings:Settings.Default}, Path=Device}" VerticalAlignment="Center" />
</WrapPanel>
<Separator Margin="0,10" />
<Button Name="btnSave" MaxWidth="45" Content="{x:Static loc:Localization.SaveLabel}" Click="btnSave_Click" />
</StackPanel>
</DockPanel>
</Window>
</Window>

View File

@ -37,7 +37,7 @@ namespace butterflow_ui
CultureInfo.CreateSpecificCulture("zh-CN"),
});
#endregion
#endregion Properties
#region Constructors
@ -49,7 +49,7 @@ namespace butterflow_ui
InitializeComponent();
}
#endregion
#endregion Constructors
#region Methods
@ -68,7 +68,7 @@ namespace butterflow_ui
/// <param name="e"> The ButterflowExitArgs to process. </param>
private void ButterflowWrapper_ButterflowExited(object sender, ButterflowWrapper.ButterflowExitArgs e)
{
if (Settings.Default.Device >= 0)
if(Settings.Default.Device >= 0)
{
this.comboDeviceList.Dispatcher.Invoke(() => this.comboDeviceList.SelectedIndex = Settings.Default.Device);
}
@ -78,6 +78,6 @@ namespace butterflow_ui
}
}
#endregion
#endregion Methods
}
}
}

View File

@ -30,7 +30,6 @@ using System.Windows;
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
@ -40,7 +39,6 @@ using System.Windows;
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
@ -51,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.5.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -37,7 +37,7 @@ namespace butterflow_ui.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("-1")]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int Device {
get {
return ((int)(this["Device"]));
@ -46,5 +46,17 @@ namespace butterflow_ui.Properties {
this["Device"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool UseDefaultDevice {
get {
return ((bool)(this["UseDefaultDevice"]));
}
set {
this["UseDefaultDevice"] = value;
}
}
}
}

View File

@ -6,7 +6,10 @@
<Value Profile="(Default)">en-US</Value>
</Setting>
<Setting Name="Device" Type="System.Int32" Scope="User">
<Value Profile="(Default)">-1</Value>
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="UseDefaultDevice" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -1,81 +0,0 @@
usage: butterflow [options] [video]
Required arguments:
video Specify the input video
General options:
-h, --help Show this help message and exit
--version Show program's version number and exit
--cache-dir CACHE_DIR
Specify path to the cache directory
-c, --cache Show cache information and exit
--rm-cache Set to clear the cache and exit
-prb, --probe Show media file information and exit
-v, --verbosity Set to increase output verbosity
-q, --quiet Set to suppress console output
Device options:
-d, --show-devices Show detected OpenCL devices and exit
-device DEVICE Specify the preferred OpenCL device to use as an
integer. Device numbers can be listed with the `-d`
option. The device will be chosen automatically if
nothing is specified.
-sw Set to force software rendering
Display options:
-p, --show-preview Set to show video preview
-e, --embed-info Set to embed debugging info into the output video
-tt {light,dark,stroke}, --text-type {light,dark,stroke}
Specify text type for embedded debugging info,
(default: light)
-m, --mark-frames Set to mark interpolated frames
Video options:
-o OUTPUT_PATH, --output-path OUTPUT_PATH
Specify path to the output video
-r PLAYBACK_RATE, --playback-rate PLAYBACK_RATE
Specify the playback rate as an integer or a float.
Fractional forms are acceptable, e.g., 24/1.001 is the
same as 23.976. To use a multiple of the source
video's rate, follow a number with `x`, e.g., "2x"
will double the frame rate. The original rate will be
used by default if nothing is specified.
-s SUBREGIONS, --subregions SUBREGIONS
Specify rendering subregions in the form:
"a=TIME,b=TIME,TARGET=VALUE" where TARGET is either
`spd`, `dur`, `fps`. Valid TIME syntaxes are [hr:m:s],
[m:s], [s], [s.xxx], or `end`, which signifies to the
end the video. You can specify multiple subregions by
separating them with a colon `:`. A special subregion
format that conveniently describes the entire clip is
available in the form: "full,TARGET=VALUE".
-k, --keep-subregions
Set to render subregions that are not explicitly
specified
-vs VIDEO_SCALE, --video-scale VIDEO_SCALE
Specify output video size in the form: "WIDTH:HEIGHT"
or by using a factor. To keep the aspect ratio only
specify one component, either width or height, and set
the other component to -1, (default: 1.0)
-l, --lossless Set to use lossless encoding settings
-sm, --smooth-motion Set to tune for smooth motion. This mode yields
artifact-less frames by emphasizing blended frames
over warping pixels.
Muxing options:
-audio Set to add the source audio to the output video
Advanced options:
--fast-pyr Set to use fast pyramids
--pyr-scale PYR_SCALE
Specify pyramid scale factor, (default: 0.5)
--levels LEVELS Specify number of pyramid layers, (default: 3)
--winsize WINSIZE Specify averaging window size, (default: 25)
--iters ITERS Specify number of iterations at each pyramid level,
(default: 3)
--poly-n {5,7} Specify size of pixel neighborhood, (default: 5)
--poly-s POLY_S Specify standard deviation to smooth derivatives,
(default: 1.1)
-ff {box,gaussian}, --flow-filter {box,gaussian}
Specify which filter to use for optical flow
estimation, (default: box)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More