From 5fa3817a7667b5de8822ed436b8a66bd05a1afde Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 26 Feb 2017 16:47:52 -0500 Subject: update components --- .../MediaEncoding/EncodingHelper.cs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs') 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) { -- cgit v1.2.3