1
0
Fork 0
mirror of https://github.com/wagesj45/butterflow-ui.git synced 2024-11-14 05:43:33 -06:00

Compare commits

..

No commits in common. "master" and "1.0.2" have entirely different histories.

728 changed files with 1371 additions and 28351 deletions

View file

@ -1,28 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
---
**Desktop (please complete the following information):**
- OS: [e.g. Windows 10]
- butterflow-ui Version [e.g. 1.0.2]
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View file

@ -1,17 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View file

@ -1,77 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
jobs:
analyze:
name: Analyze
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1
- name: Setup MSBuild Path
uses: microsoft/Setup-MSBuild@v1
#- name: Setup NuGet
# uses: NuGet/setup-nuget@v1.0.4
- name: Restore NuGet Packages
run: nuget restore butterflow-ui/butterflow-ui.sln
- name: Build and Publish Web App
run: msbuild /p:UseSharedCompilation=false butterflow-ui/butterflow-ui.sln
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View file

@ -22,18 +22,10 @@ A graphical user interface for butterflow.
Save your favorite configurations and load them for use with other videos. Save your favorite configurations and load them for use with other videos.
* *Batch Processing*
Process multiple files at once using the same settings across all files.
## Contribution ## Contribution
If you'd like to help contribute to the project, please don't be shy! Translation into your local language would always be appreciated. Translations can be generated automatically, but those automatic translations are prone to error. **butterflow-ui** can always be improved, and if there are missing features that you want, please submit a pull request. If you'd like to help contribute to the project, please don't be shy! Translation into your local language would always be appreciated. Translations can be generated automatically, but those automatic translations are prone to error. **butterflow-ui** can always be improved, and if there are missing features that you want, please submit a pull request.
### Butterflow Needs a New Maintainer
[butterflow](https://github.com/dthpham/butterflow) is currently looking for a new primary developer. If you're familiar with Python, C++, and the OpenCV toolkit, consider contributing to the project.
## Download ## Download
**butterflow-ui** is conveniently packaged in a Windows installer file (MSI) built with the [WIX toolset](http://wixtoolset.org). The latest installer can be downloaded [here](https://github.com/wagesj45/butterflow-ui/releases/latest). You can also download [old releases](https://github.com/wagesj45/butterflow-ui/releases) as well. **butterflow-ui** is conveniently packaged in a Windows installer file (MSI) built with the [WIX toolset](http://wixtoolset.org). The latest installer can be downloaded [here](https://github.com/wagesj45/butterflow-ui/releases/latest). You can also download [old releases](https://github.com/wagesj45/butterflow-ui/releases) as well.
@ -41,10 +33,3 @@ If you'd like to help contribute to the project, please don't be shy! Translatio
## Code Documentation ## Code Documentation
**butterflow-ui** is [fully documented](https://wagesj45.github.io/butterflow-ui) via [Sandcastle](https://github.com/EWSoftware/SHFB). You can find generated documents to help you contribute to the project in the [documentation section](https://wagesj45.github.io/butterflow-ui). **butterflow-ui** is [fully documented](https://wagesj45.github.io/butterflow-ui) via [Sandcastle](https://github.com/EWSoftware/SHFB). You can find generated documents to help you contribute to the project in the [documentation section](https://wagesj45.github.io/butterflow-ui).
## Donations
[![Donate with Trans Pay](https://support.jordanwages.com/static/donate-with-transpay-en.png)](https://support.jordanwages.com?project=1)
If you would like to donate to the development of **butterflow-ui**, please direct you donation to my [patron page](https://support.jordanwages.com) (powered by Stripe) or directly via my [PayPal.Me](https://www.paypal.me/wagesj45) page. You can also donate Ethereum [to my wallet](https://etherscan.io/address/0x917f3d67e2a7ec8884d241118ee829af57cc4afd).
![Image](https://t.thebreadsticks.com/matomo.php?idsite=6&rec=1&action_name=README.md)

File diff suppressed because it is too large Load diff

View file

@ -17,10 +17,6 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath> <OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<CompilerAdditionalOptions>
</CompilerAdditionalOptions>
<LinkerAdditionalOptions>
</LinkerAdditionalOptions>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Product.wxs" /> <Compile Include="Product.wxs" />

View file

@ -13,7 +13,7 @@
<RootNamespace>Documentation</RootNamespace> <RootNamespace>Documentation</RootNamespace>
<Name>Documentation</Name> <Name>Documentation</Name>
<!-- SHFB properties --> <!-- SHFB properties -->
<FrameworkVersion>.NET Framework 4.7.2</FrameworkVersion> <FrameworkVersion>.NET Framework 4.7.1</FrameworkVersion>
<OutputPath>docs\</OutputPath> <OutputPath>docs\</OutputPath>
<HtmlHelpName>Documentation</HtmlHelpName> <HtmlHelpName>Documentation</HtmlHelpName>
<Language>en-US</Language> <Language>en-US</Language>
@ -37,25 +37,6 @@
</NamespaceSummaries> </NamespaceSummaries>
<VisibleItems>Attributes, ExplicitInterfaceImplementations, InheritedMembers, Internals, Privates, PrivateFields, Protected, SealedProtected, ProtectedInternalAsProtected, PublicCompilerGenerated, NonBrowsable</VisibleItems> <VisibleItems>Attributes, ExplicitInterfaceImplementations, InheritedMembers, Internals, Privates, PrivateFields, Protected, SealedProtected, ProtectedInternalAsProtected, PublicCompilerGenerated, NonBrowsable</VisibleItems>
<WarnOnMissingSourceContext>False</WarnOnMissingSourceContext> <WarnOnMissingSourceContext>False</WarnOnMissingSourceContext>
<HtmlSdkLinkType>Msdn</HtmlSdkLinkType>
<BinaryTOC>True</BinaryTOC>
<IncludeFavorites>False</IncludeFavorites>
<WebsiteSdkLinkType>Msdn</WebsiteSdkLinkType>
<WebsiteAdContent>&amp;lt%3bscript type=&amp;quot%3btext/javascript&amp;quot%3b&amp;gt%3b
var _paq = window._paq = window._paq || []%3b
/%2a tracker methods like &amp;quot%3bsetCustomDimension&amp;quot%3b should be called before &amp;quot%3btrackPageView&amp;quot%3b %2a/
_paq.push%28[&amp;#39%3btrackPageView&amp;#39%3b]%29%3b
_paq.push%28[&amp;#39%3benableLinkTracking&amp;#39%3b]%29%3b
%28function%28%29 {
var u=&amp;quot%3b//t.thebreadsticks.com/&amp;quot%3b%3b
_paq.push%28[&amp;#39%3bsetTrackerUrl&amp;#39%3b, u+&amp;#39%3bjs/&amp;#39%3b]%29%3b
_paq.push%28[&amp;#39%3bsetSiteId&amp;#39%3b, &amp;#39%3b6&amp;#39%3b]%29%3b
var d=document, g=d.createElement%28&amp;#39%3bscript&amp;#39%3b%29, s=d.getElementsByTagName%28&amp;#39%3bscript&amp;#39%3b%29[0]%3b
g.type=&amp;#39%3btext/javascript&amp;#39%3b%3b g.async=true%3b g.src=u+&amp;#39%3bjs/&amp;#39%3b%3b s.parentNode.insertBefore%28g,s%29%3b
}%29%28%29%3b
&amp;lt%3b/script&amp;gt%3b</WebsiteAdContent>
<AppendMarkdownFileExtensionsToUrls>False</AppendMarkdownFileExtensionsToUrls>
<SaveComponentCacheCapacity>100</SaveComponentCacheCapacity>
</PropertyGroup> </PropertyGroup>
<!-- There are no properties for these groups. AnyCPU needs to appear in order for Visual Studio to perform <!-- There are no properties for these groups. AnyCPU needs to appear in order for Visual Studio to perform
the build. The others are optional common platform types that may appear. --> the build. The others are optional common platform types that may appear. -->

View file

@ -17,7 +17,7 @@
</StackPanel> </StackPanel>
<WrapPanel HorizontalAlignment="Center"> <WrapPanel HorizontalAlignment="Center">
<TextBlock Text="{x:Static loc:Localization.VersionLabel}" /> <TextBlock Text="{x:Static loc:Localization.VersionLabel}" />
<TextBlock Text=" - " /> <TextBlock Text=" - "/>
<TextBlock Name="txtVersion" Text="0.0.0.0" /> <TextBlock Name="txtVersion" Text="0.0.0.0" />
</WrapPanel> </WrapPanel>
<TextBlock Text="{x:Static loc:Localization.AboutWindowDescription}" TextAlignment="Center" /> <TextBlock Text="{x:Static loc:Localization.AboutWindowDescription}" TextAlignment="Center" />
@ -35,8 +35,6 @@
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"> <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="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> </TextBlock>
</StackPanel> </StackPanel>
<Label Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="{x:Static loc:Localization.OpenSourceCreditsLabel}" /> <Label Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="{x:Static loc:Localization.OpenSourceCreditsLabel}" />
@ -56,16 +54,10 @@
| <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" 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> | <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> </TextBlock>
<TextBlock HorizontalAlignment="Center">
Octokit
| <Hyperlink NavigateUri="https://github.com/octokit/octokit.net" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowGithubLinkLabel}" /></Hyperlink>
| <Hyperlink NavigateUri="https://github.com/octokit/octokit.net/blob/master/LICENSE.txt" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowLicenseLinkLabel}" /></Hyperlink>
</TextBlock>
</StackPanel> </StackPanel>
</Grid> </Grid>
<Separator Margin="0,10" /> <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> </StackPanel>
</DockPanel> </DockPanel>
</Window> </Window>

View file

@ -13,12 +13,6 @@
<setting name="Language" serializeAs="String"> <setting name="Language" serializeAs="String">
<value>en-US</value> <value>en-US</value>
</setting> </setting>
<setting name="Device" serializeAs="String">
<value>0</value>
</setting>
<setting name="UseDefaultDevice" serializeAs="String">
<value>True</value>
</setting>
</butterflow_ui.Properties.Settings> </butterflow_ui.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>

View file

@ -9,21 +9,9 @@ using System.Windows.Data;
namespace butterflow_ui namespace butterflow_ui
{ {
/// <summary> A visibility converter. </summary>
[ValueConversion(typeof(bool), typeof(Visibility))] [ValueConversion(typeof(bool), typeof(Visibility))]
public class BoolVisibilityConverter : IValueConverter public class BoolVisibilityConverter : IValueConverter
{ {
/// <summary> Converts a value. </summary>
/// <exception cref="InvalidCastException"> Thrown when an object cannot be cast to a required
/// type. </exception>
/// <param name="value"> The value produced by the binding source. </param>
/// <param name="targetType"> The type of the binding target property. </param>
/// <param name="parameter"> The converter parameter to use. </param>
/// <param name="culture"> The culture to use in the converter. </param>
/// <returns>
/// A converted value. If the method returns <see langword="null" />, the valid null value is
/// used.
/// </returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (targetType == typeof(Visibility)) if (targetType == typeof(Visibility))
@ -34,17 +22,6 @@ namespace butterflow_ui
throw new InvalidCastException(string.Format("Cannot convert type to {0} from bool.", targetType.Name)); throw new InvalidCastException(string.Format("Cannot convert type to {0} from bool.", targetType.Name));
} }
/// <summary> Converts a value. </summary>
/// <exception cref="InvalidCastException"> Thrown when an object cannot be cast to a required
/// type. </exception>
/// <param name="value"> The value that is produced by the binding target. </param>
/// <param name="targetType"> The type to convert to. </param>
/// <param name="parameter"> The converter parameter to use. </param>
/// <param name="culture"> The culture to use in the converter. </param>
/// <returns>
/// A converted value. If the method returns <see langword="null" />, the valid null value is
/// used.
/// </returns>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (targetType == typeof(Visibility)) if (targetType == typeof(Visibility))

View file

@ -24,8 +24,6 @@ namespace butterflow_ui
private const string REGEX_PROGRESS = @"To write\:\s*\w*\s*\w*\,*\w*\s*(?<Progress>\d+\.*\d*)%"; private const string REGEX_PROGRESS = @"To write\:\s*\w*\s*\w*\,*\w*\s*(?<Progress>\d+\.*\d*)%";
/// <summary> An alternative RegEx string for detecting progress made when rendering a video. </summary> /// <summary> An alternative RegEx string for detecting progress made when rendering a video. </summary>
private const string REGEX_PROGRESS_ALT = @"\<Rendering progress\:\s*(?<Progress>\d+\.*\d*)%\>"; private const string REGEX_PROGRESS_ALT = @"\<Rendering progress\:\s*(?<Progress>\d+\.*\d*)%\>";
/// <summary> The RegEx string for determining available processing devices in butterflow.. </summary>
private const string REGEX_DEVICE = @"\*\s*Device\s*(?<DeviceID>\d+)\s*\:\s*(?<DeviceName>(\w*\s*)*)";
/// <summary> Full pathname of the butterflow executable file. </summary> /// <summary> Full pathname of the butterflow executable file. </summary>
private Lazy<string> executablePath = new Lazy<string>(() => Path.Combine(Directory.GetCurrentDirectory(), "ThirdPartyCompiled", "butterflow.exe")); private Lazy<string> executablePath = new Lazy<string>(() => Path.Combine(Directory.GetCurrentDirectory(), "ThirdPartyCompiled", "butterflow.exe"));
@ -43,8 +41,6 @@ namespace butterflow_ui
private InputInterpreter interpreter = new InputInterpreter(); private InputInterpreter interpreter = new InputInterpreter();
/// <summary> Event queue for all listeners interested in ParsedConsoleOutputRecieved events. </summary> /// <summary> Event queue for all listeners interested in ParsedConsoleOutputRecieved events. </summary>
public event EventHandler<ButterflowOutputArgs> ParsedConsoleOutputRecieved; public event EventHandler<ButterflowOutputArgs> ParsedConsoleOutputRecieved;
/// <summary> Event queue for all listeners interested in ButterflowExited events. </summary>
public event EventHandler<ButterflowExitArgs> ButterflowExited;
#endregion #endregion
@ -95,10 +91,6 @@ namespace butterflow_ui
} }
} }
/// <summary> Gets or sets the list of devices available for butterflow processing. </summary>
/// <value> The devices available for butterflow processing. </value>
public Dictionary<int, string> Devices { get; private set; } = new Dictionary<int, string>() { { 0, Localization.Localization.ForceCPU } };
#endregion #endregion
#region Methods #region Methods
@ -107,7 +99,7 @@ namespace butterflow_ui
/// <param name="optionsConfiguration"> The options configuration. </param> /// <param name="optionsConfiguration"> The options configuration. </param>
public void Run(OptionsConfiguration optionsConfiguration) public void Run(OptionsConfiguration optionsConfiguration)
{ {
for (int i = 0; i < optionsConfiguration.VideoInput.Count(); i++) for(int i = 0; i < optionsConfiguration.VideoInput.Count(); i++)
{ {
var arguments = optionsConfiguration.ToButterflowArguments(i); var arguments = optionsConfiguration.ToButterflowArguments(i);
this.runQueue.Enqueue(arguments); this.runQueue.Enqueue(arguments);
@ -147,7 +139,7 @@ namespace butterflow_ui
/// <summary> Kills the running instance of butterflow, cancelling its current operation. </summary> /// <summary> Kills the running instance of butterflow, cancelling its current operation. </summary>
public void Cancel() public void Cancel()
{ {
if (this.IsRunning && this.runningProcess != null) if(this.IsRunning && this.runningProcess != null)
{ {
this.runningProcess.Kill(); this.runningProcess.Kill();
} }
@ -163,13 +155,6 @@ namespace butterflow_ui
Run(arguments); Run(arguments);
} }
/// <summary> Gets the devices available for butterflow processing. </summary>
public void GetDevices()
{
string arguments = "--show-devices";
Run(arguments);
}
/// <summary> Runs butterflow with the given <paramref name="arguments"/> by adding it to the queue. </summary> /// <summary> Runs butterflow with the given <paramref name="arguments"/> by adding it to the queue. </summary>
/// <param name="arguments"> Options for controlling the operation. </param> /// <param name="arguments"> Options for controlling the operation. </param>
private void Run(string arguments) private void Run(string arguments)
@ -187,8 +172,6 @@ namespace butterflow_ui
this.IsRunning = false; this.IsRunning = false;
this.runningProcess = null; this.runningProcess = null;
OnButterflowExited();
ProcessQueue(); ProcessQueue();
} }
@ -218,7 +201,7 @@ namespace butterflow_ui
// Test for playback rate // Test for playback rate
regex = new Regex(REGEX_RATE); regex = new Regex(REGEX_RATE);
foreach (Match match in regex.Matches(consoleOutput)) foreach(Match match in regex.Matches(consoleOutput))
{ {
var rate = match.Groups["Rate"].Value; var rate = match.Groups["Rate"].Value;
@ -227,7 +210,7 @@ namespace butterflow_ui
// Test for progress being made when rendering a video // Test for progress being made when rendering a video
regex = new Regex(REGEX_PROGRESS); regex = new Regex(REGEX_PROGRESS);
foreach (Match match in regex.Matches(consoleOutput)) foreach(Match match in regex.Matches(consoleOutput))
{ {
var progress = match.Groups["Progress"].Value; var progress = match.Groups["Progress"].Value;
@ -237,7 +220,6 @@ namespace butterflow_ui
OnParsedConsoleOutputRecieved(ButterflowOutputType.Progress, progress, consoleOutput); OnParsedConsoleOutputRecieved(ButterflowOutputType.Progress, progress, consoleOutput);
} }
// An alternate test for progression on a rendering video
regex = new Regex(REGEX_PROGRESS_ALT); regex = new Regex(REGEX_PROGRESS_ALT);
foreach (Match match in regex.Matches(consoleOutput)) foreach (Match match in regex.Matches(consoleOutput))
{ {
@ -248,25 +230,6 @@ namespace butterflow_ui
OnParsedConsoleOutputRecieved(ButterflowOutputType.Progress, progress, consoleOutput); OnParsedConsoleOutputRecieved(ButterflowOutputType.Progress, progress, consoleOutput);
} }
// Test for device declaration
regex = new Regex(REGEX_DEVICE);
foreach (Match match in regex.Matches(consoleOutput))
{
var deviceID = match.Groups["DeviceID"].Value;
var deviceName = match.Groups["DeviceName"].Value.Trim();
//Add 1 to the index count. This accounts for the 0 index of the "Force CPU" option in the options window.
this.interpreter.Interpret(string.Concat(deviceID,"+1"));
if (!this.Devices.ContainsKey(this.interpreter.Int))
{
this.Devices.Add(this.interpreter.Int, deviceName);
OnPropertyChanged("Devices");
}
OnParsedConsoleOutputRecieved(ButterflowOutputType.Device, deviceName, consoleOutput);
}
} }
/// <summary> Executes the parsed console output recieved action. </summary> /// <summary> Executes the parsed console output recieved action. </summary>
@ -275,13 +238,10 @@ namespace butterflow_ui
/// <param name="consoleOutput"> The console output from butterflow. </param> /// <param name="consoleOutput"> The console output from butterflow. </param>
private void OnParsedConsoleOutputRecieved(ButterflowOutputType outputType, string value, string consoleOutput) private void OnParsedConsoleOutputRecieved(ButterflowOutputType outputType, string value, string consoleOutput)
{ {
this.ParsedConsoleOutputRecieved?.Invoke(this, new ButterflowOutputArgs(outputType, value, consoleOutput)); if (this.ParsedConsoleOutputRecieved != null)
}
/// <summary> Executes the butterflow exited action. </summary>
private void OnButterflowExited()
{ {
this.ButterflowExited?.Invoke(this, new ButterflowExitArgs()); this.ParsedConsoleOutputRecieved(this, new ButterflowOutputArgs(outputType, value, consoleOutput));
}
} }
/// <summary> Event handler. Called by Process for output data received events. </summary> /// <summary> Event handler. Called by Process for output data received events. </summary>
@ -348,19 +308,6 @@ namespace butterflow_ui
#endregion #endregion
} }
/// <summary> Arguments for butterflow exiting. </summary>
public class ButterflowExitArgs : EventArgs
{
#region Constructors
public ButterflowExitArgs()
{
//
}
#endregion
}
/// <summary> Values that represent butterflow output types. </summary> /// <summary> Values that represent butterflow output types. </summary>
public enum ButterflowOutputType public enum ButterflowOutputType
{ {
@ -371,9 +318,7 @@ namespace butterflow_ui
/// <summary> Video playback rate. </summary> /// <summary> Video playback rate. </summary>
Rate, Rate,
/// <summary> Video processing progress. </summary> /// <summary> Video processing progress. </summary>
Progress, Progress
/// <summary> An available processing device. </summary>
Device
} }
#endregion #endregion

View file

@ -9,21 +9,9 @@ using System.Windows.Data;
namespace butterflow_ui namespace butterflow_ui
{ {
/// <summary> An inverse bool visibility converter. </summary>
[ValueConversion(typeof(bool), typeof(Visibility))] [ValueConversion(typeof(bool), typeof(Visibility))]
public class InverseBoolVisibilityConverter : IValueConverter public class InverseBoolVisibilityConverter : IValueConverter
{ {
/// <summary> Converts a value. </summary>
/// <exception cref="InvalidCastException"> Thrown when an object cannot be cast to a required
/// type. </exception>
/// <param name="value"> The value produced by the binding source. </param>
/// <param name="targetType"> The type of the binding target property. </param>
/// <param name="parameter"> The converter parameter to use. </param>
/// <param name="culture"> The culture to use in the converter. </param>
/// <returns>
/// A converted value. If the method returns <see langword="null" />, the valid null value is
/// used.
/// </returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (targetType == typeof(Visibility)) if (targetType == typeof(Visibility))
@ -34,17 +22,6 @@ namespace butterflow_ui
throw new InvalidCastException(string.Format("Cannot convert type to {0} from bool.", targetType.Name)); throw new InvalidCastException(string.Format("Cannot convert type to {0} from bool.", targetType.Name));
} }
/// <summary> Converts a value. </summary>
/// <exception cref="InvalidCastException"> Thrown when an object cannot be cast to a required
/// type. </exception>
/// <param name="value"> The value that is produced by the binding target. </param>
/// <param name="targetType"> The type to convert to. </param>
/// <param name="parameter"> The converter parameter to use. </param>
/// <param name="culture"> The culture to use in the converter. </param>
/// <returns>
/// A converted value. If the method returns <see langword="null" />, the valid null value is
/// used.
/// </returns>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (targetType == typeof(Visibility)) if (targetType == typeof(Visibility))

View file

@ -195,24 +195,6 @@ namespace butterflow_ui.Localization {
} }
} }
/// <summary>
/// Looks up a localized string similar to Would you like to visit butterflow-ui on github to update to the latest version?.
/// </summary>
public static string BehindVersionQuestion {
get {
return ResourceManager.GetString("BehindVersionQuestion", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The current version is behind the github repository and should be updated..
/// </summary>
public static string BehindVersionStatusDescription {
get {
return ResourceManager.GetString("BehindVersionStatusDescription", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to ButterflowUI Configuration File. /// Looks up a localized string similar to ButterflowUI Configuration File.
/// </summary> /// </summary>
@ -267,15 +249,6 @@ namespace butterflow_ui.Localization {
} }
} }
/// <summary>
/// Looks up a localized string similar to The current version is up to date with the github repository..
/// </summary>
public static string CurrentVersionStatusDescription {
get {
return ResourceManager.GetString("CurrentVersionStatusDescription", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Custom Rate. /// Looks up a localized string similar to Custom Rate.
/// </summary> /// </summary>
@ -285,15 +258,6 @@ namespace butterflow_ui.Localization {
} }
} }
/// <summary>
/// Looks up a localized string similar to The current version is ahead of the github repository, or is a custom version of butterflow-ui that cannot be compared to the github repository..
/// </summary>
public static string CustomVersionStatusDescription {
get {
return ResourceManager.GetString("CustomVersionStatusDescription", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Developers and Contributors. /// Looks up a localized string similar to Developers and Contributors.
/// </summary> /// </summary>
@ -303,24 +267,6 @@ namespace butterflow_ui.Localization {
} }
} }
/// <summary>
/// Looks up a localized string similar to Computing Device.
/// </summary>
public static string DeviceLabel {
get {
return ResourceManager.GetString("DeviceLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to donate.
/// </summary>
public static string DonateLabel {
get {
return ResourceManager.GetString("DonateLabel", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to _Edit. /// Looks up a localized string similar to _Edit.
/// </summary> /// </summary>
@ -411,15 +357,6 @@ namespace butterflow_ui.Localization {
} }
} }
/// <summary>
/// Looks up a localized string similar to Force CPU.
/// </summary>
public static string ForceCPU {
get {
return ResourceManager.GetString("ForceCPU", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Height. /// Looks up a localized string similar to Height.
/// </summary> /// </summary>
@ -852,33 +789,6 @@ namespace butterflow_ui.Localization {
} }
} }
/// <summary>
/// Looks up a localized string similar to Github failed to respond with the current version. This could be because of rate limits or a network failure..
/// </summary>
public static string UnknownVersionStatusDescription {
get {
return ResourceManager.GetString("UnknownVersionStatusDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A newer version of butterflow-ui is available..
/// </summary>
public static string UpdateAvailableLabel {
get {
return ResourceManager.GetString("UpdateAvailableLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Use Default Compute Device.
/// </summary>
public static string UseDefaultDeviceLabel {
get {
return ResourceManager.GetString("UseDefaultDeviceLabel", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Version. /// Looks up a localized string similar to Version.
/// </summary> /// </summary>

View file

@ -372,28 +372,4 @@
<data name="SupportedFileTypesLabel" xml:space="preserve"> <data name="SupportedFileTypesLabel" xml:space="preserve">
<value>أنواع الملفات المدعومة</value> <value>أنواع الملفات المدعومة</value>
</data> </data>
<data name="BehindVersionStatusDescription" xml:space="preserve">
<value>الإصدار الحالي هو وراء مستودع جيثب ويجب تحديثه.</value>
</data>
<data name="CurrentVersionStatusDescription" xml:space="preserve">
<value>الإصدار الحالي محدث مع مستودع جيثب.</value>
</data>
<data name="CustomVersionStatusDescription" xml:space="preserve">
<value>الإصدار الحالي هو قبل مستودع github ، أو هو نسخة مخصصة من butterflow -ii لا يمكن مقارنتها بمستودع جيثب.</value>
</data>
<data name="UnknownVersionStatusDescription" xml:space="preserve">
<value>فشل Github للرد مع الإصدار الحالي. قد يكون ذلك بسبب حدود المعدل أو فشل الشبكة.</value>
</data>
<data name="BehindVersionQuestion" xml:space="preserve">
<value>هل ترغب في زيارة butterflow -i على جيثب للتحديث إلى أحدث إصدار؟</value>
</data>
<data name="UpdateAvailableLabel" xml:space="preserve">
<value>يتوفر إصدار أحدث من butterflow-ui.</value>
</data>
<data name="DeviceLabel" xml:space="preserve">
<value>جهاز الحوسبة</value>
</data>
<data name="ForceCPU" xml:space="preserve">
<value>قوة وحدة المعالجة المركزية</value>
</data>
</root> </root>

View file

@ -187,7 +187,7 @@
<value>Resolución de salida</value> <value>Resolución de salida</value>
</data> </data>
<data name="SkipBackTooltip" xml:space="preserve"> <data name="SkipBackTooltip" xml:space="preserve">
<value>Salta hacia atrás en el video.</value> <value>Salte hacia atrás en el video.</value>
</data> </data>
<data name="SkipForwardTooltip" xml:space="preserve"> <data name="SkipForwardTooltip" xml:space="preserve">
<value>Salta hacia adelante en el video.</value> <value>Salta hacia adelante en el video.</value>
@ -286,7 +286,7 @@
<value>Proceso</value> <value>Proceso</value>
</data> </data>
<data name="ProcessTooltip" xml:space="preserve"> <data name="ProcessTooltip" xml:space="preserve">
<value>Procesar el video. Esto puede resultar en un proceso largo.</value> <value>Procesar el video Este puede ser un proceso largo.</value>
</data> </data>
<data name="PyramidScaleLabel" xml:space="preserve"> <data name="PyramidScaleLabel" xml:space="preserve">
<value>Factor de escala de pirámide</value> <value>Factor de escala de pirámide</value>
@ -325,7 +325,7 @@
<value>github</value> <value>github</value>
</data> </data>
<data name="AboutWindowLicenseLinkLabel" xml:space="preserve"> <data name="AboutWindowLicenseLinkLabel" xml:space="preserve">
<value>Licencia</value> <value>licencia</value>
</data> </data>
<data name="AboutWindowTitle" xml:space="preserve"> <data name="AboutWindowTitle" xml:space="preserve">
<value>Acerca de butterflow-ui</value> <value>Acerca de butterflow-ui</value>
@ -349,13 +349,13 @@
<value>Opciones de aplicación ...</value> <value>Opciones de aplicación ...</value>
</data> </data>
<data name="OptionsWindowLanguageChangeNotice" xml:space="preserve"> <data name="OptionsWindowLanguageChangeNotice" xml:space="preserve">
<value>Nota: Cambiar el idioma del usuario requerirá reiniciar el programa.</value> <value>Nota: Cambiar el idioma del usuario requerirá un reinicio del programa.</value>
</data> </data>
<data name="OptionsWindowTitle" xml:space="preserve"> <data name="OptionsWindowTitle" xml:space="preserve">
<value>Opciones</value> <value>Opciones</value>
</data> </data>
<data name="SaveLabel" xml:space="preserve"> <data name="SaveLabel" xml:space="preserve">
<value>Guardar</value> <value>Salvar</value>
</data> </data>
<data name="VersionLabel" xml:space="preserve"> <data name="VersionLabel" xml:space="preserve">
<value>Versión</value> <value>Versión</value>
@ -372,28 +372,4 @@
<data name="SupportedFileTypesLabel" xml:space="preserve"> <data name="SupportedFileTypesLabel" xml:space="preserve">
<value>Tipos de archivos admitidos</value> <value>Tipos de archivos admitidos</value>
</data> </data>
<data name="BehindVersionStatusDescription" xml:space="preserve">
<value>La versión actual está desactualizada respecto del repositorio de Github y debe actualizarse.</value>
</data>
<data name="CurrentVersionStatusDescription" xml:space="preserve">
<value>La versión actual está actualizada con el repositorio github.</value>
</data>
<data name="CustomVersionStatusDescription" xml:space="preserve">
<value>La versión actual está por delante del repositorio github, o es una versión personalizada de butterflow-ui que no se puede comparar con el repositorio github.</value>
</data>
<data name="UnknownVersionStatusDescription" xml:space="preserve">
<value>Github no respondió con la versión actual. Esto podría deberse a límites de velocidad o a una falla de la red.</value>
</data>
<data name="BehindVersionQuestion" xml:space="preserve">
<value>¿Le gustaría visitar butterflow-ui en github para actualizar a la última versión?</value>
</data>
<data name="UpdateAvailableLabel" xml:space="preserve">
<value>Una versión más reciente de butterflow-ui está disponible.</value>
</data>
<data name="DeviceLabel" xml:space="preserve">
<value>Dispositivo de computación</value>
</data>
<data name="ForceCPU" xml:space="preserve">
<value>Unidad de procesamiento central de fuerza</value>
</data>
</root> </root>

View file

@ -372,28 +372,4 @@
<data name="SupportedFileTypesLabel" xml:space="preserve"> <data name="SupportedFileTypesLabel" xml:space="preserve">
<value>サポートされているファイルの種類</value> <value>サポートされているファイルの種類</value>
</data> </data>
<data name="BehindVersionStatusDescription" xml:space="preserve">
<value>現在のバージョンはgithubリポジトリの後ろにあり、更新する必要があります。</value>
</data>
<data name="CurrentVersionStatusDescription" xml:space="preserve">
<value>現在のバージョンはgithubリポジトリで最新のものです。</value>
</data>
<data name="CustomVersionStatusDescription" xml:space="preserve">
<value>現在のバージョンはgithubリポジトリより先にあるか、githubリポジトリと比較できないカスタムバージョンのbutterflow-uiです。</value>
</data>
<data name="UnknownVersionStatusDescription" xml:space="preserve">
<value>Githubは現在のバージョンでは応答できませんでした。これは、レート制限またはネットワーク障害が原因である可能性があります。</value>
</data>
<data name="BehindVersionQuestion" xml:space="preserve">
<value>最新版に更新するgithubでbutterflow-uiにアクセスしますか</value>
</data>
<data name="UpdateAvailableLabel" xml:space="preserve">
<value>新しいバージョンのbutterflow-uiが利用可能です。</value>
</data>
<data name="DeviceLabel" xml:space="preserve">
<value>コンピューティングデバイス</value>
</data>
<data name="ForceCPU" xml:space="preserve">
<value>中央処理装置を強制する</value>
</data>
</root> </root>

View file

@ -372,34 +372,4 @@
<data name="SupportedFileTypesLabel" xml:space="preserve"> <data name="SupportedFileTypesLabel" xml:space="preserve">
<value>Supported File Types</value> <value>Supported File Types</value>
</data> </data>
<data name="BehindVersionStatusDescription" xml:space="preserve">
<value>The current version is behind the github repository and should be updated.</value>
</data>
<data name="CurrentVersionStatusDescription" xml:space="preserve">
<value>The current version is up to date with the github repository.</value>
</data>
<data name="CustomVersionStatusDescription" xml:space="preserve">
<value>The current version is ahead of the github repository, or is a custom version of butterflow-ui that cannot be compared to the github repository.</value>
</data>
<data name="UnknownVersionStatusDescription" xml:space="preserve">
<value>Github failed to respond with the current version. This could be because of rate limits or a network failure.</value>
</data>
<data name="BehindVersionQuestion" xml:space="preserve">
<value>Would you like to visit butterflow-ui on github to update to the latest version?</value>
</data>
<data name="UpdateAvailableLabel" xml:space="preserve">
<value>A newer version of butterflow-ui is available.</value>
</data>
<data name="DeviceLabel" xml:space="preserve">
<value>Computing Device</value>
</data>
<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> </root>

View file

@ -372,28 +372,4 @@
<data name="SupportedFileTypesLabel" xml:space="preserve"> <data name="SupportedFileTypesLabel" xml:space="preserve">
<value>Поддерживаемые типы файлов</value> <value>Поддерживаемые типы файлов</value>
</data> </data>
<data name="BehindVersionStatusDescription" xml:space="preserve">
<value>Текущая версия находится за репозиторием github и должна быть обновлена.</value>
</data>
<data name="CurrentVersionStatusDescription" xml:space="preserve">
<value>Текущая версия обновлена с помощью репозитория github.</value>
</data>
<data name="CustomVersionStatusDescription" xml:space="preserve">
<value>Текущая версия опережает репозиторий github или представляет собой пользовательскую версию butterflow-ui, которую нельзя сравнить с репозиторием github.</value>
</data>
<data name="UnknownVersionStatusDescription" xml:space="preserve">
<value>Github не смог ответить текущей версией. Это может быть связано с ограничениями скорости или сбоем сети.</value>
</data>
<data name="BehindVersionQuestion" xml:space="preserve">
<value>Вы хотите посетить butterflow-ui на github для обновления до последней версии?</value>
</data>
<data name="UpdateAvailableLabel" xml:space="preserve">
<value>Доступна более новая версия butterflow-ui.</value>
</data>
<data name="DeviceLabel" xml:space="preserve">
<value>Вычислительное устройство</value>
</data>
<data name="ForceCPU" xml:space="preserve">
<value>Force CPU</value>
</data>
</root> </root>

View file

@ -372,28 +372,4 @@
<data name="SupportedFileTypesLabel" xml:space="preserve"> <data name="SupportedFileTypesLabel" xml:space="preserve">
<value>支持的文件类型</value> <value>支持的文件类型</value>
</data> </data>
<data name="BehindVersionStatusDescription" xml:space="preserve">
<value>当前版本位于github存储库后面应该更新。</value>
</data>
<data name="CurrentVersionStatusDescription" xml:space="preserve">
<value>当前版本是github存储库的最新版本。</value>
</data>
<data name="CustomVersionStatusDescription" xml:space="preserve">
<value>当前版本领先于github存储库或者是butterflow-ui的自定义版本无法与github存储库进行比较。</value>
</data>
<data name="UnknownVersionStatusDescription" xml:space="preserve">
<value>Github未对当前版本做出回应。这可能是因为速率限制或网络故障。</value>
</data>
<data name="BehindVersionQuestion" xml:space="preserve">
<value>你是否想在github上访问butterflow-ui更新到最新版本</value>
</data>
<data name="UpdateAvailableLabel" xml:space="preserve">
<value>有更新版本的butterflow-ui可供选择。</value>
</data>
<data name="DeviceLabel" xml:space="preserve">
<value>计算设备</value>
</data>
<data name="ForceCPU" xml:space="preserve">
<value>部队中央处理股</value>
</data>
</root> </root>

View file

@ -15,13 +15,13 @@
<ObjectDataProvider x:Key="enumRegionTypeDataProvider" MethodName="GetValues" <ObjectDataProvider x:Key="enumRegionTypeDataProvider" MethodName="GetValues"
ObjectType="{x:Type System:Enum}"> ObjectType="{x:Type System:Enum}">
<ObjectDataProvider.MethodParameters> <ObjectDataProvider.MethodParameters>
<x:Type TypeName="butterflow_ui:RegionType" /> <x:Type TypeName="butterflow_ui:RegionType"/>
</ObjectDataProvider.MethodParameters> </ObjectDataProvider.MethodParameters>
</ObjectDataProvider> </ObjectDataProvider>
<ObjectDataProvider x:Key="enumFlowFilterTypeDataProvider" MethodName="GetValues" <ObjectDataProvider x:Key="enumFlowFilterTypeDataProvider" MethodName="GetValues"
ObjectType="{x:Type System:Enum}"> ObjectType="{x:Type System:Enum}">
<ObjectDataProvider.MethodParameters> <ObjectDataProvider.MethodParameters>
<x:Type TypeName="butterflow_ui:FlowFilterType" /> <x:Type TypeName="butterflow_ui:FlowFilterType"/>
</ObjectDataProvider.MethodParameters> </ObjectDataProvider.MethodParameters>
</ObjectDataProvider> </ObjectDataProvider>
<butterflow_ui:InverseBoolConverter x:Key="InverseBoolConverter" /> <butterflow_ui:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -56,7 +56,7 @@
</MenuItem> </MenuItem>
</MenuItem> </MenuItem>
<MenuItem Header="{x:Static loc:Localization.HelpMenu}"> <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> <MenuItem.Icon>
<ContentControl Template="{StaticResource LinkIcon}" /> <ContentControl Template="{StaticResource LinkIcon}" />
</MenuItem.Icon> </MenuItem.Icon>
@ -83,7 +83,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*" /> <ColumnDefinition Width="0.5*" />
<ColumnDefinition Width="0.5*" /> <ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
@ -95,8 +95,8 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="{x:Static loc:Localization.FileLabel}" /> <Label Grid.Column="0" Content="{x:Static loc:Localization.FileLabel}"/>
<TextBox Name="txtFileName" Grid.Column="1" IsReadOnly="True" /> <TextBox Name="txtFileName" Grid.Column="1" IsReadOnly="True"/>
<Button Grid.Column="2" MinWidth="25" Name="btnFilePicker" Click="btnFilePicker_Click">...</Button> <Button Grid.Column="2" MinWidth="25" Name="btnFilePicker" Click="btnFilePicker_Click">...</Button>
</Grid> </Grid>
</GroupBox> </GroupBox>
@ -107,8 +107,8 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="{x:Static loc:Localization.FileLabel}" /> <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}" /> <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> <Button Grid.Column="2" MinWidth="25" Name="btnFileOutputPicker" Click="btnFileOutputPicker_Click">...</Button>
</Grid> </Grid>
</GroupBox> </GroupBox>
@ -134,7 +134,7 @@
<GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Header="{x:Static loc:Localization.CommonOptionsGroupBox}"> <GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Header="{x:Static loc:Localization.CommonOptionsGroupBox}">
<ScrollViewer> <ScrollViewer>
<StackPanel> <StackPanel>
<butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.PlaybackRateLabel}"> <butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.PlaybackRateLabel}" >
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<butterflow_ui:ButterflowOption LabelValue=""> <butterflow_ui:ButterflowOption LabelValue="">
<RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._2xLabel}" Tag="2x" /> <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" /> <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._4xLabel}" Tag="4x" />
</butterflow_ui:ButterflowOption> </butterflow_ui:ButterflowOption>
<butterflow_ui:ButterflowOption LabelValue=""> <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>
<butterflow_ui:ButterflowOption LabelValue=""> <butterflow_ui:ButterflowOption LabelValue="">
<RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._30fpsLabel}" Tag="30" /> <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._30fpsLabel}" Tag="30" />
@ -203,6 +203,7 @@
</ToggleButton.Style> </ToggleButton.Style>
</ToggleButton> </ToggleButton>
<Button BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="bntVideoStop_Click"> <Button BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="bntVideoStop_Click">
</Button> </Button>
<butterflow_ui:ButterflowOption Grid.Column="2" LabelValue="{x:Static loc:Localization.HeightLabel}"> <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}"> <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}">
@ -232,10 +233,10 @@
<DataTemplate> <DataTemplate>
<DockPanel MaxHeight="24"> <DockPanel MaxHeight="24">
<TextBlock VerticalAlignment="Center" Text="{x:Static loc:Localization.StartLabel}" /> <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="{x:Static loc:Localization.EndLabel}" />
<TextBlock VerticalAlignment="Center" Text="{Binding End, Converter={x:Static gu:TimeSpanToStringConverter.Default}}" ToolTip="{Binding End}" /> <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}" /> <ComboBox VerticalAlignment="Center" ItemsSource="{Binding Source={StaticResource enumRegionTypeDataProvider}}" SelectedItem="{Binding SubregionType, Mode=TwoWay}"/>
<TextBox VerticalAlignment="Center" MinWidth="35" Text="{Binding Value, Mode=TwoWay}" /> <TextBox VerticalAlignment="Center" MinWidth="35" Text="{Binding Value, Mode=TwoWay}" />
<TextBlock VerticalAlignment="Center" Text="{x:Static loc:Localization.ToEndLabel}" /> <TextBlock VerticalAlignment="Center" Text="{x:Static loc:Localization.ToEndLabel}" />
<CheckBox VerticalAlignment="Center" IsChecked="{Binding ToEnd, Mode=TwoWay}" /> <CheckBox VerticalAlignment="Center" IsChecked="{Binding ToEnd, Mode=TwoWay}" />
@ -275,7 +276,7 @@
<TextBox Text="{Binding OptionsConfiguration.SmoothDerivativeStandardDeviation, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=LostFocus}" /> <TextBox Text="{Binding OptionsConfiguration.SmoothDerivativeStandardDeviation, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=LostFocus}" />
</butterflow_ui:ButterflowOption> </butterflow_ui:ButterflowOption>
<butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.FlowFilterLabel}" DescriptionValue="{x:Static loc:Localization.FlowFilterTooltip}"> <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> </butterflow_ui:ButterflowOption>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
@ -311,7 +312,7 @@
<Canvas x:Name="canvas" Grid.Row="1" Grid.RowSpan="3" Visibility="{Binding OptionsConfiguration.MultipleFiles, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolVisibilityConverter}}"> <Canvas x:Name="canvas" Grid.Row="1" Grid.RowSpan="3" Visibility="{Binding OptionsConfiguration.MultipleFiles, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolVisibilityConverter}}">
<TextBlock TextAlignment="Center" VerticalAlignment="Center" Width="{Binding ActualWidth, ElementName=canvas}" Height="{Binding ActualHeight, ElementName=canvas}" TextWrapping="WrapWithOverflow" Text="{x:Static loc:Localization.MultipleFilesPreviewWarningLabel}" /> <TextBlock TextAlignment="Center" VerticalAlignment="Center" Width="{Binding ActualWidth, ElementName=canvas}" Height="{Binding ActualHeight, ElementName=canvas}" TextWrapping="WrapWithOverflow" Text="{x:Static loc:Localization.MultipleFilesPreviewWarningLabel}" />
</Canvas> </Canvas>
<gu:MediaElementWrapper Grid.Row="1" Name="mediaPreview" Stretch="Uniform" ScrubbingEnabled="True" MediaEnded="mediaPreview_MediaEnded" Visibility="{Binding OptionsConfiguration.MultipleFiles, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource InverseBoolVisibilityConverter}}" /> <gu:MediaElementWrapper Grid.Row="1" Name="mediaPreview" Stretch="Uniform" ScrubbingEnabled="True" MediaOpened="mediaPreview_MediaOpened" MediaEnded="mediaPreview_MediaEnded" Visibility="{Binding OptionsConfiguration.MultipleFiles, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource InverseBoolVisibilityConverter}}" />
<Grid Grid.Row="2" Visibility="{Binding OptionsConfiguration.MultipleFiles, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource InverseBoolVisibilityConverter}}"> <Grid Grid.Row="2" Visibility="{Binding OptionsConfiguration.MultipleFiles, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource InverseBoolVisibilityConverter}}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -359,7 +360,7 @@
</Button> </Button>
</StatusBarItem> </StatusBarItem>
<StatusBarItem Grid.Column="1"> <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> </StatusBarItem>
</StatusBar> </StatusBar>
</Grid> </Grid>

View file

@ -51,20 +51,6 @@ namespace butterflow_ui
this.ButterflowWrapper.ParsedConsoleOutputRecieved += ButterflowWrapper_ParsedConsoleOutputRecieved; this.ButterflowWrapper.ParsedConsoleOutputRecieved += ButterflowWrapper_ParsedConsoleOutputRecieved;
this.OptionsConfiguration.AddConstantCallProperty("CommandLineOutput"); this.OptionsConfiguration.AddConstantCallProperty("CommandLineOutput");
InitializeComponent(); InitializeComponent();
// Check for updates.
if (OctokitWrapper.CurrentVersionStatus == OctokitWrapper.VersionStatus.Behind)
{
var updateMessageBoxResult = MessageBox.Show(string.Format("{0} {1}", Localization.Localization.BehindVersionStatusDescription, Localization.Localization.BehindVersionQuestion), Localization.Localization.UpdateAvailableLabel, MessageBoxButton.YesNo, MessageBoxImage.Information);
// If the user wants to update now, take them to the latest release on github and close this window.
if (updateMessageBoxResult == MessageBoxResult.Yes)
{
Process.Start("https://github.com/wagesj45/butterflow-ui/releases/latest");
this.Close();
}
}
} }
#region Methods #region Methods
@ -258,6 +244,15 @@ namespace butterflow_ui
} }
} }
/// <summary> Event handler. Called by mediaPreview for media opened events. </summary>
/// <param name="sender"> Source of the event. </param>
/// <param name="e"> Routed event information. </param>
private void mediaPreview_MediaOpened(object sender, RoutedEventArgs e)
{
//this.OptionsConfiguration.Width = this.mediaPreview.NaturalVideoWidth.ToString();
//this.OptionsConfiguration.Height = this.mediaPreview.NaturalVideoHeight.ToString();
}
/// <summary> Event handler. Called by mediaPreview for media ended events. </summary> /// <summary> Event handler. Called by mediaPreview for media ended events. </summary>
/// <param name="sender"> Source of the event. </param> /// <param name="sender"> Source of the event. </param>
/// <param name="e"> Routed event information. </param> /// <param name="e"> Routed event information. </param>
@ -349,7 +344,7 @@ namespace butterflow_ui
{ {
var button = sender as Button; var button = sender as Button;
if (button != null) if(button != null)
{ {
if (button.Tag.GetType() == typeof(Guid)) if (button.Tag.GetType() == typeof(Guid))
{ {
@ -377,7 +372,7 @@ namespace butterflow_ui
{ {
var binaryFormatter = new BinaryFormatter(); var binaryFormatter = new BinaryFormatter();
var file = binaryFormatter.Deserialize(ofd.OpenFile()); var file = binaryFormatter.Deserialize(ofd.OpenFile());
if (file is OptionsConfigurationFile) if(file is OptionsConfigurationFile)
{ {
this.OptionsConfiguration.LoadFile((OptionsConfigurationFile)file); this.OptionsConfiguration.LoadFile((OptionsConfigurationFile)file);
} }
@ -433,11 +428,7 @@ namespace butterflow_ui
{ {
var optionsWindow = new OptionsWindow(); var optionsWindow = new OptionsWindow();
optionsWindow.ShowDialog(); optionsWindow.Show();
//Force an update on the command line arguments in case the user changed something in the
//Options window that necessitates it, such as the compute device.
this.OptionsConfiguration.ForceUpdate();
} }
#endregion #endregion

View file

@ -1,148 +0,0 @@
using csmic;
using Octokit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace butterflow_ui
{
/// <summary>
/// An wrapper for the Octokit.net class. This class is used to extract functionality for
/// checking github for updates to butterflow-ui installation.
/// </summary>
public static class OctokitWrapper
{
#region Members
/// <summary> The RegEx string for matching . </summary>
private const string REGEX_VERSION = @"(?<Major>\d+ ?)\.(?<Minor>\d+ ?)\.(?<Patch>\d+ ?)";
/// <summary> The version status of the current installation. </summary>
private static VersionStatus versionStatus = VersionStatus.Unknown;
#endregion
#region Properties
/// <summary> Gets the current version status of this installation. </summary>
/// <value> The current version status of this installation. </value>
public static VersionStatus CurrentVersionStatus
{
get
{
return versionStatus;
}
}
/// <summary> Gets information describing the current version status. </summary>
/// <value> Information describing the current version status. </value>
public static string CurrentVersionStatusDescription
{
get
{
switch (CurrentVersionStatus)
{
case VersionStatus.Current:
return Localization.Localization.CurrentVersionStatusDescription;
case VersionStatus.Behind:
return Localization.Localization.BehindVersionStatusDescription;
case VersionStatus.Custom:
return Localization.Localization.CustomVersionStatusDescription;
case VersionStatus.Unknown:
default:
return Localization.Localization.UnknownVersionStatusDescription;
}
}
}
#endregion
#region Constructor
/// <summary> Static constructor. </summary>
static OctokitWrapper()
{
versionStatus = GetVersionStatus();
}
#endregion
#region Methods
/// <summary> Gets version status from github. </summary>
/// <returns> The current version status. </returns>
private static VersionStatus GetVersionStatus()
{
try
{
var interpreter = new InputInterpreter();
var client = new GitHubClient(new ProductHeaderValue("butterflow-ui"));
var releases = client.Repository.Release.GetAll("wagesj45", "butterflow-ui").Result;
if (releases.Any())
{
var latest = releases.First();
decimal latestMajor = 0, latestMinor = 0, latestPatch = 0, currentMajor = 0, currentMinor = 0, currentPatch = 0;
var regex = new Regex(REGEX_VERSION);
foreach (Match match in regex.Matches(latest.TagName))
{
latestMajor = interpreter.ComputeExpression(match.Groups["Major"].Value);
latestMinor = interpreter.ComputeExpression(match.Groups["Minor"].Value);
latestPatch = interpreter.ComputeExpression(match.Groups["Patch"].Value);
}
foreach (Match match in regex.Matches(Assembly.GetExecutingAssembly().GetName().Version.ToString()))
{
currentMajor = interpreter.ComputeExpression(match.Groups["Major"].Value);
currentMinor = interpreter.ComputeExpression(match.Groups["Minor"].Value);
currentPatch = interpreter.ComputeExpression(match.Groups["Patch"].Value);
}
if (latestMajor == currentMajor && latestMinor == currentMinor && latestPatch == currentPatch)
{
return VersionStatus.Current;
}
if (latestMajor >= currentMajor && latestMinor >= currentMinor && latestPatch >= currentPatch)
{
return VersionStatus.Behind;
}
return VersionStatus.Custom;
}
}
catch(Exception e)
{
//There was an issue connecting to Github. This could be caused by a missing network connection.
//We can safely ignore an error in this process and proceed, falling through to the default connection
//value of Unknown.
}
return VersionStatus.Unknown;
}
#endregion
#region Subclasses
/// <summary> Values that represent version status of the current installation of butterflow-ui. </summary>
public enum VersionStatus
{
/// <summary> The current version is up to date with the github repository. </summary>
Current,
/// <summary> The current version is behind the github repository and should be updated. </summary>
Behind,
/// <summary> The current version is ahead of the github repository, or is a custom version of butterflow-ui that cannot be compared to the github repository. </summary>
Custom,
/// <summary> Github failed to respond with the current version. This could be because of rate limits or a network failure. </summary>
Unknown
}
#endregion
}
}

View file

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

View file

@ -8,24 +8,13 @@
xmlns:loc="clr-namespace:butterflow_ui.Localization" xmlns:loc="clr-namespace:butterflow_ui.Localization"
mc:Ignorable="d" mc:Ignorable="d"
Title="{x:Static loc:Localization.OptionsWindowTitle}" SizeToContent="WidthAndHeight"> Title="{x:Static loc:Localization.OptionsWindowTitle}" SizeToContent="WidthAndHeight">
<Window.Resources>
<butterflow_ui:InverseBoolVisibilityConverter x:Key="InverseBoolVisibilityConverter" />
</Window.Resources>
<DockPanel Margin="32"> <DockPanel Margin="32">
<StackPanel> <StackPanel>
<WrapPanel> <WrapPanel>
<Label Content="{x:Static loc:Localization.LanguageLabel}" /> <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}" VerticalAlignment="Center" /> <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}" />
</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}" VerticalAlignment="Center" />
</WrapPanel> </WrapPanel>
<TextBlock Text="{x:Static loc:Localization.OptionsWindowLanguageChangeNotice}" />
<Separator Margin="0,10" /> <Separator Margin="0,10" />
<Button Name="btnSave" MaxWidth="45" Content="{x:Static loc:Localization.SaveLabel}" Click="btnSave_Click" /> <Button Name="btnSave" MaxWidth="45" Content="{x:Static loc:Localization.SaveLabel}" Click="btnSave_Click" />
</StackPanel> </StackPanel>

View file

@ -1,5 +1,4 @@
using butterflow_ui.Properties; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
@ -22,9 +21,6 @@ namespace butterflow_ui
{ {
#region Properties #region Properties
/// <summary> The butterflow wrapper used to call butterflow. </summary>
public ButterflowWrapper ButterflowWrapper { get; set; } = new ButterflowWrapper();
/// <summary> Gets or sets the supported languages. </summary> /// <summary> Gets or sets the supported languages. </summary>
/// <value> The supported languages. </value> /// <value> The supported languages. </value>
public List<CultureInfo> SupportedLanguages { get; set; } = new List<CultureInfo>(new[] public List<CultureInfo> SupportedLanguages { get; set; } = new List<CultureInfo>(new[]
@ -37,19 +33,17 @@ namespace butterflow_ui
CultureInfo.CreateSpecificCulture("zh-CN"), CultureInfo.CreateSpecificCulture("zh-CN"),
}); });
#endregion Properties #endregion
#region Constructors #region Constructors
/// <summary> Default constructor. </summary> /// <summary> Default constructor. </summary>
public OptionsWindow() public OptionsWindow()
{ {
this.ButterflowWrapper.GetDevices();
this.ButterflowWrapper.ButterflowExited += ButterflowWrapper_ButterflowExited;
InitializeComponent(); InitializeComponent();
} }
#endregion Constructors #endregion
#region Methods #region Methods
@ -63,21 +57,6 @@ namespace butterflow_ui
this.Close(); this.Close();
} }
/// <summary> Butterflow wrapper butterflow exited. </summary> #endregion
/// <param name="sender"> Source of the event. </param>
/// <param name="e"> The ButterflowExitArgs to process. </param>
private void ButterflowWrapper_ButterflowExited(object sender, ButterflowWrapper.ButterflowExitArgs e)
{
if(Settings.Default.Device >= 0)
{
this.comboDeviceList.Dispatcher.Invoke(() => this.comboDeviceList.SelectedIndex = Settings.Default.Device);
}
else
{
this.comboDeviceList.Dispatcher.Invoke(() => this.comboDeviceList.SelectedIndex = 0);
}
}
#endregion Methods
} }
} }

View file

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

View file

@ -12,7 +12,7 @@ namespace butterflow_ui.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -34,29 +34,5 @@ namespace butterflow_ui.Properties {
this["Language"] = value; this["Language"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int Device {
get {
return ((int)(this["Device"]));
}
set {
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

@ -5,11 +5,5 @@
<Setting Name="Language" Type="System.Globalization.CultureInfo" Scope="User"> <Setting Name="Language" Type="System.Globalization.CultureInfo" Scope="User">
<Value Profile="(Default)">en-US</Value> <Value Profile="(Default)">en-US</Value>
</Setting> </Setting>
<Setting Name="Device" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="UseDefaultDevice" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,81 @@
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.

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