Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6baaba462 | ||
|
|
22655e58a5 | ||
|
|
d19a8f19d0 | ||
|
|
7c2e97d6c1 | ||
|
|
1b5484f5d7 | ||
|
|
9467da8dd0 | ||
|
|
020ee655dd | ||
|
|
279c075790 | ||
|
|
1c91123ccb | ||
|
|
a38c1bb338 | ||
|
|
647f04b1ee | ||
|
|
e9035fc43f | ||
|
|
538eea34f3 | ||
|
|
17cc4c8dcf | ||
|
|
357a3b6d6c | ||
|
|
bbd893e46f | ||
|
|
04b1bbdd06 | ||
|
|
ce1ad3181e | ||
|
|
15235a6382 | ||
|
|
b3e26812f3 | ||
|
|
2bc4cbddaa | ||
|
|
e447410a1e | ||
|
|
c0d7c404b2 | ||
|
|
23dcc2067d | ||
|
|
093c5a1c6d | ||
|
|
acaba53b3f | ||
|
|
946b6fc3f4 | ||
|
|
e0beb08a09 | ||
|
|
a8741693f5 | ||
|
|
03fa599a9b | ||
|
|
4a87c62992 | ||
|
|
fe7c3d37a7 | ||
|
|
0ac9af89ec | ||
|
|
a48917614e | ||
|
|
c5aa5efca4 | ||
|
|
49520eb2f6 | ||
|
|
3ae020866d | ||
|
|
df7834dec8 | ||
|
|
666af8a37b | ||
|
|
8e1f73f745 | ||
|
|
569d4198ed | ||
|
|
73ae27644d | ||
|
|
780ca19ae3 | ||
|
|
35fa417695 | ||
|
|
6f06f2943b | ||
|
|
9d648d7975 | ||
|
|
95d141dd69 | ||
|
|
bf724d0dd3 | ||
|
|
a51d07a893 | ||
|
|
a583053379 | ||
|
|
37f976f65b |
No files matched your search
@@ -31,7 +31,7 @@ namespace FileConverter
|
|||||||
private static readonly Version Version = new Version()
|
private static readonly Version Version = new Version()
|
||||||
{
|
{
|
||||||
Major = 0,
|
Major = 0,
|
||||||
Minor = 6,
|
Minor = 7,
|
||||||
Patch = 0,
|
Patch = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -41,6 +41,7 @@ namespace FileConverter
|
|||||||
|
|
||||||
private bool needToRunConversionThread;
|
private bool needToRunConversionThread;
|
||||||
private bool cancelAutoExit;
|
private bool cancelAutoExit;
|
||||||
|
private bool isSessionEnding;
|
||||||
private UpgradeVersionDescription upgradeVersionDescription = null;
|
private UpgradeVersionDescription upgradeVersionDescription = null;
|
||||||
|
|
||||||
public Application()
|
public Application()
|
||||||
@@ -48,6 +49,8 @@ namespace FileConverter
|
|||||||
this.ConvertionJobs = this.conversionJobs.AsReadOnly();
|
this.ConvertionJobs = this.conversionJobs.AsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public event EventHandler<ApplicationTerminateArgs> OnApplicationTerminate;
|
||||||
|
|
||||||
public static Version ApplicationVersion
|
public static Version ApplicationVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -89,6 +92,11 @@ namespace FileConverter
|
|||||||
public void CancelAutoExit()
|
public void CancelAutoExit()
|
||||||
{
|
{
|
||||||
this.cancelAutoExit = true;
|
this.cancelAutoExit = true;
|
||||||
|
|
||||||
|
if (this.OnApplicationTerminate != null)
|
||||||
|
{
|
||||||
|
this.OnApplicationTerminate.Invoke(this, new ApplicationTerminateArgs(float.NaN));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnStartup(StartupEventArgs e)
|
protected override void OnStartup(StartupEventArgs e)
|
||||||
@@ -110,7 +118,7 @@ namespace FileConverter
|
|||||||
|
|
||||||
Debug.Log("Exit application.");
|
Debug.Log("Exit application.");
|
||||||
|
|
||||||
if (this.upgradeVersionDescription != null && this.upgradeVersionDescription.NeedToUpgrade)
|
if (!this.isSessionEnding && this.upgradeVersionDescription != null && this.upgradeVersionDescription.NeedToUpgrade)
|
||||||
{
|
{
|
||||||
Debug.Log("A new version of file converter has been found: {0}.", this.upgradeVersionDescription.LatestVersion);
|
Debug.Log("A new version of file converter has been found: {0}.", this.upgradeVersionDescription.LatestVersion);
|
||||||
|
|
||||||
@@ -154,11 +162,19 @@ namespace FileConverter
|
|||||||
Debug.Release();
|
Debug.Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnSessionEnding(SessionEndingCancelEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnSessionEnding(e);
|
||||||
|
|
||||||
|
this.isSessionEnding = true;
|
||||||
|
this.Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
private void Initialize()
|
private void Initialize()
|
||||||
{
|
{
|
||||||
Diagnostics.Debug.Log("File Converter v" + ApplicationVersion.ToString());
|
Diagnostics.Debug.Log("File Converter v" + ApplicationVersion.ToString());
|
||||||
Diagnostics.Debug.Log("The number of processors on this computer is {0}. Set the default number of conversion threads to {0}", Environment.ProcessorCount);
|
this.numberOfConversionThread = System.Math.Max(1, Environment.ProcessorCount / 2);
|
||||||
this.numberOfConversionThread = Environment.ProcessorCount;
|
Diagnostics.Debug.Log("The number of processors on this computer is {0}. Set the default number of conversion threads to {0}", this.numberOfConversionThread);
|
||||||
|
|
||||||
// Retrieve arguments.
|
// Retrieve arguments.
|
||||||
Debug.Log("Retrieve arguments...");
|
Debug.Log("Retrieve arguments...");
|
||||||
@@ -198,6 +214,11 @@ namespace FileConverter
|
|||||||
for (int index = 1; index < args.Length; index++)
|
for (int index = 1; index < args.Length; index++)
|
||||||
{
|
{
|
||||||
string argument = args[index];
|
string argument = args[index];
|
||||||
|
if (string.IsNullOrEmpty(argument))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (argument.StartsWith("--"))
|
if (argument.StartsWith("--"))
|
||||||
{
|
{
|
||||||
// This is an optional parameter.
|
// This is an optional parameter.
|
||||||
@@ -381,13 +402,33 @@ namespace FileConverter
|
|||||||
allConversionsSucceed &= this.conversionJobs[index].State == ConversionJob.ConversionState.Done;
|
allConversionsSucceed &= this.conversionJobs[index].State == ConversionJob.ConversionState.Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.cancelAutoExit)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (allConversionsSucceed)
|
if (allConversionsSucceed)
|
||||||
{
|
{
|
||||||
System.Threading.Thread.Sleep((int)this.Settings.DurationBetweenEndOfConversionsAndApplicationExit * 1000);
|
float remainingTime = this.Settings.DurationBetweenEndOfConversionsAndApplicationExit;
|
||||||
|
while (remainingTime > 0f)
|
||||||
if (this.cancelAutoExit)
|
|
||||||
{
|
{
|
||||||
return;
|
if (this.OnApplicationTerminate != null)
|
||||||
|
{
|
||||||
|
this.OnApplicationTerminate.Invoke(this, new ApplicationTerminateArgs(remainingTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(1000);
|
||||||
|
remainingTime--;
|
||||||
|
|
||||||
|
if (this.cancelAutoExit)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.OnApplicationTerminate != null)
|
||||||
|
{
|
||||||
|
this.OnApplicationTerminate.Invoke(this, new ApplicationTerminateArgs(remainingTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
|
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
|
||||||
@@ -413,9 +454,9 @@ namespace FileConverter
|
|||||||
{
|
{
|
||||||
conversionJob.StartConvertion();
|
conversionJob.StartConvertion();
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
throw;
|
Debug.LogError("Failure during conversion: {0}", exception.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conversionJob.State == ConversionJob.ConversionState.Done && !System.IO.File.Exists(conversionJob.OutputFilePath))
|
if (conversionJob.State == ConversionJob.ConversionState.Done && !System.IO.File.Exists(conversionJob.OutputFilePath))
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// <copyright file="ApplicationTerminateArgs.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
|
||||||
|
|
||||||
|
namespace FileConverter
|
||||||
|
{
|
||||||
|
public class ApplicationTerminateArgs : System.EventArgs
|
||||||
|
{
|
||||||
|
public ApplicationTerminateArgs(float remainingTimeBeforeTermination)
|
||||||
|
{
|
||||||
|
this.RemainingTimeBeforeTermination = remainingTimeBeforeTermination;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float RemainingTimeBeforeTermination
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
// <copyright file="CancelConversionJobCommand.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
|
||||||
|
|
||||||
|
namespace FileConverter.ConversionJobs
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
public class CancelConversionJobCommand : ICommand
|
||||||
|
{
|
||||||
|
private readonly ConversionJob conversionJob;
|
||||||
|
|
||||||
|
public CancelConversionJobCommand(ConversionJob conversionJob)
|
||||||
|
{
|
||||||
|
this.conversionJob = conversionJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
public event EventHandler CanExecuteChanged;
|
||||||
|
|
||||||
|
public bool CanExecute(object parameter)
|
||||||
|
{
|
||||||
|
if (this.conversionJob == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.conversionJob.IsCancelable && this.conversionJob.State == ConversionJob.ConversionState.InProgress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Execute(object parameter)
|
||||||
|
{
|
||||||
|
this.conversionJob?.Cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,6 @@ namespace FileConverter.ConversionJobs
|
|||||||
{
|
{
|
||||||
None = 0x00,
|
None = 0x00,
|
||||||
|
|
||||||
CdaExtraction = 0x01,
|
CdDriveExtraction = 0x01,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,7 @@ namespace FileConverter.ConversionJobs
|
|||||||
private string errorMessage = string.Empty;
|
private string errorMessage = string.Empty;
|
||||||
private string initialInputPath = string.Empty;
|
private string initialInputPath = string.Empty;
|
||||||
private string userState = string.Empty;
|
private string userState = string.Empty;
|
||||||
|
private CancelConversionJobCommand cancelCommand;
|
||||||
|
|
||||||
public ConversionJob()
|
public ConversionJob()
|
||||||
{
|
{
|
||||||
@@ -126,6 +127,31 @@ namespace FileConverter.ConversionJobs
|
|||||||
protected set;
|
protected set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CancelConversionJobCommand CancelCommand
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (this.cancelCommand == null)
|
||||||
|
{
|
||||||
|
this.cancelCommand = new CancelConversionJobCommand(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.cancelCommand;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsCancelable
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
protected set;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool CancelIsRequested
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual InputPostConversionAction InputPostConversionAction
|
protected virtual InputPostConversionAction InputPostConversionAction
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -141,7 +167,7 @@ namespace FileConverter.ConversionJobs
|
|||||||
|
|
||||||
public virtual bool CanStartConversion(ConversionFlags conversionFlags)
|
public virtual bool CanStartConversion(ConversionFlags conversionFlags)
|
||||||
{
|
{
|
||||||
return true;
|
return (conversionFlags & ConversionFlags.CdDriveExtraction) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PrepareConversion(string inputFilePath, string outputFilePath = null)
|
public void PrepareConversion(string inputFilePath, string outputFilePath = null)
|
||||||
@@ -225,6 +251,12 @@ namespace FileConverter.ConversionJobs
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if the input file is located on a cd drive.
|
||||||
|
if (PathHelpers.IsOnCDDrive(this.InputFilePath))
|
||||||
|
{
|
||||||
|
this.StateFlags = ConversionFlags.CdDriveExtraction;
|
||||||
|
}
|
||||||
|
|
||||||
this.Initialize();
|
this.Initialize();
|
||||||
|
|
||||||
if (this.State == ConversionState.Unknown)
|
if (this.State == ConversionState.Unknown)
|
||||||
@@ -262,6 +294,8 @@ namespace FileConverter.ConversionJobs
|
|||||||
this.ConversionFailed(exception.Message);
|
this.ConversionFailed(exception.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.StateFlags = ConversionFlags.None;
|
||||||
|
|
||||||
if (this.State == ConversionState.Failed)
|
if (this.State == ConversionState.Failed)
|
||||||
{
|
{
|
||||||
this.OnConversionFailed();
|
this.OnConversionFailed();
|
||||||
@@ -272,6 +306,17 @@ namespace FileConverter.ConversionJobs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void Cancel()
|
||||||
|
{
|
||||||
|
if (!this.IsCancelable || this.State != ConversionState.InProgress)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CancelIsRequested = true;
|
||||||
|
this.ConversionFailed("Canceled.");
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual void Convert()
|
protected virtual void Convert()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -284,9 +329,17 @@ namespace FileConverter.ConversionJobs
|
|||||||
{
|
{
|
||||||
Debug.Log("Conversion Failed.");
|
Debug.Log("Conversion Failed.");
|
||||||
|
|
||||||
if (System.IO.File.Exists(this.OutputFilePath))
|
try
|
||||||
{
|
{
|
||||||
System.IO.File.Delete(this.OutputFilePath);
|
if (System.IO.File.Exists(this.OutputFilePath))
|
||||||
|
{
|
||||||
|
System.IO.File.Delete(this.OutputFilePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
Debug.Log("Can't delete file '{0}' after conversion job failure.", this.OutputFilePath);
|
||||||
|
Debug.Log("An exception as been thrown: {0}.", exception.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ namespace FileConverter.ConversionJobs
|
|||||||
return new ConversionJob_Ico(conversionPreset);
|
return new ConversionJob_Ico(conversionPreset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conversionPreset.OutputType == OutputType.Gif)
|
||||||
|
{
|
||||||
|
return new ConversionJob_Gif(conversionPreset);
|
||||||
|
}
|
||||||
|
|
||||||
if (PathHelpers.GetExtensionCategory(extension) == PathHelpers.InputCategoryNames.Image)
|
if (PathHelpers.GetExtensionCategory(extension) == PathHelpers.InputCategoryNames.Image)
|
||||||
{
|
{
|
||||||
return new ConversionJob_ImageMagick(conversionPreset);
|
return new ConversionJob_ImageMagick(conversionPreset);
|
||||||
|
|||||||
@@ -36,11 +36,6 @@ namespace FileConverter.ConversionJobs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanStartConversion(ConversionFlags conversionFlags)
|
|
||||||
{
|
|
||||||
return (conversionFlags & ConversionFlags.CdaExtraction) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
@@ -108,8 +103,6 @@ namespace FileConverter.ConversionJobs
|
|||||||
this.compressionConversionJob = ConversionJobFactory.Create(this.ConversionPreset, this.intermediateFilePath);
|
this.compressionConversionJob = ConversionJobFactory.Create(this.ConversionPreset, this.intermediateFilePath);
|
||||||
this.compressionConversionJob.PrepareConversion(this.intermediateFilePath, this.OutputFilePath);
|
this.compressionConversionJob.PrepareConversion(this.intermediateFilePath, this.OutputFilePath);
|
||||||
this.compressionThread = new Thread(this.CompressAsync);
|
this.compressionThread = new Thread(this.CompressAsync);
|
||||||
|
|
||||||
this.StateFlags = ConversionFlags.CdaExtraction;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Convert()
|
protected override void Convert()
|
||||||
|
|||||||
@@ -3,11 +3,84 @@
|
|||||||
namespace FileConverter.ConversionJobs
|
namespace FileConverter.ConversionJobs
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
using FileConverter.Controls;
|
using FileConverter.Controls;
|
||||||
|
|
||||||
public partial class ConversionJob_FFMPEG
|
public partial class ConversionJob_FFMPEG
|
||||||
{
|
{
|
||||||
|
private static string Encapsulate(string optionName, string args)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(args))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Format("{0} \"{1}\"", optionName, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string ComputeTransformArgs(ConversionPreset conversionPreset)
|
||||||
|
{
|
||||||
|
float scaleFactor = conversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoScale);
|
||||||
|
string scaleArgs = string.Empty;
|
||||||
|
|
||||||
|
if (conversionPreset.OutputType == OutputType.Mkv || conversionPreset.OutputType == OutputType.Mp4)
|
||||||
|
{
|
||||||
|
// This presets use h264 codec, the size of the video need to be divisible by 2.
|
||||||
|
scaleArgs = string.Format("scale=trunc(iw*{0}/2)*2:trunc(ih*{0}/2)*2", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
|
||||||
|
}
|
||||||
|
else if (Math.Abs(scaleFactor - 1f) >= 0.005f)
|
||||||
|
{
|
||||||
|
scaleArgs = string.Format("scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
|
||||||
|
}
|
||||||
|
|
||||||
|
float rotationAngleInDegrees = conversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoRotation);
|
||||||
|
string rotationArgs = string.Empty;
|
||||||
|
if (Math.Abs(rotationAngleInDegrees - 0f) >= 0.05f)
|
||||||
|
{
|
||||||
|
// Transpose:
|
||||||
|
// 0: 90 CounterClockwise and vertical flip
|
||||||
|
// 1: 90 Clockwise
|
||||||
|
// 2: 90 CounterClockwise
|
||||||
|
// 3: 90 Clockwise and vertical flip
|
||||||
|
if (Math.Abs(rotationAngleInDegrees - 90f) <= 0.05f)
|
||||||
|
{
|
||||||
|
rotationArgs = "transpose=2";
|
||||||
|
}
|
||||||
|
else if (Math.Abs(rotationAngleInDegrees - 180f) <= 0.05f)
|
||||||
|
{
|
||||||
|
rotationArgs = "vflip,hflip";
|
||||||
|
}
|
||||||
|
else if (Math.Abs(rotationAngleInDegrees - 270f) <= 0.05f)
|
||||||
|
{
|
||||||
|
rotationArgs = "transpose=1";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Diagnostics.Debug.LogError("Unsupported rotation: {0}°", rotationAngleInDegrees);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build vf args content (scale=..., transpose=...)
|
||||||
|
string transformArgs = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(scaleArgs))
|
||||||
|
{
|
||||||
|
transformArgs += scaleArgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(rotationArgs))
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(transformArgs))
|
||||||
|
{
|
||||||
|
transformArgs += ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
transformArgs += rotationArgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
return transformArgs;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert bitrate in <c>mp3</c> encoder quality index.
|
/// Convert bitrate in <c>mp3</c> encoder quality index.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -263,5 +336,17 @@ namespace FileConverter.ConversionJobs
|
|||||||
|
|
||||||
throw new Exception("Unknown VBR bitrate.");
|
throw new Exception("Unknown VBR bitrate.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert video quality index to H264 constant rate factor.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="quality">The quality index.</param>
|
||||||
|
/// <returns>Returns the H264 constant rate factor.</returns>
|
||||||
|
/// The range of the quantizer scale is 0-63: lower values mean better quality.
|
||||||
|
/// https://trac.ffmpeg.org/wiki/Encode/VP9
|
||||||
|
private int WebmQualityToCRF(int quality)
|
||||||
|
{
|
||||||
|
return 63 - quality;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace FileConverter.ConversionJobs
|
namespace FileConverter.ConversionJobs
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -20,12 +21,16 @@ namespace FileConverter.ConversionJobs
|
|||||||
|
|
||||||
private ProcessStartInfo ffmpegProcessStartInfo;
|
private ProcessStartInfo ffmpegProcessStartInfo;
|
||||||
|
|
||||||
|
private List<FFMpegPass> ffmpegArgumentStringByPass = new List<FFMpegPass>();
|
||||||
|
|
||||||
public ConversionJob_FFMPEG() : base()
|
public ConversionJob_FFMPEG() : base()
|
||||||
{
|
{
|
||||||
|
this.IsCancelable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConversionJob_FFMPEG(ConversionPreset conversionPreset) : base(conversionPreset)
|
public ConversionJob_FFMPEG(ConversionPreset conversionPreset) : base(conversionPreset)
|
||||||
{
|
{
|
||||||
|
this.IsCancelable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual string FfmpegPath
|
protected virtual string FfmpegPath
|
||||||
@@ -63,7 +68,11 @@ namespace FileConverter.ConversionJobs
|
|||||||
this.ffmpegProcessStartInfo.RedirectStandardOutput = true;
|
this.ffmpegProcessStartInfo.RedirectStandardOutput = true;
|
||||||
this.ffmpegProcessStartInfo.RedirectStandardError = true;
|
this.ffmpegProcessStartInfo.RedirectStandardError = true;
|
||||||
|
|
||||||
string arguments = string.Empty;
|
this.FillFFMpegArgumentsList();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void FillFFMpegArgumentsList()
|
||||||
|
{
|
||||||
switch (this.ConversionPreset.OutputType)
|
switch (this.ConversionPreset.OutputType)
|
||||||
{
|
{
|
||||||
case OutputType.Aac:
|
case OutputType.Aac:
|
||||||
@@ -71,7 +80,9 @@ namespace FileConverter.ConversionJobs
|
|||||||
// https://trac.ffmpeg.org/wiki/Encode/AAC
|
// https://trac.ffmpeg.org/wiki/Encode/AAC
|
||||||
int audioEncodingBitrate = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
int audioEncodingBitrate = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
||||||
string encoderArgs = string.Format("-c:a aac -q:a {0}", this.AACBitrateToQualityIndex(audioEncodingBitrate));
|
string encoderArgs = string.Format("-c:a aac -q:a {0}", this.AACBitrateToQualityIndex(audioEncodingBitrate));
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -82,66 +93,20 @@ namespace FileConverter.ConversionJobs
|
|||||||
int videoEncodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.VideoQuality);
|
int videoEncodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.VideoQuality);
|
||||||
int audioEncodingBitrate = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
int audioEncodingBitrate = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
||||||
|
|
||||||
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoScale);
|
string transformArgs = ConversionJob_FFMPEG.ComputeTransformArgs(this.ConversionPreset);
|
||||||
string scaleArgs = string.Empty;
|
|
||||||
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
|
string audioArgs = "-an";
|
||||||
|
if (this.ConversionPreset.GetSettingsValue<bool>(ConversionPreset.ConversionSettingKeys.EnableAudio))
|
||||||
{
|
{
|
||||||
scaleArgs = string.Format("scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
|
audioArgs = string.Format("-c:a libmp3lame -qscale:a {0}", this.MP3VBRBitrateToQualityIndex(audioEncodingBitrate));
|
||||||
}
|
|
||||||
|
|
||||||
float rotationAngleInDegrees = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoRotation);
|
|
||||||
string rotationArgs = string.Empty;
|
|
||||||
if (Math.Abs(rotationAngleInDegrees - 0f) >= 0.05f)
|
|
||||||
{
|
|
||||||
// Transpose:
|
|
||||||
// 0: 90 CounterClockwise and vertical flip
|
|
||||||
// 1: 90 Clockwise
|
|
||||||
// 2: 90 CounterClockwise
|
|
||||||
// 3: 90 Clockwise and vertical flip
|
|
||||||
if (Math.Abs(rotationAngleInDegrees - 90f) <= 0.05f)
|
|
||||||
{
|
|
||||||
rotationArgs = "transpose=2";
|
|
||||||
}
|
|
||||||
else if (Math.Abs(rotationAngleInDegrees - 180f) <= 0.05f)
|
|
||||||
{
|
|
||||||
rotationArgs = "vflip,hflip";
|
|
||||||
}
|
|
||||||
else if (Math.Abs(rotationAngleInDegrees - 270f) <= 0.05f)
|
|
||||||
{
|
|
||||||
rotationArgs = "transpose=1";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Diagnostics.Debug.LogError("Unsupported rotation: {0}°", rotationAngleInDegrees);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build vf args (-vf "scale=..., transpose=...")
|
|
||||||
string transformArgs = string.Empty;
|
|
||||||
if (!string.IsNullOrEmpty(scaleArgs) || !string.IsNullOrEmpty(rotationArgs))
|
|
||||||
{
|
|
||||||
transformArgs = "-vf \"";
|
|
||||||
if (!string.IsNullOrEmpty(scaleArgs))
|
|
||||||
{
|
|
||||||
transformArgs += scaleArgs;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(rotationArgs))
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(scaleArgs))
|
|
||||||
{
|
|
||||||
transformArgs += ",";
|
|
||||||
}
|
|
||||||
|
|
||||||
transformArgs += rotationArgs;
|
|
||||||
}
|
|
||||||
|
|
||||||
transformArgs += "\"";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute final arguments.
|
// Compute final arguments.
|
||||||
string encoderArgs = string.Format("-c:v mpeg4 -vtag xvid -qscale:v {0} -c:a libmp3lame -qscale:a {1} {2}", this.MPEG4QualityToQualityIndex(videoEncodingQuality), this.MP3VBRBitrateToQualityIndex(audioEncodingBitrate), transformArgs);
|
string videoFilteringArgs = ConversionJob_FFMPEG.Encapsulate("-vf", transformArgs);
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
string encoderArgs = string.Format("-c:v mpeg4 -vtag xvid -qscale:v {0} {1} {2}", this.MPEG4QualityToQualityIndex(videoEncodingQuality), audioArgs, videoFilteringArgs);
|
||||||
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -150,7 +115,40 @@ namespace FileConverter.ConversionJobs
|
|||||||
{
|
{
|
||||||
// http://taer-naguur.blogspot.fr/2013/11/flac-audio-encoding-with-ffmpeg.html
|
// http://taer-naguur.blogspot.fr/2013/11/flac-audio-encoding-with-ffmpeg.html
|
||||||
string encoderArgs = string.Format("-compression_level 12");
|
string encoderArgs = string.Format("-compression_level 12");
|
||||||
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OutputType.Gif:
|
||||||
|
{
|
||||||
|
// http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
|
||||||
|
string fileName = Path.GetFileName(this.InputFilePath);
|
||||||
|
string tempPath = Path.GetTempPath();
|
||||||
|
string paletteFilePath = PathHelpers.GenerateUniquePath(tempPath + fileName + " - palette.png");
|
||||||
|
|
||||||
|
string transformArgs = ConversionJob_FFMPEG.ComputeTransformArgs(this.ConversionPreset);
|
||||||
|
|
||||||
|
// fps.
|
||||||
|
int framesPerSecond = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.VideoFramesPerSecond);
|
||||||
|
if (!string.IsNullOrEmpty(transformArgs))
|
||||||
|
{
|
||||||
|
transformArgs += ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
transformArgs += string.Format("fps={0}", framesPerSecond);
|
||||||
|
|
||||||
|
// Generate palette.
|
||||||
|
string encoderArgs = string.Format("-vf \"{0},palettegen\"", transformArgs);
|
||||||
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, paletteFilePath, encoderArgs);
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass("Indexing colors", arguments, paletteFilePath));
|
||||||
|
|
||||||
|
// Create gif.
|
||||||
|
encoderArgs = string.Format("-i \"{0}\" -lavfi \"{1},paletteuse\"", paletteFilePath, transformArgs);
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -158,7 +156,9 @@ namespace FileConverter.ConversionJobs
|
|||||||
case OutputType.Ico:
|
case OutputType.Ico:
|
||||||
{
|
{
|
||||||
string encoderArgs = string.Empty;
|
string encoderArgs = string.Empty;
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -176,7 +176,9 @@ namespace FileConverter.ConversionJobs
|
|||||||
|
|
||||||
string encoderArgs = string.Format("-q:v {0} {1}", this.JPGQualityToQualityIndex(encodingQuality), scaleArgs);
|
string encoderArgs = string.Format("-q:v {0} {1}", this.JPGQualityToQualityIndex(encodingQuality), scaleArgs);
|
||||||
|
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -200,10 +202,12 @@ namespace FileConverter.ConversionJobs
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OutputType.Mkv:
|
case OutputType.Mkv:
|
||||||
case OutputType.Mp4:
|
case OutputType.Mp4:
|
||||||
@@ -214,65 +218,25 @@ namespace FileConverter.ConversionJobs
|
|||||||
string videoEncodingSpeed = this.ConversionPreset.GetSettingsValue<string>(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed);
|
string videoEncodingSpeed = this.ConversionPreset.GetSettingsValue<string>(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed);
|
||||||
int audioEncodingBitrate = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
int audioEncodingBitrate = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
||||||
|
|
||||||
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoScale);
|
string transformArgs = ConversionJob_FFMPEG.ComputeTransformArgs(this.ConversionPreset);
|
||||||
string scaleArgs = string.Empty;
|
string videoFilteringArgs = ConversionJob_FFMPEG.Encapsulate("-vf", transformArgs);
|
||||||
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
|
|
||||||
|
string audioArgs = "-an";
|
||||||
|
if (this.ConversionPreset.GetSettingsValue<bool>(ConversionPreset.ConversionSettingKeys.EnableAudio))
|
||||||
{
|
{
|
||||||
scaleArgs = string.Format("scale=iw*{0}:ih*{0}", scaleFactor.ToString("#.##", CultureInfo.InvariantCulture));
|
audioArgs = string.Format("-c:a aac -qscale:a {0}", this.AACBitrateToQualityIndex(audioEncodingBitrate));
|
||||||
}
|
}
|
||||||
|
|
||||||
float rotationAngleInDegrees = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.VideoRotation);
|
string encoderArgs = string.Format(
|
||||||
string rotationArgs = string.Empty;
|
"-c:v libx264 -preset {0} -crf {1} {2} {3}",
|
||||||
if (Math.Abs(rotationAngleInDegrees - 0f) >= 0.05f)
|
this.H264EncodingSpeedToPreset(videoEncodingSpeed),
|
||||||
{
|
this.H264QualityToCRF(videoEncodingQuality),
|
||||||
// Transpose:
|
audioArgs,
|
||||||
// 0: 90 CounterClockwise and vertical flip
|
videoFilteringArgs);
|
||||||
// 1: 90 Clockwise
|
|
||||||
// 2: 90 CounterClockwise
|
|
||||||
// 3: 90 Clockwise and vertical flip
|
|
||||||
if (Math.Abs(rotationAngleInDegrees - 90f) <= 0.05f)
|
|
||||||
{
|
|
||||||
rotationArgs = "transpose=2";
|
|
||||||
}
|
|
||||||
else if (Math.Abs(rotationAngleInDegrees - 180f) <= 0.05f)
|
|
||||||
{
|
|
||||||
rotationArgs = "vflip,hflip";
|
|
||||||
}
|
|
||||||
else if (Math.Abs(rotationAngleInDegrees - 270f) <= 0.05f)
|
|
||||||
{
|
|
||||||
rotationArgs = "transpose=1";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Diagnostics.Debug.LogError("Unsupported rotation: {0}°", rotationAngleInDegrees);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build vf args (-vf "scale=..., transpose=...")
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
string transformArgs = string.Empty;
|
|
||||||
if (!string.IsNullOrEmpty(scaleArgs) || !string.IsNullOrEmpty(rotationArgs))
|
|
||||||
{
|
|
||||||
transformArgs = "-vf \"";
|
|
||||||
if (!string.IsNullOrEmpty(scaleArgs))
|
|
||||||
{
|
|
||||||
transformArgs += scaleArgs;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(rotationArgs))
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(scaleArgs))
|
|
||||||
{
|
|
||||||
transformArgs += ",";
|
|
||||||
}
|
|
||||||
|
|
||||||
transformArgs += rotationArgs;
|
|
||||||
}
|
|
||||||
|
|
||||||
transformArgs += "\"";
|
|
||||||
}
|
|
||||||
|
|
||||||
string encoderArgs = string.Format("-c:v libx264 -preset {0} -crf {1} -c:a aac -q:a {2} {3}", this.H264EncodingSpeedToPreset(videoEncodingSpeed), this.H264QualityToCRF(videoEncodingQuality), this.AACBitrateToQualityIndex(audioEncodingBitrate), transformArgs);
|
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -280,8 +244,10 @@ namespace FileConverter.ConversionJobs
|
|||||||
case OutputType.Ogg:
|
case OutputType.Ogg:
|
||||||
{
|
{
|
||||||
int encodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
int encodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
||||||
string encoderArgs = string.Format("-codec:a libvorbis -qscale:a {0}", this.OGGVBRBitrateToQualityIndex(encodingQuality));
|
string encoderArgs = string.Format("-vn -codec:a libvorbis -qscale:a {0}", this.OGGVBRBitrateToQualityIndex(encodingQuality));
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -298,7 +264,9 @@ namespace FileConverter.ConversionJobs
|
|||||||
// http://www.howtogeek.com/203979/is-the-png-format-lossless-since-it-has-a-compression-parameter/
|
// http://www.howtogeek.com/203979/is-the-png-format-lossless-since-it-has-a-compression-parameter/
|
||||||
string encoderArgs = string.Format("-compression_level 100 {0}", scaleArgs);
|
string encoderArgs = string.Format("-compression_level 100 {0}", scaleArgs);
|
||||||
|
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -307,21 +275,69 @@ namespace FileConverter.ConversionJobs
|
|||||||
{
|
{
|
||||||
EncodingMode encodingMode = this.ConversionPreset.GetSettingsValue<EncodingMode>(ConversionPreset.ConversionSettingKeys.AudioEncodingMode);
|
EncodingMode encodingMode = this.ConversionPreset.GetSettingsValue<EncodingMode>(ConversionPreset.ConversionSettingKeys.AudioEncodingMode);
|
||||||
string encoderArgs = string.Format("-acodec {0}", this.WAVEncodingToCodecArgument(encodingMode));
|
string encoderArgs = string.Format("-acodec {0}", this.WAVEncodingToCodecArgument(encodingMode));
|
||||||
arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OutputType.Webm:
|
||||||
|
{
|
||||||
|
// https://trac.ffmpeg.org/wiki/Encode/VP9
|
||||||
|
int videoEncodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.VideoQuality);
|
||||||
|
int audioEncodingQuality = this.ConversionPreset.GetSettingsValue<int>(ConversionPreset.ConversionSettingKeys.AudioBitrate);
|
||||||
|
|
||||||
|
string encodingArgs = string.Empty;
|
||||||
|
if (videoEncodingQuality == 63)
|
||||||
|
{
|
||||||
|
// Replace maximum quality settings by lossless compression.
|
||||||
|
encodingArgs = "-lossless 1";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
encodingArgs = string.Format("-crf {0} -b:v 0", this.WebmQualityToCRF(videoEncodingQuality));
|
||||||
|
}
|
||||||
|
|
||||||
|
string transformArgs = ConversionJob_FFMPEG.ComputeTransformArgs(this.ConversionPreset);
|
||||||
|
string videoFilteringArgs = ConversionJob_FFMPEG.Encapsulate("-vf", transformArgs);
|
||||||
|
|
||||||
|
string audioArgs = "-an";
|
||||||
|
if (this.ConversionPreset.GetSettingsValue<bool>(ConversionPreset.ConversionSettingKeys.EnableAudio))
|
||||||
|
{
|
||||||
|
audioArgs = string.Format("-c:a libvorbis -qscale:a {0}", this.OGGVBRBitrateToQualityIndex(audioEncodingQuality));
|
||||||
|
}
|
||||||
|
|
||||||
|
string encoderArgs = string.Format(
|
||||||
|
"-c:v libvpx-vp9 {0} {1} {2}",
|
||||||
|
encodingArgs,
|
||||||
|
audioArgs,
|
||||||
|
videoFilteringArgs);
|
||||||
|
|
||||||
|
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, encoderArgs);
|
||||||
|
|
||||||
|
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException("Converter not implemented for output file type " + this.ConversionPreset.OutputType);
|
throw new NotImplementedException("Converter not implemented for output file type " +
|
||||||
|
this.ConversionPreset.OutputType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(arguments))
|
if (this.ffmpegArgumentStringByPass.Count == 0)
|
||||||
{
|
{
|
||||||
throw new Exception("Invalid ffmpeg process arguments.");
|
throw new Exception("No ffmpeg arguments generated.");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ffmpegProcessStartInfo.Arguments = arguments;
|
for (int index = 0; index < this.ffmpegArgumentStringByPass.Count; index++)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(this.ffmpegArgumentStringByPass[index].Arguments))
|
||||||
|
{
|
||||||
|
throw new Exception("Invalid ffmpeg process arguments.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Convert()
|
protected override void Convert()
|
||||||
@@ -331,37 +347,63 @@ namespace FileConverter.ConversionJobs
|
|||||||
throw new Exception("The conversion preset must be valid.");
|
throw new Exception("The conversion preset must be valid.");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.UserState = "Conversion";
|
for (int index = 0; index < this.ffmpegArgumentStringByPass.Count; index++)
|
||||||
|
|
||||||
Diagnostics.Debug.Log("Execute command: {0} {1}.", this.ffmpegProcessStartInfo.FileName, this.ffmpegProcessStartInfo.Arguments);
|
|
||||||
Diagnostics.Debug.Log(string.Empty);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
using (Process exeProcess = Process.Start(this.ffmpegProcessStartInfo))
|
FFMpegPass currentPass = this.ffmpegArgumentStringByPass[index];
|
||||||
|
|
||||||
|
this.UserState = currentPass.Name;
|
||||||
|
this.ffmpegProcessStartInfo.Arguments = currentPass.Arguments;
|
||||||
|
|
||||||
|
Diagnostics.Debug.Log("Execute command: {0} {1}.", this.ffmpegProcessStartInfo.FileName, this.ffmpegProcessStartInfo.Arguments);
|
||||||
|
Diagnostics.Debug.Log(string.Empty);
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
using (StreamReader reader = exeProcess.StandardError)
|
using (Process exeProcess = Process.Start(this.ffmpegProcessStartInfo))
|
||||||
{
|
{
|
||||||
while (!reader.EndOfStream)
|
using (StreamReader reader = exeProcess.StandardError)
|
||||||
{
|
{
|
||||||
string result = reader.ReadLine();
|
while (!reader.EndOfStream)
|
||||||
|
{
|
||||||
|
if (this.CancelIsRequested && !exeProcess.HasExited)
|
||||||
|
{
|
||||||
|
exeProcess.Kill();
|
||||||
|
}
|
||||||
|
|
||||||
this.ParseFFMPEGOutput(result);
|
string result = reader.ReadLine();
|
||||||
|
|
||||||
Diagnostics.Debug.Log("ffmpeg output: {0}", result);
|
this.ParseFFMPEGOutput(result);
|
||||||
|
|
||||||
|
Diagnostics.Debug.Log("ffmpeg output: {0}", result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
exeProcess.WaitForExit();
|
exeProcess.WaitForExit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
this.ConversionFailed("Failed to launch FFMPEG process.");
|
||||||
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
|
||||||
{
|
|
||||||
this.ConversionFailed("Failed to launch FFMPEG process.");
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
Diagnostics.Debug.Log(string.Empty);
|
Diagnostics.Debug.Log(string.Empty);
|
||||||
|
|
||||||
|
// Clean intermediate files.
|
||||||
|
for (int index = 0; index < this.ffmpegArgumentStringByPass.Count; index++)
|
||||||
|
{
|
||||||
|
FFMpegPass currentPass = this.ffmpegArgumentStringByPass[index];
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(currentPass.FileToDelete))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Diagnostics.Debug.Log("Delete intermediate file {0}.", currentPass.FileToDelete);
|
||||||
|
|
||||||
|
File.Delete(currentPass.FileToDelete);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ParseFFMPEGOutput(string input)
|
private void ParseFFMPEGOutput(string input)
|
||||||
@@ -378,26 +420,58 @@ namespace FileConverter.ConversionJobs
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
match = this.progressRegex.Match(input);
|
if (this.fileDuration.Ticks > 0)
|
||||||
if (match.Success && match.Groups.Count >= 7)
|
|
||||||
{
|
{
|
||||||
int size = int.Parse(match.Groups[1].Value);
|
match = this.progressRegex.Match(input);
|
||||||
int hours = int.Parse(match.Groups[2].Value);
|
if (match.Success && match.Groups.Count >= 7)
|
||||||
int minutes = int.Parse(match.Groups[3].Value);
|
{
|
||||||
int seconds = int.Parse(match.Groups[4].Value);
|
int size = int.Parse(match.Groups[1].Value);
|
||||||
int milliseconds = int.Parse(match.Groups[5].Value);
|
int hours = int.Parse(match.Groups[2].Value);
|
||||||
float bitrate = 0f;
|
int minutes = int.Parse(match.Groups[3].Value);
|
||||||
float.TryParse(match.Groups[6].Value, out bitrate);
|
int seconds = int.Parse(match.Groups[4].Value);
|
||||||
|
int milliseconds = int.Parse(match.Groups[5].Value) * 10;
|
||||||
|
float bitrate = 0f;
|
||||||
|
float.TryParse(match.Groups[6].Value, out bitrate);
|
||||||
|
|
||||||
this.actualConvertedDuration = new TimeSpan(0, hours, minutes, seconds, milliseconds);
|
this.actualConvertedDuration = new TimeSpan(0, hours, minutes, seconds, milliseconds);
|
||||||
|
|
||||||
this.Progress = this.actualConvertedDuration.Ticks / (float)this.fileDuration.Ticks;
|
this.Progress = this.actualConvertedDuration.Ticks / (float)this.fileDuration.Ticks;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input.Contains("Exiting.") || input.Contains("Error") || input.Contains("Unsupported dimensions") || input.Contains("No such file or directory"))
|
if (input.Contains("Exiting.") || input.Contains("Error") || input.Contains("Unsupported dimensions") || input.Contains("No such file or directory"))
|
||||||
{
|
{
|
||||||
this.ConversionFailed(input);
|
if (input.StartsWith("Error while decoding stream") && input.EndsWith("Invalid data found when processing input"))
|
||||||
|
{
|
||||||
|
// It is normal for a transport stream to start with a broken frame.
|
||||||
|
// https://trac.ffmpeg.org/ticket/1622
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.ConversionFailed(input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private struct FFMpegPass
|
||||||
|
{
|
||||||
|
public string Name;
|
||||||
|
public string Arguments;
|
||||||
|
public string FileToDelete;
|
||||||
|
|
||||||
|
public FFMpegPass(string name, string arguments, string fileToDelete)
|
||||||
|
{
|
||||||
|
this.Name = name;
|
||||||
|
this.Arguments = arguments;
|
||||||
|
this.FileToDelete = fileToDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FFMpegPass(string arguments)
|
||||||
|
{
|
||||||
|
this.Name = "Conversion";
|
||||||
|
this.Arguments = arguments;
|
||||||
|
this.FileToDelete = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
// <copyright file="ConversionJob_Gif.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
|
||||||
|
|
||||||
|
namespace FileConverter.ConversionJobs
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
public class ConversionJob_Gif : ConversionJob
|
||||||
|
{
|
||||||
|
private string intermediateFilePath = string.Empty;
|
||||||
|
private ConversionJob pngConversionJob = null;
|
||||||
|
private ConversionJob gifConversionJob = null;
|
||||||
|
|
||||||
|
public ConversionJob_Gif(ConversionPreset conversionPreset) : base(conversionPreset)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
if (this.ConversionPreset == null)
|
||||||
|
{
|
||||||
|
throw new Exception("The conversion preset must be valid.");
|
||||||
|
}
|
||||||
|
|
||||||
|
string extension = System.IO.Path.GetExtension(this.InputFilePath);
|
||||||
|
extension = extension.ToLowerInvariant().Substring(1, extension.Length - 1);
|
||||||
|
|
||||||
|
string inputFilePath = string.Empty;
|
||||||
|
|
||||||
|
// If the output is an image start to convert it into png before send it to ffmpeg.
|
||||||
|
if (PathHelpers.GetExtensionCategory(extension) == PathHelpers.InputCategoryNames.Image && extension != "png")
|
||||||
|
{
|
||||||
|
// Generate intermediate file path.
|
||||||
|
string fileName = Path.GetFileName(this.OutputFilePath);
|
||||||
|
string tempPath = Path.GetTempPath();
|
||||||
|
this.intermediateFilePath = PathHelpers.GenerateUniquePath(tempPath + fileName + ".png");
|
||||||
|
|
||||||
|
// Convert input in png file to send it to ffmpeg for the gif conversion.
|
||||||
|
ConversionPreset intermediatePreset = new ConversionPreset("To compatible image", OutputType.Png, this.ConversionPreset.InputTypes.ToArray());
|
||||||
|
this.pngConversionJob = ConversionJobFactory.Create(intermediatePreset, this.InputFilePath);
|
||||||
|
this.pngConversionJob.PrepareConversion(this.InputFilePath, this.intermediateFilePath);
|
||||||
|
|
||||||
|
inputFilePath = this.intermediateFilePath;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
inputFilePath = this.InputFilePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert png file into ico.
|
||||||
|
this.gifConversionJob = new ConversionJob_FFMPEG(this.ConversionPreset);
|
||||||
|
this.gifConversionJob.PrepareConversion(inputFilePath, this.OutputFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Convert()
|
||||||
|
{
|
||||||
|
if (this.ConversionPreset == null)
|
||||||
|
{
|
||||||
|
throw new Exception("The conversion preset must be valid.");
|
||||||
|
}
|
||||||
|
|
||||||
|
Task updateProgress = this.UpdateProgress();
|
||||||
|
|
||||||
|
if (this.pngConversionJob != null)
|
||||||
|
{
|
||||||
|
this.UserState = "Read input image";
|
||||||
|
|
||||||
|
Diagnostics.Debug.Log(string.Empty);
|
||||||
|
Diagnostics.Debug.Log("Convert image to PNG (intermediate format).");
|
||||||
|
this.pngConversionJob.StartConvertion();
|
||||||
|
|
||||||
|
if (this.pngConversionJob.State != ConversionState.Done)
|
||||||
|
{
|
||||||
|
this.ConversionFailed(this.pngConversionJob.ErrorMessage);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Diagnostics.Debug.Log(string.Empty);
|
||||||
|
Diagnostics.Debug.Log("Convert png intermediate image to gif.");
|
||||||
|
this.gifConversionJob.StartConvertion();
|
||||||
|
|
||||||
|
if (this.gifConversionJob.State != ConversionState.Done)
|
||||||
|
{
|
||||||
|
this.ConversionFailed(this.gifConversionJob.ErrorMessage);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(this.intermediateFilePath))
|
||||||
|
{
|
||||||
|
Diagnostics.Debug.Log("Delete intermediate file {0}.", this.intermediateFilePath);
|
||||||
|
|
||||||
|
File.Delete(this.intermediateFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateProgress.Wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task UpdateProgress()
|
||||||
|
{
|
||||||
|
while (this.gifConversionJob.State != ConversionState.Done &&
|
||||||
|
this.gifConversionJob.State != ConversionState.Failed)
|
||||||
|
{
|
||||||
|
if (this.pngConversionJob != null && this.pngConversionJob.State == ConversionState.InProgress)
|
||||||
|
{
|
||||||
|
this.Progress = this.pngConversionJob.Progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.gifConversionJob != null && this.gifConversionJob.State == ConversionState.InProgress)
|
||||||
|
{
|
||||||
|
this.Progress = this.gifConversionJob.Progress;
|
||||||
|
this.UserState = this.gifConversionJob.UserState;
|
||||||
|
}
|
||||||
|
|
||||||
|
await Task.Delay(40);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -60,7 +60,7 @@ namespace FileConverter.ConversionJobs
|
|||||||
{
|
{
|
||||||
int referenceSize = System.Math.Min(image.Width, image.Height);
|
int referenceSize = System.Math.Min(image.Width, image.Height);
|
||||||
int size = 2;
|
int size = 2;
|
||||||
while (size * 2 < referenceSize)
|
while (size * 2 <= referenceSize)
|
||||||
{
|
{
|
||||||
size *= 2;
|
size *= 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,6 +96,13 @@ namespace FileConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[XmlAttribute]
|
||||||
|
public bool IsDefaultSettings
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = false;
|
||||||
|
|
||||||
[XmlElement]
|
[XmlElement]
|
||||||
public List<string> InputTypes
|
public List<string> InputTypes
|
||||||
{
|
{
|
||||||
@@ -397,121 +404,13 @@ namespace FileConverter
|
|||||||
|
|
||||||
private bool IsRelevantSetting(string settingsKey)
|
private bool IsRelevantSetting(string settingsKey)
|
||||||
{
|
{
|
||||||
switch (this.OutputType)
|
return this.Settings.ContainsKey(settingsKey);
|
||||||
{
|
|
||||||
case OutputType.Aac:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Avi:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoQuality:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoScale:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoRotation:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Flac:
|
|
||||||
case OutputType.Ico:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Jpg:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.ImageQuality:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.ImageScale:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.ImageRotation:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Mkv:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoQuality:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoScale:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoRotation:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Mp3:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.AudioEncodingMode:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Mp4:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoQuality:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoScale:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoRotation:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Ogg:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.AudioBitrate:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Png:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.ImageScale:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.ImageRotation:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2:
|
|
||||||
case ConversionPreset.ConversionSettingKeys.ImageMaximumSize:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OutputType.Wav:
|
|
||||||
switch (settingsKey)
|
|
||||||
{
|
|
||||||
case ConversionPreset.ConversionSettingKeys.AudioEncodingMode:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
Debug.LogError("Relevant settings '{1}' are not define for output type {0}.", this.OutputType, settingsKey);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeDefaultSettings(OutputType outputType)
|
private void InitializeDefaultSettings(OutputType outputType)
|
||||||
{
|
{
|
||||||
|
this.settings.Clear();
|
||||||
|
|
||||||
switch (outputType)
|
switch (outputType)
|
||||||
{
|
{
|
||||||
case OutputType.Aac:
|
case OutputType.Aac:
|
||||||
@@ -522,6 +421,12 @@ namespace FileConverter
|
|||||||
case OutputType.Flac:
|
case OutputType.Flac:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OutputType.Gif:
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoRotation, "0");
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoFramesPerSecond, "15");
|
||||||
|
break;
|
||||||
|
|
||||||
case OutputType.Png:
|
case OutputType.Png:
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale, "1");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale, "1");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageRotation, "0");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageRotation, "0");
|
||||||
@@ -538,6 +443,7 @@ namespace FileConverter
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OutputType.Avi:
|
case OutputType.Avi:
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.EnableAudio, "True");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "20");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "20");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoRotation, "0");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoRotation, "0");
|
||||||
@@ -545,6 +451,7 @@ namespace FileConverter
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OutputType.Mkv:
|
case OutputType.Mkv:
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.EnableAudio, "True");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "28");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "28");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, "Medium");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, "Medium");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
|
||||||
@@ -558,6 +465,7 @@ namespace FileConverter
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OutputType.Mp4:
|
case OutputType.Mp4:
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.EnableAudio, "True");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "28");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "28");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, "Medium");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, "Medium");
|
||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
|
||||||
@@ -573,6 +481,14 @@ namespace FileConverter
|
|||||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.AudioEncodingMode, EncodingMode.Wav16.ToString(), true);
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.AudioEncodingMode, EncodingMode.Wav16.ToString(), true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OutputType.Webm:
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.EnableAudio, "True");
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.AudioBitrate, "160");
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoQuality, "40");
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, "1");
|
||||||
|
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.VideoRotation, "0");
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new System.Exception("Missing default settings for type " + outputType);
|
throw new System.Exception("Missing default settings for type " + outputType);
|
||||||
}
|
}
|
||||||
@@ -734,6 +650,10 @@ namespace FileConverter
|
|||||||
public const string VideoEncodingSpeed = "VideoEncodingSpeed";
|
public const string VideoEncodingSpeed = "VideoEncodingSpeed";
|
||||||
public const string VideoScale = "VideoScale";
|
public const string VideoScale = "VideoScale";
|
||||||
public const string VideoRotation = "VideoRotation";
|
public const string VideoRotation = "VideoRotation";
|
||||||
|
public const string VideoFramesPerSecond = "VideoFramesPerSecond";
|
||||||
|
|
||||||
|
public const string EnableAudio = "EnableAudio";
|
||||||
|
public const string EnableVideo = "EnableVideo";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ namespace FileConverter.Diagnostics
|
|||||||
|
|
||||||
// Delete old diagnostics folder (1 day).
|
// Delete old diagnostics folder (1 day).
|
||||||
DateTime expirationDate = DateTime.Now.Subtract(new TimeSpan(1, 0, 0, 0));
|
DateTime expirationDate = DateTime.Now.Subtract(new TimeSpan(1, 0, 0, 0));
|
||||||
string[] diagnosticsDirectories = Directory.GetDirectories(path, "Diagnostics.*");
|
string[] diagnosticsDirectories = Directory.GetDirectories(path, "Diagnostics-*");
|
||||||
for (int index = 0; index < diagnosticsDirectories.Length; index++)
|
for (int index = 0; index < diagnosticsDirectories.Length; index++)
|
||||||
{
|
{
|
||||||
string directory = diagnosticsDirectories[index];
|
string directory = diagnosticsDirectories[index];
|
||||||
@@ -33,7 +33,9 @@ namespace FileConverter.Diagnostics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.diagnosticsFolderPath = Path.Combine(path, "Diagnostics." + Process.GetCurrentProcess().Id);
|
string diagnosticsFolderName = $"Diagnostics-{DateTime.Now.Hour}h{DateTime.Now.Minute}m{DateTime.Now.Second}s";
|
||||||
|
|
||||||
|
Debug.diagnosticsFolderPath = Path.Combine(path, diagnosticsFolderName);
|
||||||
Debug.diagnosticsFolderPath = PathHelpers.GenerateUniquePath(Debug.diagnosticsFolderPath);
|
Debug.diagnosticsFolderPath = PathHelpers.GenerateUniquePath(Debug.diagnosticsFolderPath);
|
||||||
Directory.CreateDirectory(Debug.diagnosticsFolderPath);
|
Directory.CreateDirectory(Debug.diagnosticsFolderPath);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,14 +87,17 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
|
<Compile Include="ApplicationTerminateArgs.cs" />
|
||||||
<Compile Include="Controls\EncodingQualitySliderControl.xaml.cs">
|
<Compile Include="Controls\EncodingQualitySliderControl.xaml.cs">
|
||||||
<DependentUpon>EncodingQualitySliderControl.xaml</DependentUpon>
|
<DependentUpon>EncodingQualitySliderControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="ConversionJobs\CancelConversionJobCommand.cs" />
|
||||||
<Compile Include="ConversionJobs\ConversionFlags.cs" />
|
<Compile Include="ConversionJobs\ConversionFlags.cs" />
|
||||||
<Compile Include="ConversionJobs\ConversionJob_ExtractCDA.cs" />
|
<Compile Include="ConversionJobs\ConversionJob_ExtractCDA.cs" />
|
||||||
<Compile Include="ConversionJobs\ConversionJobFactory.cs" />
|
<Compile Include="ConversionJobs\ConversionJobFactory.cs" />
|
||||||
<Compile Include="ConversionJobs\ConversionJob_FFMPEG.Converters.cs" />
|
<Compile Include="ConversionJobs\ConversionJob_FFMPEG.Converters.cs" />
|
||||||
<Compile Include="ConversionJobs\ConversionJob_FFMPEG.cs" />
|
<Compile Include="ConversionJobs\ConversionJob_FFMPEG.cs" />
|
||||||
|
<Compile Include="ConversionJobs\ConversionJob_Gif.cs" />
|
||||||
<Compile Include="ConversionJobs\ConversionJob_Ico.cs" />
|
<Compile Include="ConversionJobs\ConversionJob_Ico.cs" />
|
||||||
<Compile Include="ConversionJobs\ConversionJob_ImageMagick.cs" />
|
<Compile Include="ConversionJobs\ConversionJob_ImageMagick.cs" />
|
||||||
<Compile Include="ConversionPreset\ConversionSettingsOverride.cs" />
|
<Compile Include="ConversionPreset\ConversionSettingsOverride.cs" />
|
||||||
@@ -109,6 +112,7 @@
|
|||||||
<DependentUpon>Resources.en.resx</DependentUpon>
|
<DependentUpon>Resources.en.resx</DependentUpon>
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
|
<ExcludeFromStyleCop>True</ExcludeFromStyleCop>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Registry.cs" />
|
<Compile Include="Registry.cs" />
|
||||||
<Compile Include="Settings.Settings.cs" />
|
<Compile Include="Settings.Settings.cs" />
|
||||||
@@ -125,6 +129,7 @@
|
|||||||
<Compile Include="ValueConverters\Generic\EqualsConverter.cs" />
|
<Compile Include="ValueConverters\Generic\EqualsConverter.cs" />
|
||||||
<Compile Include="ValueConverters\Generic\CollectionContainsElementToBool.cs" />
|
<Compile Include="ValueConverters\Generic\CollectionContainsElementToBool.cs" />
|
||||||
<Compile Include="ValueConverters\Generic\FormatStringConverter.cs" />
|
<Compile Include="ValueConverters\Generic\FormatStringConverter.cs" />
|
||||||
|
<Compile Include="ValueConverters\Generic\ValueToString.cs" />
|
||||||
<Compile Include="ValueConverters\Generic\StringToValueType.cs" />
|
<Compile Include="ValueConverters\Generic\StringToValueType.cs" />
|
||||||
<Compile Include="ValueConverters\InputTypesToBool.cs" />
|
<Compile Include="ValueConverters\InputTypesToBool.cs" />
|
||||||
<Compile Include="Settings.cs" />
|
<Compile Include="Settings.cs" />
|
||||||
@@ -233,6 +238,15 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\ContextMenuScreenshot.png" />
|
<Resource Include="Resources\ContextMenuScreenshot.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\CancelIcon.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SuccessIcon.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\FailIcon.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>copy /Y "$(SolutionDir)Middleware\ffmpeg.exe" "$(TargetDir)ffmpeg.exe"
|
<PostBuildEvent>copy /Y "$(SolutionDir)Middleware\ffmpeg.exe" "$(TargetDir)ffmpeg.exe"
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace FileConverter
|
|||||||
Aac,
|
Aac,
|
||||||
Avi,
|
Avi,
|
||||||
Flac,
|
Flac,
|
||||||
|
Gif,
|
||||||
Ico,
|
Ico,
|
||||||
Jpg,
|
Jpg,
|
||||||
Mkv,
|
Mkv,
|
||||||
@@ -17,5 +18,6 @@ namespace FileConverter
|
|||||||
Ogg,
|
Ogg,
|
||||||
Png,
|
Png,
|
||||||
Wav,
|
Wav,
|
||||||
|
Webm,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,6 +23,28 @@ namespace FileConverter
|
|||||||
return PathHelpers.driveLetterRegex.Match(path).Groups[0].Value;
|
return PathHelpers.driveLetterRegex.Match(path).Groups[0].Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsOnCDDrive(string path)
|
||||||
|
{
|
||||||
|
string pathDriveLetter = GetPathDriveLetter(path);
|
||||||
|
if (string.IsNullOrEmpty(pathDriveLetter))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
char driveLetter = pathDriveLetter[0];
|
||||||
|
|
||||||
|
char[] driveLetters = Ripper.CDDrive.GetCDDriveLetters();
|
||||||
|
for (int index = 0; index < driveLetters.Length; index++)
|
||||||
|
{
|
||||||
|
if (driveLetters[index] == driveLetter)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static int GetCDATrackNumber(string path)
|
public static int GetCDATrackNumber(string path)
|
||||||
{
|
{
|
||||||
Match match = PathHelpers.cdaTrackNumberRegex.Match(path);
|
Match match = PathHelpers.cdaTrackNumberRegex.Match(path);
|
||||||
@@ -83,19 +105,23 @@ namespace FileConverter
|
|||||||
case "flac":
|
case "flac":
|
||||||
case "mp3":
|
case "mp3":
|
||||||
case "m4a":
|
case "m4a":
|
||||||
|
case "oga":
|
||||||
case "ogg":
|
case "ogg":
|
||||||
case "wav":
|
case "wav":
|
||||||
case "wma":
|
case "wma":
|
||||||
return InputCategoryNames.Audio;
|
return InputCategoryNames.Audio;
|
||||||
|
|
||||||
|
case "3gp":
|
||||||
case "avi":
|
case "avi":
|
||||||
case "bik":
|
case "bik":
|
||||||
case "3gp":
|
|
||||||
case "flv":
|
case "flv":
|
||||||
case "m4v":
|
case "m4v":
|
||||||
case "mp4":
|
case "mp4":
|
||||||
|
case "mpeg":
|
||||||
case "mov":
|
case "mov":
|
||||||
case "mkv":
|
case "mkv":
|
||||||
|
case "ogv":
|
||||||
|
case "vob":
|
||||||
case "webm":
|
case "webm":
|
||||||
case "wmv":
|
case "wmv":
|
||||||
return InputCategoryNames.Video;
|
return InputCategoryNames.Video;
|
||||||
@@ -112,6 +138,9 @@ namespace FileConverter
|
|||||||
case "svg":
|
case "svg":
|
||||||
case "xcf":
|
case "xcf":
|
||||||
return InputCategoryNames.Image;
|
return InputCategoryNames.Image;
|
||||||
|
|
||||||
|
case "gif":
|
||||||
|
return InputCategoryNames.AnimatedImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
return InputCategoryNames.Misc;
|
return InputCategoryNames.Misc;
|
||||||
@@ -137,13 +166,17 @@ namespace FileConverter
|
|||||||
case OutputType.Avi:
|
case OutputType.Avi:
|
||||||
case OutputType.Mkv:
|
case OutputType.Mkv:
|
||||||
case OutputType.Mp4:
|
case OutputType.Mp4:
|
||||||
return category == InputCategoryNames.Video;
|
case OutputType.Webm:
|
||||||
|
return category == InputCategoryNames.Video || category == InputCategoryNames.AnimatedImage;
|
||||||
|
|
||||||
case OutputType.Ico:
|
case OutputType.Ico:
|
||||||
case OutputType.Png:
|
|
||||||
case OutputType.Jpg:
|
case OutputType.Jpg:
|
||||||
|
case OutputType.Png:
|
||||||
return category == InputCategoryNames.Image;
|
return category == InputCategoryNames.Image;
|
||||||
|
|
||||||
|
case OutputType.Gif:
|
||||||
|
return category == InputCategoryNames.Image || category == InputCategoryNames.Video || category == InputCategoryNames.AnimatedImage;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -167,6 +200,8 @@ namespace FileConverter
|
|||||||
public const string Audio = "Audio";
|
public const string Audio = "Audio";
|
||||||
public const string Video = "Video";
|
public const string Video = "Video";
|
||||||
public const string Image = "Image";
|
public const string Image = "Image";
|
||||||
|
public const string AnimatedImage = "Animated Image";
|
||||||
|
|
||||||
public const string Misc = "Misc";
|
public const string Misc = "Misc";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 551 B |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -129,10 +129,25 @@ namespace FileConverter
|
|||||||
System.IO.File.Delete(userFilePath);
|
System.IO.File.Delete(userFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userSettings != null && userSettings.SerializationVersion != Version)
|
if (userSettings != null)
|
||||||
{
|
{
|
||||||
Diagnostics.Debug.Log("File converter settings has been imported from version {0} to version {1}.", userSettings.SerializationVersion, Version);
|
if (userSettings.SerializationVersion != Version)
|
||||||
userSettings.SerializationVersion = Version;
|
{
|
||||||
|
Diagnostics.Debug.Log("File converter settings has been imported from version {0} to version {1}.", userSettings.SerializationVersion, Version);
|
||||||
|
userSettings.SerializationVersion = Version;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove default settings.
|
||||||
|
if (userSettings.ConversionPresets != null)
|
||||||
|
{
|
||||||
|
for (int index = userSettings.ConversionPresets.Count - 1; index >= 0; index--)
|
||||||
|
{
|
||||||
|
if (userSettings.ConversionPresets[index].IsDefaultSettings)
|
||||||
|
{
|
||||||
|
userSettings.ConversionPresets.RemoveAt(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SerializationVersion="1">
|
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SerializationVersion="1">
|
||||||
<ExitApplicationWhenConversionsFinished>true</ExitApplicationWhenConversionsFinished>
|
<ExitApplicationWhenConversionsFinished>true</ExitApplicationWhenConversionsFinished>
|
||||||
<DurationBetweenEndOfConversionsAndApplicationExit>3</DurationBetweenEndOfConversionsAndApplicationExit>
|
<DurationBetweenEndOfConversionsAndApplicationExit>3</DurationBetweenEndOfConversionsAndApplicationExit>
|
||||||
<ConversionPreset Name="To Mkv" OutputType="Mkv">
|
<ConversionPreset Name="To Mkv" OutputType="Mkv" IsDefaultSettings="true">
|
||||||
<InputTypes>3gp</InputTypes>
|
<InputTypes>3gp</InputTypes>
|
||||||
<InputTypes>avi</InputTypes>
|
<InputTypes>avi</InputTypes>
|
||||||
<InputTypes>bik</InputTypes>
|
<InputTypes>bik</InputTypes>
|
||||||
@@ -11,9 +11,13 @@
|
|||||||
<InputTypes>mkv</InputTypes>
|
<InputTypes>mkv</InputTypes>
|
||||||
<InputTypes>mov</InputTypes>
|
<InputTypes>mov</InputTypes>
|
||||||
<InputTypes>mp4</InputTypes>
|
<InputTypes>mp4</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
|
<InputTypes>gif</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
<Settings Key="VideoQuality" Value="30" />
|
<Settings Key="VideoQuality" Value="30" />
|
||||||
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
||||||
<Settings Key="VideoScale" Value="1" />
|
<Settings Key="VideoScale" Value="1" />
|
||||||
@@ -21,7 +25,7 @@
|
|||||||
<Settings Key="AudioBitrate" Value="155" />
|
<Settings Key="AudioBitrate" Value="155" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Mp4" OutputType="Mp4">
|
<ConversionPreset Name="To Mp4" OutputType="Mp4" IsDefaultSettings="true">
|
||||||
<InputTypes>avi</InputTypes>
|
<InputTypes>avi</InputTypes>
|
||||||
<InputTypes>bik</InputTypes>
|
<InputTypes>bik</InputTypes>
|
||||||
<InputTypes>flv</InputTypes>
|
<InputTypes>flv</InputTypes>
|
||||||
@@ -32,7 +36,11 @@
|
|||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>gif</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
<Settings Key="VideoQuality" Value="30" />
|
<Settings Key="VideoQuality" Value="30" />
|
||||||
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
||||||
<Settings Key="VideoScale" Value="1" />
|
<Settings Key="VideoScale" Value="1" />
|
||||||
@@ -40,18 +48,22 @@
|
|||||||
<Settings Key="AudioBitrate" Value="155" />
|
<Settings Key="AudioBitrate" Value="155" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Mp4 (low quality)" OutputType="Mp4">
|
<ConversionPreset Name="To Mp4 (low quality)" OutputType="Mp4" IsDefaultSettings="true">
|
||||||
|
<InputTypes>3gp</InputTypes>
|
||||||
<InputTypes>avi</InputTypes>
|
<InputTypes>avi</InputTypes>
|
||||||
<InputTypes>bik</InputTypes>
|
<InputTypes>bik</InputTypes>
|
||||||
<InputTypes>flv</InputTypes>
|
<InputTypes>flv</InputTypes>
|
||||||
|
<InputTypes>m4v</InputTypes>
|
||||||
<InputTypes>mkv</InputTypes>
|
<InputTypes>mkv</InputTypes>
|
||||||
<InputTypes>mov</InputTypes>
|
<InputTypes>mov</InputTypes>
|
||||||
<InputTypes>mp4</InputTypes>
|
<InputTypes>mp4</InputTypes>
|
||||||
<InputTypes>3gp</InputTypes>
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
<InputTypes>gif</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
<Settings Key="VideoQuality" Value="20" />
|
<Settings Key="VideoQuality" Value="20" />
|
||||||
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
||||||
<Settings Key="VideoScale" Value="1" />
|
<Settings Key="VideoScale" Value="1" />
|
||||||
@@ -59,18 +71,22 @@
|
|||||||
<Settings Key="AudioBitrate" Value="96" />
|
<Settings Key="AudioBitrate" Value="96" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Mp4 (rotate left)" OutputType="Mp4">
|
<ConversionPreset Name="To Mp4 (rotate left)" OutputType="Mp4" IsDefaultSettings="true">
|
||||||
|
<InputTypes>gif</InputTypes>
|
||||||
|
<InputTypes>3gp</InputTypes>
|
||||||
<InputTypes>avi</InputTypes>
|
<InputTypes>avi</InputTypes>
|
||||||
<InputTypes>bik</InputTypes>
|
<InputTypes>bik</InputTypes>
|
||||||
<InputTypes>flv</InputTypes>
|
<InputTypes>flv</InputTypes>
|
||||||
|
<InputTypes>m4v</InputTypes>
|
||||||
<InputTypes>mkv</InputTypes>
|
<InputTypes>mkv</InputTypes>
|
||||||
<InputTypes>mov</InputTypes>
|
<InputTypes>mov</InputTypes>
|
||||||
<InputTypes>mp4</InputTypes>
|
<InputTypes>mp4</InputTypes>
|
||||||
<InputTypes>3gp</InputTypes>
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
<Settings Key="VideoQuality" Value="30" />
|
<Settings Key="VideoQuality" Value="30" />
|
||||||
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
||||||
<Settings Key="VideoScale" Value="1" />
|
<Settings Key="VideoScale" Value="1" />
|
||||||
@@ -78,7 +94,7 @@
|
|||||||
<Settings Key="AudioBitrate" Value="155" />
|
<Settings Key="AudioBitrate" Value="155" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Mp4 (rotate right)" OutputType="Mp4">
|
<ConversionPreset Name="To Mp4 (rotate right)" OutputType="Mp4" IsDefaultSettings="true">
|
||||||
<InputTypes>avi</InputTypes>
|
<InputTypes>avi</InputTypes>
|
||||||
<InputTypes>bik</InputTypes>
|
<InputTypes>bik</InputTypes>
|
||||||
<InputTypes>flv</InputTypes>
|
<InputTypes>flv</InputTypes>
|
||||||
@@ -89,7 +105,11 @@
|
|||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>gif</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
<Settings Key="VideoQuality" Value="30" />
|
<Settings Key="VideoQuality" Value="30" />
|
||||||
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
||||||
<Settings Key="VideoScale" Value="1" />
|
<Settings Key="VideoScale" Value="1" />
|
||||||
@@ -97,7 +117,7 @@
|
|||||||
<Settings Key="AudioBitrate" Value="155" />
|
<Settings Key="AudioBitrate" Value="155" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Avi" OutputType="Avi">
|
<ConversionPreset Name="To Webm" OutputType="Webm" IsDefaultSettings="true">
|
||||||
<InputTypes>avi</InputTypes>
|
<InputTypes>avi</InputTypes>
|
||||||
<InputTypes>bik</InputTypes>
|
<InputTypes>bik</InputTypes>
|
||||||
<InputTypes>flv</InputTypes>
|
<InputTypes>flv</InputTypes>
|
||||||
@@ -108,14 +128,102 @@
|
|||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>gif</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
|
<Settings Key="AudioBitrate" Value="160" />
|
||||||
|
<Settings Key="VideoQuality" Value="40" />
|
||||||
|
<Settings Key="VideoScale" Value="1" />
|
||||||
|
<Settings Key="VideoRotation" Value="0" />
|
||||||
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
|
</ConversionPreset>
|
||||||
|
<ConversionPreset Name="To Avi" OutputType="Avi" IsDefaultSettings="true">
|
||||||
|
<InputTypes>3gp</InputTypes>
|
||||||
|
<InputTypes>avi</InputTypes>
|
||||||
|
<InputTypes>bik</InputTypes>
|
||||||
|
<InputTypes>flv</InputTypes>
|
||||||
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>mkv</InputTypes>
|
||||||
|
<InputTypes>mov</InputTypes>
|
||||||
|
<InputTypes>mp4</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>webm</InputTypes>
|
||||||
|
<InputTypes>wmv</InputTypes>
|
||||||
|
<InputTypes>gif</InputTypes>
|
||||||
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
<Settings Key="VideoQuality" Value="27" />
|
<Settings Key="VideoQuality" Value="27" />
|
||||||
<Settings Key="VideoScale" Value="1" />
|
<Settings Key="VideoScale" Value="1" />
|
||||||
<Settings Key="VideoRotation" Value="0" />
|
<Settings Key="VideoRotation" Value="0" />
|
||||||
<Settings Key="AudioBitrate" Value="190" />
|
<Settings Key="AudioBitrate" Value="190" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Ogg" OutputType="Ogg">
|
<ConversionPreset Name="To Gif" OutputType="Gif" IsDefaultSettings="true">
|
||||||
|
<InputTypes>bmp</InputTypes>
|
||||||
|
<InputTypes>exr</InputTypes>
|
||||||
|
<InputTypes>ico</InputTypes>
|
||||||
|
<InputTypes>jpg</InputTypes>
|
||||||
|
<InputTypes>jpeg</InputTypes>
|
||||||
|
<InputTypes>png</InputTypes>
|
||||||
|
<InputTypes>psd</InputTypes>
|
||||||
|
<InputTypes>svg</InputTypes>
|
||||||
|
<InputTypes>tga</InputTypes>
|
||||||
|
<InputTypes>tiff</InputTypes>
|
||||||
|
<InputTypes>xcf</InputTypes>
|
||||||
|
<InputTypes>3gp</InputTypes>
|
||||||
|
<InputTypes>avi</InputTypes>
|
||||||
|
<InputTypes>bik</InputTypes>
|
||||||
|
<InputTypes>flv</InputTypes>
|
||||||
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>mkv</InputTypes>
|
||||||
|
<InputTypes>mov</InputTypes>
|
||||||
|
<InputTypes>mp4</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>webm</InputTypes>
|
||||||
|
<InputTypes>wmv</InputTypes>
|
||||||
|
<InputTypes>gif</InputTypes>
|
||||||
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="VideoScale" Value="1" />
|
||||||
|
<Settings Key="VideoRotation" Value="0" />
|
||||||
|
<Settings Key="VideoFramesPerSecond" Value="15" />
|
||||||
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
|
</ConversionPreset>
|
||||||
|
<ConversionPreset Name="To Gif (low quality)" OutputType="Gif" IsDefaultSettings="true">
|
||||||
|
<InputTypes>bmp</InputTypes>
|
||||||
|
<InputTypes>exr</InputTypes>
|
||||||
|
<InputTypes>ico</InputTypes>
|
||||||
|
<InputTypes>jpg</InputTypes>
|
||||||
|
<InputTypes>jpeg</InputTypes>
|
||||||
|
<InputTypes>png</InputTypes>
|
||||||
|
<InputTypes>psd</InputTypes>
|
||||||
|
<InputTypes>svg</InputTypes>
|
||||||
|
<InputTypes>tga</InputTypes>
|
||||||
|
<InputTypes>tiff</InputTypes>
|
||||||
|
<InputTypes>xcf</InputTypes>
|
||||||
|
<InputTypes>3gp</InputTypes>
|
||||||
|
<InputTypes>avi</InputTypes>
|
||||||
|
<InputTypes>bik</InputTypes>
|
||||||
|
<InputTypes>flv</InputTypes>
|
||||||
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>mkv</InputTypes>
|
||||||
|
<InputTypes>mov</InputTypes>
|
||||||
|
<InputTypes>mp4</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>webm</InputTypes>
|
||||||
|
<InputTypes>wmv</InputTypes>
|
||||||
|
<InputTypes>gif</InputTypes>
|
||||||
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="VideoScale" Value="0,75" />
|
||||||
|
<Settings Key="VideoRotation" Value="0" />
|
||||||
|
<Settings Key="VideoFramesPerSecond" Value="10" />
|
||||||
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
|
</ConversionPreset>
|
||||||
|
<ConversionPreset Name="To Ogg" OutputType="Ogg" IsDefaultSettings="true">
|
||||||
<InputTypes>aac</InputTypes>
|
<InputTypes>aac</InputTypes>
|
||||||
<InputTypes>aiff</InputTypes>
|
<InputTypes>aiff</InputTypes>
|
||||||
<InputTypes>ape</InputTypes>
|
<InputTypes>ape</InputTypes>
|
||||||
@@ -123,39 +231,32 @@
|
|||||||
<InputTypes>m4a</InputTypes>
|
<InputTypes>m4a</InputTypes>
|
||||||
<InputTypes>mp3</InputTypes>
|
<InputTypes>mp3</InputTypes>
|
||||||
<InputTypes>wma</InputTypes>
|
<InputTypes>wma</InputTypes>
|
||||||
|
<InputTypes>wav</InputTypes>
|
||||||
|
<InputTypes>3gp</InputTypes>
|
||||||
<InputTypes>avi</InputTypes>
|
<InputTypes>avi</InputTypes>
|
||||||
<InputTypes>bik</InputTypes>
|
<InputTypes>bik</InputTypes>
|
||||||
<InputTypes>flv</InputTypes>
|
<InputTypes>flv</InputTypes>
|
||||||
|
<InputTypes>m4v</InputTypes>
|
||||||
<InputTypes>mkv</InputTypes>
|
<InputTypes>mkv</InputTypes>
|
||||||
<InputTypes>mov</InputTypes>
|
<InputTypes>mov</InputTypes>
|
||||||
<InputTypes>mp4</InputTypes>
|
<InputTypes>mp4</InputTypes>
|
||||||
<InputTypes>wav</InputTypes>
|
<InputTypes>mpeg</InputTypes>
|
||||||
<InputTypes>3gp</InputTypes>
|
<InputTypes>ogv</InputTypes>
|
||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
<Settings Key="AudioBitrate" Value="160" />
|
<Settings Key="AudioBitrate" Value="160" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Flac" OutputType="Flac">
|
<ConversionPreset Name="To Flac" OutputType="Flac" IsDefaultSettings="true">
|
||||||
<InputTypes>avi</InputTypes>
|
|
||||||
<InputTypes>bik</InputTypes>
|
|
||||||
<InputTypes>flv</InputTypes>
|
|
||||||
<InputTypes>mkv</InputTypes>
|
|
||||||
<InputTypes>mov</InputTypes>
|
|
||||||
<InputTypes>mp4</InputTypes>
|
|
||||||
<InputTypes>wav</InputTypes>
|
<InputTypes>wav</InputTypes>
|
||||||
<InputTypes>ape</InputTypes>
|
<InputTypes>ape</InputTypes>
|
||||||
<InputTypes>3gp</InputTypes>
|
|
||||||
<InputTypes>webm</InputTypes>
|
|
||||||
<InputTypes>wmv</InputTypes>
|
|
||||||
<InputTypes>wma</InputTypes>
|
<InputTypes>wma</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
<InputTypes>aiff</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Wav" OutputType="Wav">
|
<ConversionPreset Name="To Wav" OutputType="Wav" IsDefaultSettings="true">
|
||||||
<InputTypes>aac</InputTypes>
|
<InputTypes>aac</InputTypes>
|
||||||
<InputTypes>aiff</InputTypes>
|
<InputTypes>aiff</InputTypes>
|
||||||
<InputTypes>ape</InputTypes>
|
<InputTypes>ape</InputTypes>
|
||||||
@@ -174,11 +275,14 @@
|
|||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>oga</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
<Settings Key="AudioEncodingMode" Value="Wav16" />
|
<Settings Key="AudioEncodingMode" Value="Wav16" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Mp3" OutputType="Mp3">
|
<ConversionPreset Name="To Mp3" OutputType="Mp3" IsDefaultSettings="true">
|
||||||
<InputTypes>aac</InputTypes>
|
<InputTypes>aac</InputTypes>
|
||||||
<InputTypes>aiff</InputTypes>
|
<InputTypes>aiff</InputTypes>
|
||||||
<InputTypes>ape</InputTypes>
|
<InputTypes>ape</InputTypes>
|
||||||
@@ -197,12 +301,15 @@
|
|||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>oga</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
<Settings Key="AudioEncodingMode" Value="Mp3VBR" />
|
<Settings Key="AudioEncodingMode" Value="Mp3VBR" />
|
||||||
<Settings Key="AudioBitrate" Value="190" />
|
<Settings Key="AudioBitrate" Value="190" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Aac" OutputType="Aac">
|
<ConversionPreset Name="To Aac" OutputType="Aac" IsDefaultSettings="true">
|
||||||
<InputTypes>aiff</InputTypes>
|
<InputTypes>aiff</InputTypes>
|
||||||
<InputTypes>ape</InputTypes>
|
<InputTypes>ape</InputTypes>
|
||||||
<InputTypes>m4a</InputTypes>
|
<InputTypes>m4a</InputTypes>
|
||||||
@@ -221,29 +328,72 @@
|
|||||||
<InputTypes>webm</InputTypes>
|
<InputTypes>webm</InputTypes>
|
||||||
<InputTypes>wmv</InputTypes>
|
<InputTypes>wmv</InputTypes>
|
||||||
<InputTypes>m4v</InputTypes>
|
<InputTypes>m4v</InputTypes>
|
||||||
|
<InputTypes>mpeg</InputTypes>
|
||||||
|
<InputTypes>ogv</InputTypes>
|
||||||
|
<InputTypes>oga</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
<Settings Key="AudioBitrate" Value="128" />
|
<Settings Key="AudioBitrate" Value="128" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="Extract CDA to Flac" OutputType="Flac">
|
<ConversionPreset Name="Extract DVD to Mp4" OutputType="Mp4" IsDefaultSettings="true">
|
||||||
|
<InputTypes>vob</InputTypes>
|
||||||
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
|
<Settings Key="VideoQuality" Value="30" />
|
||||||
|
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
||||||
|
<Settings Key="VideoScale" Value="1" />
|
||||||
|
<Settings Key="VideoRotation" Value="0" />
|
||||||
|
<Settings Key="AudioBitrate" Value="155" />
|
||||||
|
<OutputFileNameTemplate>(p:v)DVD Extraction\(f)</OutputFileNameTemplate>
|
||||||
|
</ConversionPreset>
|
||||||
|
<ConversionPreset Name="Extract DVD to Mkv" OutputType="Mkv" IsDefaultSettings="true">
|
||||||
|
<InputTypes>vob</InputTypes>
|
||||||
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="EnableAudio" Value="True" />
|
||||||
|
<Settings Key="VideoQuality" Value="30" />
|
||||||
|
<Settings Key="VideoEncodingSpeed" Value="Medium" />
|
||||||
|
<Settings Key="VideoScale" Value="1" />
|
||||||
|
<Settings Key="VideoRotation" Value="0" />
|
||||||
|
<Settings Key="AudioBitrate" Value="155" />
|
||||||
|
<OutputFileNameTemplate>(p:v)DVD Extraction\(f)</OutputFileNameTemplate>
|
||||||
|
</ConversionPreset>
|
||||||
|
<ConversionPreset Name="Extract DVD to Flac" OutputType="Flac" IsDefaultSettings="true">
|
||||||
|
<InputTypes>vob</InputTypes>
|
||||||
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<OutputFileNameTemplate>(p:m)DVD Extraction\(f)</OutputFileNameTemplate>
|
||||||
|
</ConversionPreset>
|
||||||
|
<ConversionPreset Name="Extract DVD to Ogg" OutputType="Ogg" IsDefaultSettings="true">
|
||||||
|
<InputTypes>vob</InputTypes>
|
||||||
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="AudioBitrate" Value="192" />
|
||||||
|
<OutputFileNameTemplate>(p:m)DVD Extraction\(f)</OutputFileNameTemplate>
|
||||||
|
</ConversionPreset>
|
||||||
|
<ConversionPreset Name="Extract DVD to Mp3" OutputType="Mp3" IsDefaultSettings="true">
|
||||||
|
<InputTypes>vob</InputTypes>
|
||||||
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
|
<Settings Key="AudioEncodingMode" Value="Mp3VBR" />
|
||||||
|
<Settings Key="AudioBitrate" Value="225" />
|
||||||
|
<OutputFileNameTemplate>(p:m)DVD Extraction\(f)</OutputFileNameTemplate>
|
||||||
|
</ConversionPreset>
|
||||||
|
<ConversionPreset Name="Extract CDA to Flac" OutputType="Flac" IsDefaultSettings="true">
|
||||||
<InputTypes>cda</InputTypes>
|
<InputTypes>cda</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
<OutputFileNameTemplate>(p:m)CDA Extraction\(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p:m)CDA Extraction\(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="Extract CDA to Ogg" OutputType="Ogg">
|
<ConversionPreset Name="Extract CDA to Ogg" OutputType="Ogg" IsDefaultSettings="true">
|
||||||
<InputTypes>cda</InputTypes>
|
<InputTypes>cda</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
<Settings Key="AudioBitrate" Value="192" />
|
<Settings Key="AudioBitrate" Value="192" />
|
||||||
<OutputFileNameTemplate>(p:m)CDA Extraction\(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p:m)CDA Extraction\(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="Extract CDA to Mp3" OutputType="Mp3">
|
<ConversionPreset Name="Extract CDA to Mp3" OutputType="Mp3" IsDefaultSettings="true">
|
||||||
<InputTypes>cda</InputTypes>
|
<InputTypes>cda</InputTypes>
|
||||||
<InputPostConversionAction>None</InputPostConversionAction>
|
<InputPostConversionAction>None</InputPostConversionAction>
|
||||||
<Settings Key="AudioEncodingMode" Value="Mp3VBR" />
|
<Settings Key="AudioEncodingMode" Value="Mp3VBR" />
|
||||||
<Settings Key="AudioBitrate" Value="225" />
|
<Settings Key="AudioBitrate" Value="225" />
|
||||||
<OutputFileNameTemplate>(p:m)CDA Extraction\(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p:m)CDA Extraction\(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Png" OutputType="Png">
|
<ConversionPreset Name="To Png" OutputType="Png" IsDefaultSettings="true">
|
||||||
<InputTypes>bmp</InputTypes>
|
<InputTypes>bmp</InputTypes>
|
||||||
<InputTypes>exr</InputTypes>
|
<InputTypes>exr</InputTypes>
|
||||||
<InputTypes>ico</InputTypes>
|
<InputTypes>ico</InputTypes>
|
||||||
@@ -262,7 +412,7 @@
|
|||||||
<Settings Key="ImageMaximumSize" Value="0" />
|
<Settings Key="ImageMaximumSize" Value="0" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To small Png (25%)" OutputType="Png">
|
<ConversionPreset Name="To small Png (25%)" OutputType="Png" IsDefaultSettings="true">
|
||||||
<InputTypes>bmp</InputTypes>
|
<InputTypes>bmp</InputTypes>
|
||||||
<InputTypes>exr</InputTypes>
|
<InputTypes>exr</InputTypes>
|
||||||
<InputTypes>ico</InputTypes>
|
<InputTypes>ico</InputTypes>
|
||||||
@@ -281,7 +431,7 @@
|
|||||||
<Settings Key="ImageMaximumSize" Value="0" />
|
<Settings Key="ImageMaximumSize" Value="0" />
|
||||||
<OutputFileNameTemplate>(p)(f)-small</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)-small</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Png (rotate left)" OutputType="Png">
|
<ConversionPreset Name="To Png (rotate left)" OutputType="Png" IsDefaultSettings="true">
|
||||||
<InputTypes>bmp</InputTypes>
|
<InputTypes>bmp</InputTypes>
|
||||||
<InputTypes>exr</InputTypes>
|
<InputTypes>exr</InputTypes>
|
||||||
<InputTypes>ico</InputTypes>
|
<InputTypes>ico</InputTypes>
|
||||||
@@ -299,7 +449,7 @@
|
|||||||
<Settings Key="ImageMaximumSize" Value="0" />
|
<Settings Key="ImageMaximumSize" Value="0" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Png (rotate right)" OutputType="Png">
|
<ConversionPreset Name="To Png (rotate right)" OutputType="Png" IsDefaultSettings="true">
|
||||||
<InputTypes>bmp</InputTypes>
|
<InputTypes>bmp</InputTypes>
|
||||||
<InputTypes>exr</InputTypes>
|
<InputTypes>exr</InputTypes>
|
||||||
<InputTypes>ico</InputTypes>
|
<InputTypes>ico</InputTypes>
|
||||||
@@ -317,7 +467,7 @@
|
|||||||
<Settings Key="ImageMaximumSize" Value="0" />
|
<Settings Key="ImageMaximumSize" Value="0" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Jpg" OutputType="Jpg">
|
<ConversionPreset Name="To Jpg" OutputType="Jpg" IsDefaultSettings="true">
|
||||||
<InputTypes>bmp</InputTypes>
|
<InputTypes>bmp</InputTypes>
|
||||||
<InputTypes>exr</InputTypes>
|
<InputTypes>exr</InputTypes>
|
||||||
<InputTypes>ico</InputTypes>
|
<InputTypes>ico</InputTypes>
|
||||||
@@ -334,9 +484,10 @@
|
|||||||
<Settings Key="ImageScale" Value="1" />
|
<Settings Key="ImageScale" Value="1" />
|
||||||
<Settings Key="ImageRotation" Value="0" />
|
<Settings Key="ImageRotation" Value="0" />
|
||||||
<Settings Key="ImageClampSizePowerOf2" Value="False" />
|
<Settings Key="ImageClampSizePowerOf2" Value="False" />
|
||||||
|
<Settings Key="ImageMaximumSize" Value="0" />
|
||||||
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
|
||||||
</ConversionPreset>
|
</ConversionPreset>
|
||||||
<ConversionPreset Name="To Ico" OutputType="Ico">
|
<ConversionPreset Name="To Ico" OutputType="Ico" IsDefaultSettings="true">
|
||||||
<InputTypes>bmp</InputTypes>
|
<InputTypes>bmp</InputTypes>
|
||||||
<InputTypes>exr</InputTypes>
|
<InputTypes>exr</InputTypes>
|
||||||
<InputTypes>ico</InputTypes>
|
<InputTypes>ico</InputTypes>
|
||||||
|
|||||||
@@ -41,8 +41,12 @@ namespace FileConverter.ValueConverters
|
|||||||
|
|
||||||
string fileName = System.IO.Path.GetFileName(inputPathWithoutExtension);
|
string fileName = System.IO.Path.GetFileName(inputPathWithoutExtension);
|
||||||
string parentDirectory = System.IO.Path.GetDirectoryName(inputPathWithoutExtension);
|
string parentDirectory = System.IO.Path.GetDirectoryName(inputPathWithoutExtension);
|
||||||
string[] directories = parentDirectory.Split(System.IO.Path.DirectorySeparatorChar);
|
if (!parentDirectory.EndsWith(System.IO.Path.DirectorySeparatorChar.ToString()))
|
||||||
parentDirectory += System.IO.Path.DirectorySeparatorChar;
|
{
|
||||||
|
parentDirectory += System.IO.Path.DirectorySeparatorChar;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] directories = parentDirectory.Substring(0, parentDirectory.Length - 1).Split(System.IO.Path.DirectorySeparatorChar);
|
||||||
|
|
||||||
// Generate output path from template.
|
// Generate output path from template.
|
||||||
string outputPath = outputFileTemplate;
|
string outputPath = outputFileTemplate;
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// <copyright file="ValueToString.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
|
||||||
|
|
||||||
|
namespace FileConverter.ValueConverters.Generic
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
public class ValueToString : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return value?.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,6 +49,12 @@ namespace FileConverter.Windows
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DataTemplate GifSettingsDataTemplate
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
public DataTemplate JpgSettingsDataTemplate
|
public DataTemplate JpgSettingsDataTemplate
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
@@ -67,6 +73,12 @@ namespace FileConverter.Windows
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DataTemplate WebmSettingsDataTemplate
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
public override DataTemplate SelectTemplate(object item, DependencyObject container)
|
public override DataTemplate SelectTemplate(object item, DependencyObject container)
|
||||||
{
|
{
|
||||||
if (item == null)
|
if (item == null)
|
||||||
@@ -84,6 +96,9 @@ namespace FileConverter.Windows
|
|||||||
case OutputType.Avi:
|
case OutputType.Avi:
|
||||||
return this.AviSettingsDataTemplate;
|
return this.AviSettingsDataTemplate;
|
||||||
|
|
||||||
|
case OutputType.Gif:
|
||||||
|
return this.GifSettingsDataTemplate;
|
||||||
|
|
||||||
case OutputType.Jpg:
|
case OutputType.Jpg:
|
||||||
return this.JpgSettingsDataTemplate;
|
return this.JpgSettingsDataTemplate;
|
||||||
|
|
||||||
@@ -104,6 +119,9 @@ namespace FileConverter.Windows
|
|||||||
|
|
||||||
case OutputType.Wav:
|
case OutputType.Wav:
|
||||||
return this.WavSettingsDataTemplate;
|
return this.WavSettingsDataTemplate;
|
||||||
|
|
||||||
|
case OutputType.Webm:
|
||||||
|
return this.WebmSettingsDataTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.DefaultDataTemplate;
|
return this.DefaultDataTemplate;
|
||||||
|
|||||||
@@ -4,11 +4,20 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:FileConverter"
|
xmlns:local="clr-namespace:FileConverter"
|
||||||
xmlns:valueConverters="clr-namespace:FileConverter.ValueConverters"
|
xmlns:valueConverters="clr-namespace:FileConverter.ValueConverters"
|
||||||
xmlns:conversionJobs="clr-namespace:FileConverter.ConversionJobs" mc:Ignorable="d" x:Class="FileConverter.MainWindow"
|
xmlns:conversionJobs="clr-namespace:FileConverter.ConversionJobs"
|
||||||
x:Name="FileConverterMainWindow" Height="500" Width="950" MinHeight="250" MinWidth="450" WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico">
|
xmlns:generic="clr-namespace:FileConverter.ValueConverters.Generic"
|
||||||
|
mc:Ignorable="d" x:Class="FileConverter.MainWindow"
|
||||||
|
x:Name="FileConverterMainWindow" Height="500" Width="950" MinHeight="250" MinWidth="500" WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
|
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
|
||||||
<valueConverters:ConversionStateToBrush x:Key="ConversionStateToColor" />
|
<valueConverters:ConversionStateToBrush x:Key="ConversionStateToColor" />
|
||||||
|
|
||||||
|
<generic:ValueConverterGroup x:Key="EnumEqualsToVisibility">
|
||||||
|
<generic:ValueToString/>
|
||||||
|
<generic:EqualsConverter/>
|
||||||
|
<!--<generic:BoolInverterConverter/>-->
|
||||||
|
<generic:BoolToVisibility/>
|
||||||
|
</generic:ValueConverterGroup>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Window.Title>
|
<Window.Title>
|
||||||
<Binding Converter="{StaticResource ApplicationVersionToApplicationName}" Mode="OneWay" Path="(local:Application.ApplicationVersion)"/>
|
<Binding Converter="{StaticResource ApplicationVersionToApplicationName}" Mode="OneWay" Path="(local:Application.ApplicationVersion)"/>
|
||||||
@@ -27,7 +36,10 @@
|
|||||||
<ColumnDefinition Width="100" />
|
<ColumnDefinition Width="100" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label x:Name="Title" Grid.Column="0" Content="Files to convert" VerticalAlignment="Top" Height="30" FontSize="16" FontWeight="Bold"/>
|
<DockPanel Grid.Column="0">
|
||||||
|
<Label Content="Files to convert" VerticalAlignment="Top" Height="30" FontSize="16" FontWeight="Bold"/>
|
||||||
|
<Label Content="{Binding InformationMessage, ElementName=FileConverterMainWindow}" VerticalAlignment="Top" Height="30" FontSize="13.333" HorizontalAlignment="Right"/>
|
||||||
|
</DockPanel>
|
||||||
<Button x:Name="DiagnosticsButton" Grid.Column="1" Content="Logs" Margin="3,3" Click="DiagnosticsButton_OnClick"/>
|
<Button x:Name="DiagnosticsButton" Grid.Column="1" Content="Logs" Margin="3,3" Click="DiagnosticsButton_OnClick"/>
|
||||||
<Button x:Name="SettingsButton" Grid.Column="2" Content="Settings" Margin="3,3" Click="SettingsButton_OnClick"/>
|
<Button x:Name="SettingsButton" Grid.Column="2" Content="Settings" Margin="3,3" Click="SettingsButton_OnClick"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -36,8 +48,13 @@
|
|||||||
<ItemsControl x:Name="ConverterJobsList">
|
<ItemsControl x:Name="ConverterJobsList">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<DockPanel Background="{Binding State, ConverterParameter=Background, Converter={StaticResource ConversionStateToColor}}" Margin="0,4">
|
<Grid Background="{Binding State, ConverterParameter=Background, Converter={StaticResource ConversionStateToColor}}" Margin="0,4">
|
||||||
<Grid Margin="10">
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="70"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid Margin="10" Grid.Column="0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="20" />
|
<RowDefinition Height="20" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@@ -61,7 +78,15 @@
|
|||||||
|
|
||||||
<ProgressBar Grid.Row="1" Grid.Column="1" Height="18" Width="Auto" Minimum="0" Maximum="1" SmallChange="0.001" Value="{Binding Progress, Mode=OneWay}" Foreground="{Binding State, ConverterParameter=Foreground, Converter={StaticResource ConversionStateToColor}}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" MinWidth="100" LargeChange="0.1" />
|
<ProgressBar Grid.Row="1" Grid.Column="1" Height="18" Width="Auto" Minimum="0" Maximum="1" SmallChange="0.001" Value="{Binding Progress, Mode=OneWay}" Foreground="{Binding State, ConverterParameter=Foreground, Converter={StaticResource ConversionStateToColor}}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" MinWidth="100" LargeChange="0.1" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DockPanel>
|
|
||||||
|
<Button Margin="5" Grid.Column="1" Background="WhiteSmoke" Foreground="#FF3E3E3E" Visibility="{Binding State, Converter={StaticResource EnumEqualsToVisibility}, ConverterParameter=|InProgress|Collapsed}" Command="{Binding CancelCommand}" ToolTip="Cancel">
|
||||||
|
<Button.Content>
|
||||||
|
<Image Source="/FileConverter;component/Resources/CancelIcon.png" Width="48" Height="48" />
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Image Margin="5" Grid.Column="1" Source="/FileConverter;component/Resources/SuccessIcon.png" Width="48" Height="48" Visibility="{Binding State, Converter={StaticResource EnumEqualsToVisibility}, ConverterParameter=|Done|Collapsed}"/>
|
||||||
|
<Image Margin="5" Grid.Column="1" Source="/FileConverter;component/Resources/FailIcon.png" Width="48" Height="48" Visibility="{Binding State, Converter={StaticResource EnumEqualsToVisibility}, ConverterParameter=|Failed|Collapsed}"/>
|
||||||
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
<ItemsControl.DataContext>
|
<ItemsControl.DataContext>
|
||||||
|
|||||||
@@ -15,12 +15,16 @@ namespace FileConverter
|
|||||||
private SettingsWindow settingsWindow;
|
private SettingsWindow settingsWindow;
|
||||||
private UpgradeWindow upgradeWindow;
|
private UpgradeWindow upgradeWindow;
|
||||||
|
|
||||||
|
private string informationMessage;
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
|
|
||||||
Application application = Application.Current as Application;
|
Application application = Application.Current as Application;
|
||||||
|
|
||||||
|
application.OnApplicationTerminate += this.Application_OnApplicationTerminate;
|
||||||
|
|
||||||
this.ConverterJobsList.ItemsSource = application.ConvertionJobs;
|
this.ConverterJobsList.ItemsSource = application.ConvertionJobs;
|
||||||
|
|
||||||
if (application.HideMainWindow)
|
if (application.HideMainWindow)
|
||||||
@@ -42,6 +46,20 @@ namespace FileConverter
|
|||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
public string InformationMessage
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.informationMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private set
|
||||||
|
{
|
||||||
|
this.informationMessage = value;
|
||||||
|
this.OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void OnNewVersionReleased(UpgradeVersionDescription upgradeVersionDescription)
|
public void OnNewVersionReleased(UpgradeVersionDescription upgradeVersionDescription)
|
||||||
{
|
{
|
||||||
this.ShowUpgradeWindow();
|
this.ShowUpgradeWindow();
|
||||||
@@ -121,5 +139,30 @@ namespace FileConverter
|
|||||||
application?.CancelAutoExit();
|
application?.CancelAutoExit();
|
||||||
this.upgradeWindow.Show();
|
this.upgradeWindow.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Application_OnApplicationTerminate(object sender, ApplicationTerminateArgs eventArgs)
|
||||||
|
{
|
||||||
|
if (float.IsNaN(eventArgs.RemainingTimeBeforeTermination))
|
||||||
|
{
|
||||||
|
this.InformationMessage = string.Empty;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int remaingingSeconds = (int)eventArgs.RemainingTimeBeforeTermination;
|
||||||
|
|
||||||
|
if (remaingingSeconds >= 2)
|
||||||
|
{
|
||||||
|
this.InformationMessage = string.Format("The application will automatically terminate in {0} seconds.", remaingingSeconds);
|
||||||
|
}
|
||||||
|
else if (remaingingSeconds == 1)
|
||||||
|
{
|
||||||
|
this.InformationMessage = string.Format("The application will automatically terminate in {0} second.", remaingingSeconds);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (remaingingSeconds <= 0)
|
||||||
|
{
|
||||||
|
this.InformationMessage = string.Format("The application is terminating.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -110,6 +110,52 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate x:Key="GifSettingsDataTemplate">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Label Content="Frames per second :" Grid.Row="0" Grid.Column="0" HorizontalContentAlignment="Right"/>
|
||||||
|
<Slider x:Name="QualitySlider" Grid.Row="0" Grid.Column="1" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoFramesPerSecond|System.Int32, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}"
|
||||||
|
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="10" SelectionEnd="20" Minimum="1" Maximum="30" TickPlacement="BottomRight" SmallChange="1" LargeChange="4" TickFrequency="1" Foreground="#004B82" />
|
||||||
|
|
||||||
|
<!-- Scale -->
|
||||||
|
<Label Content="Scale :" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right"/>
|
||||||
|
<Grid Grid.Row="1" Grid.Column="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="60"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
|
||||||
|
<Label Grid.Column="1">
|
||||||
|
<Label.Content>
|
||||||
|
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
|
||||||
|
<MultiBinding.ConverterParameter>{0:P0}</MultiBinding.ConverterParameter>
|
||||||
|
<Binding ElementName="ScaleSlider" Path="Value" Mode="OneWay"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Label.Content>
|
||||||
|
</Label>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!--Rotate-->
|
||||||
|
<Label Content="Rotate :" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right"/>
|
||||||
|
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||||
|
<RadioButton Content="None" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|0, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.ZeroDegreesRotationTooltip}" Margin="0,7,7,7"/>
|
||||||
|
<RadioButton Content="90°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|90, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.NinetyDegreesRotationTooltip}" Margin="7"/>
|
||||||
|
<RadioButton Content="180°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|180, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.OneEightyDegreesRotationTooltip}" Margin="7"/>
|
||||||
|
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="AviSettingsDataTemplate">
|
<DataTemplate x:Key="AviSettingsDataTemplate">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -126,7 +172,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<DockPanel Grid.Row="0" Grid.Column="0">
|
<DockPanel Grid.Row="0" Grid.Column="0">
|
||||||
<Label Content="Video" FontWeight="Bold" />
|
<Label Content="Video" FontWeight="Bold" Margin="17,0,0,0" />
|
||||||
<Label Content="(Xvid)" FontWeight="Light" Foreground="#004B82" />
|
<Label Content="(Xvid)" FontWeight="Light" Foreground="#004B82" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
@@ -161,13 +207,14 @@
|
|||||||
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
|
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<DockPanel Grid.Row="4" Grid.Column="0" >
|
<DockPanel Grid.Row="4" Grid.Column="0">
|
||||||
<Label Content="Audio" FontWeight="Bold" />
|
<CheckBox IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,6,0,0" />
|
||||||
<Label Content="(Mp3)" FontWeight="Light" Foreground="#004B82" />
|
<Label Content="Audio" FontWeight="Bold" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
|
<Label Content="(Mp3)" FontWeight="Light" Foreground="#004B82" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
<Label Content="Quality :" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Right"/>
|
<Label Content="Quality :" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Right" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
<controls:EncodingQualitySliderControl Grid.Row="5" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="Mp3VBR"
|
<controls:EncodingQualitySliderControl Grid.Row="5" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="Mp3VBR" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"
|
||||||
Bitrate="{Binding SelectedPreset.Settings, ConverterParameter=AudioBitrate|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" />
|
Bitrate="{Binding SelectedPreset.Settings, ConverterParameter=AudioBitrate|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -189,7 +236,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<DockPanel Grid.Row="0" Grid.Column="0">
|
<DockPanel Grid.Row="0" Grid.Column="0">
|
||||||
<Label Content="Video" FontWeight="Bold" />
|
<Label Content="Video" FontWeight="Bold" Margin="17,0,0,0"/>
|
||||||
<Label Content="(H.264)" FontWeight="Light" Foreground="#004B82" />
|
<Label Content="(H.264)" FontWeight="Light" Foreground="#004B82" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
@@ -236,17 +283,81 @@
|
|||||||
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
|
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<DockPanel Grid.Row="5" Grid.Column="0" >
|
<DockPanel Grid.Row="5" Grid.Column="0">
|
||||||
<Label Content="Audio" FontWeight="Bold" />
|
<CheckBox IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,6,0,0" />
|
||||||
<Label Content="(AAC)" FontWeight="Light" Foreground="#004B82" />
|
<Label Content="Audio" FontWeight="Bold" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
|
<Label Content="(AAC)" FontWeight="Light" Foreground="#004B82" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
<Label Content="Quality :" Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Right"/>
|
<Label Content="Quality :" Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Right" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
<controls:EncodingQualitySliderControl Grid.Row="6" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="AacVBR"
|
<controls:EncodingQualitySliderControl Grid.Row="6" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="AacVBR" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"
|
||||||
Bitrate="{Binding SelectedPreset.Settings, ConverterParameter=AudioBitrate|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay, TargetNullValue=128}" />
|
Bitrate="{Binding SelectedPreset.Settings, ConverterParameter=AudioBitrate|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay, TargetNullValue=128}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate x:Key="WebmSettingsDataTemplate">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<DockPanel Grid.Row="0" Grid.Column="0">
|
||||||
|
<Label Content="Video" FontWeight="Bold" Margin="17,0,0,0" />
|
||||||
|
<Label Content="(vp9)" FontWeight="Light" Foreground="#004B82" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<Label Content="Quality :" Grid.Row="1" Grid.Column="0" ToolTip="{x:Static project:Resources.VideoEncodingQualityTooltip}" HorizontalContentAlignment="Right"/>
|
||||||
|
<Slider x:Name="QualitySlider" Grid.Row="1" Grid.Column="1" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}"
|
||||||
|
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="40" Minimum="0" Maximum="63" TickPlacement="BottomRight" SmallChange="1" LargeChange="5" TickFrequency="1" Foreground="#004B82" />
|
||||||
|
|
||||||
|
<!-- Scale -->
|
||||||
|
<Label Content="Scale :" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right"/>
|
||||||
|
<Grid Grid.Row="2" Grid.Column="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="60"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=VideoScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
|
||||||
|
<Label Grid.Column="1">
|
||||||
|
<Label.Content>
|
||||||
|
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
|
||||||
|
<MultiBinding.ConverterParameter>{0:P0}</MultiBinding.ConverterParameter>
|
||||||
|
<Binding ElementName="ScaleSlider" Path="Value" Mode="OneWay"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Label.Content>
|
||||||
|
</Label>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!--Rotate-->
|
||||||
|
<Label Content="Rotate :" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right"/>
|
||||||
|
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
|
||||||
|
<RadioButton Content="None" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|0, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.ZeroDegreesRotationTooltip}" Margin="0,7,7,7"/>
|
||||||
|
<RadioButton Content="90°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|90, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.NinetyDegreesRotationTooltip}" Margin="7"/>
|
||||||
|
<RadioButton Content="180°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|180, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.OneEightyDegreesRotationTooltip}" Margin="7"/>
|
||||||
|
<RadioButton Content="270°" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=VideoRotation|270, Converter={StaticResource ConversionSettingsEquals}, ElementName=window, Mode=TwoWay}" ToolTip="{x:Static project:Resources.TwoSeventyDegreesRotationTooltip}" Margin="7"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<DockPanel Grid.Row="4" Grid.Column="0">
|
||||||
|
<CheckBox IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,6,0,0" />
|
||||||
|
<Label Content="Audio" FontWeight="Bold" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
|
<Label Content="(Ogg vorbis)" FontWeight="Light" Foreground="#004B82" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<Label Content="Quality :" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Right" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"/>
|
||||||
|
<controls:EncodingQualitySliderControl Grid.Row="5" Grid.Column="1" x:Name="EncodingQualitySlider" EncodingMode="OggVBR" IsEnabled="{Binding SelectedPreset.Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=OneWay}"
|
||||||
|
Bitrate="{Binding SelectedPreset.Settings, ConverterParameter=AudioBitrate|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" />
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="JpgSettingsDataTemplate">
|
<DataTemplate x:Key="JpgSettingsDataTemplate">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -343,13 +454,15 @@
|
|||||||
DefaultDataTemplate="{StaticResource EmptyDataTemplate}"
|
DefaultDataTemplate="{StaticResource EmptyDataTemplate}"
|
||||||
AacSettingsDataTemplate="{StaticResource AacSettingsDataTemplate}"
|
AacSettingsDataTemplate="{StaticResource AacSettingsDataTemplate}"
|
||||||
AviSettingsDataTemplate="{StaticResource AviSettingsDataTemplate}"
|
AviSettingsDataTemplate="{StaticResource AviSettingsDataTemplate}"
|
||||||
|
GifSettingsDataTemplate="{StaticResource GifSettingsDataTemplate}"
|
||||||
JpgSettingsDataTemplate="{StaticResource JpgSettingsDataTemplate}"
|
JpgSettingsDataTemplate="{StaticResource JpgSettingsDataTemplate}"
|
||||||
MkvSettingsDataTemplate="{StaticResource MkvSettingsDataTemplate}"
|
MkvSettingsDataTemplate="{StaticResource MkvSettingsDataTemplate}"
|
||||||
Mp3SettingsDataTemplate="{StaticResource Mp3SettingsDataTemplate}"
|
Mp3SettingsDataTemplate="{StaticResource Mp3SettingsDataTemplate}"
|
||||||
Mp4SettingsDataTemplate="{StaticResource MkvSettingsDataTemplate}"
|
Mp4SettingsDataTemplate="{StaticResource MkvSettingsDataTemplate}"
|
||||||
OggSettingsDataTemplate="{StaticResource OggSettingsDataTemplate}"
|
OggSettingsDataTemplate="{StaticResource OggSettingsDataTemplate}"
|
||||||
PngSettingsDataTemplate="{StaticResource PngSettingsDataTemplate}"
|
PngSettingsDataTemplate="{StaticResource PngSettingsDataTemplate}"
|
||||||
WavSettingsDataTemplate="{StaticResource WavSettingsDataTemplate}" />
|
WavSettingsDataTemplate="{StaticResource WavSettingsDataTemplate}"
|
||||||
|
WebmSettingsDataTemplate="{StaticResource WebmSettingsDataTemplate}" />
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Window.Title>
|
<Window.Title>
|
||||||
<Binding Converter="{StaticResource ApplicationVersionToApplicationName}" Mode="OneWay" Path="(local:Application.ApplicationVersion)"/>
|
<Binding Converter="{StaticResource ApplicationVersionToApplicationName}" Mode="OneWay" Path="(local:Application.ApplicationVersion)"/>
|
||||||
|
|||||||
@@ -42,10 +42,12 @@ namespace FileConverter
|
|||||||
OutputType.Wav,
|
OutputType.Wav,
|
||||||
OutputType.Mkv,
|
OutputType.Mkv,
|
||||||
OutputType.Mp4,
|
OutputType.Mp4,
|
||||||
|
OutputType.Webm,
|
||||||
OutputType.Avi,
|
OutputType.Avi,
|
||||||
OutputType.Ico,
|
OutputType.Ico,
|
||||||
OutputType.Jpg,
|
OutputType.Jpg,
|
||||||
OutputType.Png,
|
OutputType.Png,
|
||||||
|
OutputType.Gif,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.OutputFormats.ItemsSource = outputTypes;
|
this.OutputFormats.ItemsSource = outputTypes;
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## Version 0.7
|
||||||
|
- New: Possibility to encode videos using VP9 video codec and Ogg vorbis audio codec in a webm container.
|
||||||
|
- New: Possibility to convert videos and images to gif.
|
||||||
|
- New: Possibility to convert gif files to videos.
|
||||||
|
- New: Possibility to remove audio from video files (mkv, mp4, avi and webm output file formats).
|
||||||
|
- New: Add feedback to indicate that the application will automatically terminate (after conversions) (github issue #1).
|
||||||
|
- New: Support new video input formats: ogv and mpeg.
|
||||||
|
- New: Support new audio input format: oga.
|
||||||
|
- New: Possibility to cancel some conversion jobs (gif/cda and image conversion jobs are not cancelable for now).
|
||||||
|
- Fixed: Issue where video can't be compressed using H.264 codec (mp4 or mkv presets) when its size (width or height) is not divisible by 2 (append a lot when the user tries to scale a video) (github issue #2).
|
||||||
|
- Fixed: Issue where "Clamp to power of 2 size" option didn't work well with images that already have a power of 2 size.
|
||||||
|
- Fixed: Issue where conversion progress was not updated correctly (for converters based on ffmpeg).
|
||||||
|
- Fixed: Issue where converting a video into the ogg format did not extract audio in an ogg file correctly.
|
||||||
|
- Fixed: Issue where simultaneous read on the same CD drive was performed when files from differents conversions come from the same drive (other than cda extraction preset).
|
||||||
|
- Fixed: Issue where the path generator was unable to create a valid path if the input file was at the root of a drive.
|
||||||
|
- Tech: Annotate the conversion presets to know if there are default preset or user preset in order to improve the upgrade process.
|
||||||
|
|
||||||
## Version 0.6
|
## Version 0.6
|
||||||
- New: Possibility to encode videos using H.264 video codec and AAC audio codec in a mp4 container (more portable than mkv).
|
- New: Possibility to encode videos using H.264 video codec and AAC audio codec in a mp4 container (more portable than mkv).
|
||||||
- New: Support new image input file formats: psd, tga, svg and exr.
|
- New: Support new image input file formats: psd, tga, svg and exr.
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ABSTRACT_ACCESSORHOLDER_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ABSTRACT_ACCESSORHOLDER_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ACCESSOR_ATTRIBUTE_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ACCESSOR_ATTRIBUTE_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LINES/@EntryValue">False</s:Boolean>
|
||||||
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForBuiltInTypes/@EntryValue">UseExplicitType</s:String>
|
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForBuiltInTypes/@EntryValue">UseExplicitType</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForOtherTypes/@EntryValue">UseExplicitType</s:String>
|
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForOtherTypes/@EntryValue">UseExplicitType</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForSimpleTypes/@EntryValue">UseExplicitType</s:String>
|
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForSimpleTypes/@EntryValue">UseExplicitType</s:String>
|
||||||
@@ -20,6 +21,42 @@
|
|||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=MethodPropertyEvent/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb_AaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=MethodPropertyEvent/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb_AaBb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FCONSTRUCTOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FFUNCTION/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FGLOBAL_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FLABEL/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FLOCAL_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FOBJECT_005FPROPERTY_005FOF_005FFUNCTION/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FPARAMETER/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FCLASS/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FENUM/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FENUM_005FMEMBER/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FINTERFACE/@EntryIndexedValue"><Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FINTERFACE_005FFOR_005FJS_005FGLOBAL_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FMODULE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FMODULE_005FEXPORTED/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FMODULE_005FLOCAL/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPRIVATE_005FMEMBER_005FACCESSOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPRIVATE_005FSTATIC_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPRIVATE_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPRIVATE_005FTYPE_005FMETHOD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPROTECTED_005FMEMBER_005FACCESSOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPROTECTED_005FSTATIC_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPROTECTED_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPROTECTED_005FTYPE_005FMETHOD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FMEMBER_005FACCESSOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FSTATIC_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FTYPE_005FMETHOD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FTYPE_005FPARAMETER/@EntryIndexedValue"><Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FHTML_005FCONTROL/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FTAG_005FNAME/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FTAG_005FPREFIX/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=NAMESPACE_005FALIAS/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/UpdatesManger/IsDownloadUpdateDataAllowed/@EntryValue">False</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/Environment/UpdatesManger/IsDownloadUpdateDataAllowed/@EntryValue">False</s:Boolean></wpf:ResourceDictionary>
|
||||||
@@ -12,11 +12,12 @@
|
|||||||
|
|
||||||
<!-- Upgrade documentation: http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html -->
|
<!-- Upgrade documentation: http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html -->
|
||||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||||
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="0.6" Manufacturer="AAllard" UpgradeCode="e3ca717b-a897-418a-bbef-5c7e35c76e4b">
|
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="0.7" Manufacturer="AAllard" UpgradeCode="e3ca717b-a897-418a-bbef-5c7e35c76e4b">
|
||||||
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />
|
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />
|
||||||
|
|
||||||
<Icon Id="icon.ico" SourceFile="..\Resources\ApplicationIcon.ico"/>
|
<Icon Id="icon.ico" SourceFile="..\Resources\ApplicationIcon.ico"/>
|
||||||
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
|
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
|
||||||
|
<SetProperty Id="ARPINSTALLLOCATION" Value="[ApplicationFolder]" After="CostFinalize" />
|
||||||
|
|
||||||
<MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
|
<MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
|
|
||||||
<CustomAction Id="InstallShell" FileKey="srm.exe" ExeCommand='install "[INSTALLFOLDER]\FileConverterExtension.dll" -codebase' Execute="deferred" Return="check" Impersonate="no" />
|
<CustomAction Id="InstallShell" FileKey="srm.exe" ExeCommand='install "[INSTALLFOLDER]\FileConverterExtension.dll" -codebase' Execute="deferred" Return="check" Impersonate="no" />
|
||||||
<CustomAction Id="UninstallShell" FileKey="srm.exe" ExeCommand='uninstall "[INSTALLFOLDER]\FileConverterExtension.dll"' Execute="deferred" Return="check" Impersonate="no" />
|
<CustomAction Id="UninstallShell" FileKey="srm.exe" ExeCommand='uninstall "[INSTALLFOLDER]\FileConverterExtension.dll"' Execute="deferred" Return="check" Impersonate="no" />
|
||||||
<CustomAction Id='PostInstallInit' FileKey='FileConverter.exe' ExeCommand='--post-install-init' Return='asyncNoWait' />
|
<CustomAction Id='PostInstallInit' FileKey='FileConverter.exe' ExeCommand='--post-install-init' Return='asyncWait' />
|
||||||
|
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<Custom Action="InstallShell" After="InstallFiles">NOT Installed</Custom>
|
<Custom Action="InstallShell" After="InstallFiles">NOT Installed</Custom>
|
||||||
@@ -111,7 +112,7 @@
|
|||||||
<Component Id="RegistryEntries" Guid="{C3EF3D67-0206-4DBD-B2EA-78FF2E290093}">
|
<Component Id="RegistryEntries" Guid="{C3EF3D67-0206-4DBD-B2EA-78FF2E290093}">
|
||||||
<RegistryKey Root="HKCU" Key="Software\FileConverter" Action="createAndRemoveOnUninstall">
|
<RegistryKey Root="HKCU" Key="Software\FileConverter" Action="createAndRemoveOnUninstall">
|
||||||
<RegistryValue Name="Path" Type="string" Value="[INSTALLFOLDER]FileConverter.exe"/>
|
<RegistryValue Name="Path" Type="string" Value="[INSTALLFOLDER]FileConverter.exe"/>
|
||||||
<RegistryValue Name="CompatibleInputExtensions" Type="string" Value="3gp;aac;aiff;ape;avi;bik;bmp;cda;exr;flac;flv;ico;jpg;jpeg;m4a;m4v;mkv;mov;mp3;mp4;ogg;png;psd;svg;tga;tiff;wav;webm;wma;wmv"/>
|
<RegistryValue Name="CompatibleInputExtensions" Type="string" Value="3gp;aac;aiff;ape;avi;bik;bmp;cda;exr;flac;flv;gif;ico;jpg;jpeg;m4a;m4v;mkv;mov;mp3;mp4;mpeg;oga;ogg;ogv;png;psd;svg;tga;tiff;vob;wav;webm;wma;wmv"/>
|
||||||
</RegistryKey>
|
</RegistryKey>
|
||||||
</Component>
|
</Component>
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
|
|||||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="48"
|
||||||
|
height="48"
|
||||||
|
viewBox="0 0 48.000001 48.000001"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="CancelIcon.svg"
|
||||||
|
inkscape:export-filename="C:\Users\aallard\Documents\GitHub\FileConverter\Resources\CancelIcon.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="8"
|
||||||
|
inkscape:cx="29.858285"
|
||||||
|
inkscape:cy="23.115955"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
inkscape:window-width="1853"
|
||||||
|
inkscape:window-height="1058"
|
||||||
|
inkscape:window-x="59"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-1004.3622)">
|
||||||
|
<path
|
||||||
|
style="opacity:1;fill:#d32f2f;fill-opacity:0.94117647;stroke:none"
|
||||||
|
d="M 24 0 A 24 24 0 0 0 0 24 A 24 24 0 0 0 24 48 A 24 24 0 0 0 48 24 A 24 24 0 0 0 24 0 z M 24 4 A 20 20 0 0 1 44 24 A 20 20 0 0 1 40.560547 35.203125 L 10.087891 9.6328125 A 20 20 0 0 1 24 4 z M 7.4394531 12.796875 L 37.912109 38.367188 A 20 20 0 0 1 24 44 A 20 20 0 0 1 4 24 A 20 20 0 0 1 7.4394531 12.796875 z "
|
||||||
|
transform="translate(0,1004.3622)"
|
||||||
|
id="path3338" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 551 B |
@@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="48"
|
||||||
|
height="48"
|
||||||
|
viewBox="0 0 48.000001 48.000001"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="FailIcon.svg"
|
||||||
|
inkscape:export-filename="C:\Users\Adrien\Documents\GitHub\FileConverter\Resources\FailIcon.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="8"
|
||||||
|
inkscape:cx="29.858285"
|
||||||
|
inkscape:cy="28.115955"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
inkscape:window-width="1289"
|
||||||
|
inkscape:window-height="745"
|
||||||
|
inkscape:window-x="69"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-1004.3622)">
|
||||||
|
<flowRoot
|
||||||
|
xml:space="preserve"
|
||||||
|
id="flowRoot4348"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#f44336;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||||
|
transform="translate(0,1004.3622)"><flowRegion
|
||||||
|
id="flowRegion4350"><rect
|
||||||
|
id="rect4352"
|
||||||
|
width="24"
|
||||||
|
height="44.75"
|
||||||
|
x="12"
|
||||||
|
y="2.625"
|
||||||
|
style="fill:#f44336;fill-opacity:1;" /></flowRegion><flowPara
|
||||||
|
id="flowPara4354">!</flowPara></flowRoot> <flowRoot
|
||||||
|
xml:space="preserve"
|
||||||
|
id="flowRoot4356"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#d32f2f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||||
|
transform="matrix(1.6923977,0,0,1.6923977,15.004532,977.45445)"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90"><flowRegion
|
||||||
|
id="flowRegion4358"><rect
|
||||||
|
id="rect4360"
|
||||||
|
width="49.5"
|
||||||
|
height="47.5"
|
||||||
|
x="0.875"
|
||||||
|
y="0.875"
|
||||||
|
style="fill:#d32f2f;fill-opacity:1;" /></flowRegion><flowPara
|
||||||
|
id="flowPara4362"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'MS UI Gothic';-inkscape-font-specification:'MS UI Gothic';fill:#d32f2f;fill-opacity:1;">!</flowPara></flowRoot> </g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 376 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="48"
|
||||||
|
height="48"
|
||||||
|
viewBox="0 0 48.000001 48.000001"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="SuccessIcon.svg"
|
||||||
|
inkscape:export-filename="C:\Users\Adrien\Documents\GitHub\FileConverter\Resources\SuccessIcon.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="8"
|
||||||
|
inkscape:cx="29.858285"
|
||||||
|
inkscape:cy="28.115955"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
inkscape:window-width="1289"
|
||||||
|
inkscape:window-height="745"
|
||||||
|
inkscape:window-x="69"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-1004.3622)">
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#4caf50;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 2.125,1031.1122 13.625,19 29.875,-43.5"
|
||||||
|
id="path3342"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -1,4 +1,4 @@
|
|||||||
<Version>
|
<Version>
|
||||||
<Latest Major="0" Minor="5" Patch="0"/>
|
<Latest Major="0" Minor="6" Patch="0"/>
|
||||||
<URL>http://github.com/Tichau/FileConverter/releases/download/v0.5/FileConverter-0.5-x64-setup.msi</URL>
|
<URL>https://github.com/Tichau/FileConverter/releases/download/v0.6/FileConverter-0.6-x64-setup.msi</URL>
|
||||||
</Version>
|
</Version>
|
||||||