aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-15 13:14:02 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-15 13:14:02 -0400
commit1e299549a8d459ffa6931617bb3d281f696e6062 (patch)
tree78b0738ba42347521227b28ef5c4fe5bb36aade4 /MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
parent780d5b914cc22bdf88477761e60c5de64b20504d (diff)
parent3dadeeae7b12be43ace187dede3d451e867b6c24 (diff)
Merge branch 'beta'
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
index 263efbb62..d551d5c8c 100644
--- a/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
@@ -366,9 +366,14 @@ namespace MediaBrowser.MediaEncoding.Encoder
/// <returns>System.String.</returns>
protected string GetVideoDecoder(EncodingJob state)
{
- if (string.Equals(GetEncodingOptions().HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase))
{
- if (state.VideoStream != null && !string.IsNullOrWhiteSpace(state.VideoStream.Codec))
+ return null;
+ }
+
+ if (state.VideoStream != null && !string.IsNullOrWhiteSpace(state.VideoStream.Codec))
+ {
+ if (string.Equals(GetEncodingOptions().HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
{
switch (state.MediaSource.VideoStream.Codec.ToLower())
{
@@ -376,7 +381,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
case "h264":
if (MediaEncoder.SupportsDecoder("h264_qsv"))
{
- return "-c:v h264_qsv ";
+ // Seeing stalls and failures with decoding. Not worth it compared to encoding.
+ //return "-c:v h264_qsv ";
}
break;
case "mpeg2video":
@@ -1002,7 +1008,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
// Boost volume to 200% when downsampling from 6ch to 2ch
if (channels.HasValue && channels.Value <= 2)
{
- if (state.AudioStream != null && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5)
+ if (state.AudioStream != null && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5 && !GetEncodingOptions().DownMixAudioBoost.Equals(1))
{
volParam = ",volume=" + GetEncodingOptions().DownMixAudioBoost.ToString(UsCulture);
}