aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index 8278015d6..807678025 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -154,12 +154,12 @@ namespace MediaBrowser.MediaEncoding.Encoder
/// </summary>
public void SetFFmpegPath()
{
- // 1) Custom path stored in config/encoding xml file under tag <EncoderAppPath> takes precedence
- var ffmpegPath = _configurationManager.GetEncodingOptions().EncoderAppPath;
+ // 1) Check if the --ffmpeg CLI switch has been given
+ var ffmpegPath = _startupOptionFFmpegPath;
if (string.IsNullOrEmpty(ffmpegPath))
{
- // 2) Check if the --ffmpeg CLI switch has been given
- ffmpegPath = _startupOptionFFmpegPath;
+ // 2) Custom path stored in config/encoding xml file under tag <EncoderAppPath> should be used as a fallback
+ ffmpegPath = _configurationManager.GetEncodingOptions().EncoderAppPath;
if (string.IsNullOrEmpty(ffmpegPath))
{
// 3) Check "ffmpeg"
@@ -463,6 +463,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
extraArgs += " -user_agent " + userAgent;
}
+ if (request.MediaSource.Protocol == MediaProtocol.Rtsp)
+ {
+ extraArgs += " -rtsp_transport tcp+udp -rtsp_flags prefer_tcp";
+ }
+
return extraArgs;
}
@@ -800,6 +805,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
int maxWidth,
TimeSpan interval,
bool allowHwAccel,
+ bool enableHwEncoding,
int? threads,
int? qualityScale,
ProcessPriorityClass? priority,
@@ -828,7 +834,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
MediaPath = inputFile,
OutputVideoCodec = "mjpeg"
};
- var vidEncoder = options.AllowMjpegEncoding ? encodingHelper.GetVideoEncoder(jobState, options) : jobState.OutputVideoCodec;
+ var vidEncoder = enableHwEncoding ? encodingHelper.GetVideoEncoder(jobState, options) : jobState.OutputVideoCodec;
// Get input and filter arguments
var inputArg = encodingHelper.GetInputArgument(jobState, options, container).Trim();