|
|
@ -359,7 +359,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
: "{0} -i {1} -threads 0 -v warning -print_format json -show_streams -show_format";
|
|
|
|
: "{0} -i {1} -threads 0 -v warning -print_format json -show_streams -show_format";
|
|
|
|
args = string.Format(args, probeSizeArgument, inputPath).Trim();
|
|
|
|
args = string.Format(args, probeSizeArgument, inputPath).Trim();
|
|
|
|
|
|
|
|
|
|
|
|
var processStartInfo = new ProcessStartInfo
|
|
|
|
var process = new Process
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
StartInfo = new ProcessStartInfo
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CreateNoWindow = true,
|
|
|
|
CreateNoWindow = true,
|
|
|
|
UseShellExecute = false,
|
|
|
|
UseShellExecute = false,
|
|
|
@ -373,16 +375,17 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
|
|
|
|
|
|
|
|
WindowStyle = ProcessWindowStyle.Hidden,
|
|
|
|
WindowStyle = ProcessWindowStyle.Hidden,
|
|
|
|
ErrorDialog = false,
|
|
|
|
ErrorDialog = false,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
EnableRaisingEvents = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var process = new Process { StartInfo = processStartInfo, EnableRaisingEvents = true };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (forceEnableLogging)
|
|
|
|
if (forceEnableLogging)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.LogInformation("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
|
|
|
_logger.LogInformation("{ProcessFileName} {ProcessArgs}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.LogDebug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
|
|
|
_logger.LogDebug("{ProcessFileName} {ProcessArgs}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
using (var processWrapper = new ProcessWrapper(process, this))
|
|
|
|
using (var processWrapper = new ProcessWrapper(process, this))
|
|
|
@ -568,7 +571,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var processStartInfo = new ProcessStartInfo
|
|
|
|
var process = new Process
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
StartInfo = new ProcessStartInfo
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CreateNoWindow = true,
|
|
|
|
CreateNoWindow = true,
|
|
|
|
UseShellExecute = false,
|
|
|
|
UseShellExecute = false,
|
|
|
@ -576,11 +581,12 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
Arguments = args,
|
|
|
|
Arguments = args,
|
|
|
|
WindowStyle = ProcessWindowStyle.Hidden,
|
|
|
|
WindowStyle = ProcessWindowStyle.Hidden,
|
|
|
|
ErrorDialog = false,
|
|
|
|
ErrorDialog = false,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
EnableRaisingEvents = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogDebug("{0} {1}", processStartInfo.FileName, processStartInfo.Arguments);
|
|
|
|
_logger.LogDebug("{ProcessFileName} {ProcessArguments}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
|
|
|
|
|
|
|
|
|
|
|
var process = new Process { StartInfo = processStartInfo, EnableRaisingEvents = true };
|
|
|
|
|
|
|
|
using (var processWrapper = new ProcessWrapper(process, this))
|
|
|
|
using (var processWrapper = new ProcessWrapper(process, this))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool ranToCompletion;
|
|
|
|
bool ranToCompletion;
|
|
|
@ -713,7 +719,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
|
|
|
|
|
|
|
|
bool ranToCompletion = false;
|
|
|
|
bool ranToCompletion = false;
|
|
|
|
|
|
|
|
|
|
|
|
var process = new Process { StartInfo = processStartInfo, EnableRaisingEvents = true };
|
|
|
|
var process = new Process
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
StartInfo = processStartInfo,
|
|
|
|
|
|
|
|
EnableRaisingEvents = true
|
|
|
|
|
|
|
|
};
|
|
|
|
using (var processWrapper = new ProcessWrapper(process, this))
|
|
|
|
using (var processWrapper = new ProcessWrapper(process, this))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|