aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder')
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs1
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs16
2 files changed, 12 insertions, 5 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
index ae0284e3ab..5f0779dc7b 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
@@ -69,6 +69,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
"aac_at",
"libfdk_aac",
"ac3",
+ "alac",
"dca",
"libmp3lame",
"libopus",
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index 8278015d68..8076780250 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();