aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs22
1 files changed, 20 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 4e1a0a8d7..ad61f3e73 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -154,6 +154,23 @@ namespace MediaBrowser.Controller.MediaEncoding
{
return "mpegts";
}
+ if (string.Equals(container, "mpg", StringComparison.OrdinalIgnoreCase))
+ {
+ return "mpeg";
+ }
+ // For these need to find out the ffmpeg names
+ if (string.Equals(container, "m2ts", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+ if (string.Equals(container, "wmv", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+ if (string.Equals(container, "vob", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
return container;
}
@@ -1477,7 +1494,7 @@ namespace MediaBrowser.Controller.MediaEncoding
//inputModifier += " -noaccurate_seek";
}
- if (!string.IsNullOrWhiteSpace(state.InputContainer))
+ if (!string.IsNullOrWhiteSpace(state.InputContainer) && state.VideoType == VideoType.VideoFile)
{
var inputFormat = GetInputFormat(state.InputContainer);
if (!string.IsNullOrWhiteSpace(inputFormat))
@@ -1486,7 +1503,8 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
- if (state.RunTimeTicks.HasValue && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType))
+ // Only do this for video files due to sometimes unpredictable codec names coming from BDInfo
+ if (state.RunTimeTicks.HasValue && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType) && state.VideoType == VideoType.VideoFile)
{
foreach (var stream in state.MediaSource.MediaStreams)
{