aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder')
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs7
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs10
2 files changed, 11 insertions, 6 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
index 7acff8fc8..a78d6cfd6 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
@@ -26,7 +26,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
return new Tuple<List<string>, List<string>>(decoders, encoders);
}
- public bool ValidateVersion(string encoderAppPath)
+ public bool ValidateVersion(string encoderAppPath, bool logOutput)
{
string output = string.Empty;
try
@@ -37,6 +37,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
{
}
+ if (logOutput)
+ {
+ _logger.Info("ffmpeg info: {0}", output ?? string.Empty);
+ }
+
if (string.IsNullOrWhiteSpace(output))
{
return false;
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index ef838ed3d..69c0cf15f 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -241,7 +241,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
path = newPaths.Item1;
- if (!ValidateVersion(path))
+ if (!ValidateVersion(path, true))
{
throw new ResourceNotFoundException("ffmpeg version 3.0 or greater is required.");
}
@@ -253,9 +253,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
Init();
}
- private bool ValidateVersion(string path)
+ private bool ValidateVersion(string path, bool logOutput)
{
- return new EncoderValidator(_logger).ValidateVersion(path);
+ return new EncoderValidator(_logger).ValidateVersion(path, logOutput);
}
private void ConfigureEncoderPaths()
@@ -307,7 +307,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
string encoderPath = null;
string probePath = null;
- if (_hasExternalEncoder && ValidateVersion(_originalFFMpegPath))
+ if (_hasExternalEncoder && ValidateVersion(_originalFFMpegPath, true))
{
encoderPath = _originalFFMpegPath;
probePath = _originalFFProbePath;
@@ -315,7 +315,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
if (string.IsNullOrWhiteSpace(encoderPath))
{
- if (ValidateVersion("ffmpeg") && ValidateVersion("ffprobe"))
+ if (ValidateVersion("ffmpeg", true) && ValidateVersion("ffprobe", false))
{
encoderPath = "ffmpeg";
probePath = "ffprobe";