diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-02-26 16:48:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-26 16:48:37 -0500 |
| commit | 2b549909754948d9bd914d9c836e982bc1f2be5c (patch) | |
| tree | a2f69870174e3cb5794ab724862f9bc00b0dc21b /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | 02481aa6249210eb040f06bb679936354a6b959e (diff) | |
| parent | 5d094874e5d94b4dabc8f5499fe6a879df5dfd23 (diff) | |
Merge pull request #2496 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 22 |
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) { |
