aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-06-10 14:24:53 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-06-10 14:24:53 -0400
commit2c54390c38e6ecd061645713c5f690e3f9b3ccf2 (patch)
tree964bb2d52367017ec22f0dc2a974f2d3bb03a6d6 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
parent9907f47a9b471f7d56d6f8861ed87e304e298d54 (diff)
enable h264_cuvid decoder
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index f790bb1a1..c348ffda7 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -1806,6 +1806,20 @@ namespace MediaBrowser.Controller.MediaEncoding
break;
}
}
+
+ else if (string.Equals(encodingOptions.HardwareAccelerationType, "nvenc", StringComparison.OrdinalIgnoreCase))
+ {
+ switch (state.MediaSource.VideoStream.Codec.ToLower())
+ {
+ case "avc":
+ case "h264":
+ if (_mediaEncoder.SupportsDecoder("h264_cuvid"))
+ {
+ return "-c:v h264_cuvid ";
+ }
+ break;
+ }
+ }
}
// leave blank so ffmpeg will decide