diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-03-01 15:29:42 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-03-01 15:29:42 -0500 |
| commit | a181425e54d2ae63e2f8af309345b701014857ce (patch) | |
| tree | a842abaf29731cd03d6e72cca5b62289929c17b5 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | 5d094874e5d94b4dabc8f5499fe6a879df5dfd23 (diff) | |
omit input container when hw encoding
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index ad61f3e73..18508a399 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -154,10 +154,6 @@ 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)) { @@ -171,12 +167,21 @@ namespace MediaBrowser.Controller.MediaEncoding { return null; } + if (string.Equals(container, "mpg", StringComparison.OrdinalIgnoreCase)) + { + return null; + } + if (string.Equals(container, "mpeg", StringComparison.OrdinalIgnoreCase)) + { + return null; + } return container; } public string GetDecoderFromCodec(string codec) { + // For these need to find out the ffmpeg names if (string.Equals(codec, "mp2", StringComparison.OrdinalIgnoreCase)) { return null; @@ -185,6 +190,10 @@ namespace MediaBrowser.Controller.MediaEncoding { return null; } + if (string.Equals(codec, "eac3", StringComparison.OrdinalIgnoreCase)) + { + return null; + } return codec; } @@ -1494,7 +1503,7 @@ namespace MediaBrowser.Controller.MediaEncoding //inputModifier += " -noaccurate_seek"; } - if (!string.IsNullOrWhiteSpace(state.InputContainer) && state.VideoType == VideoType.VideoFile) + if (!string.IsNullOrWhiteSpace(state.InputContainer) && state.VideoType == VideoType.VideoFile && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType)) { var inputFormat = GetInputFormat(state.InputContainer); if (!string.IsNullOrWhiteSpace(inputFormat)) @@ -1504,7 +1513,7 @@ namespace MediaBrowser.Controller.MediaEncoding } // 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) + if (state.RunTimeTicks.HasValue && state.VideoType == VideoType.VideoFile && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType)) { foreach (var stream in state.MediaSource.MediaStreams) { |
