Skip to content

The Free Software Media System - Server Backend & API

Improve playback of RTSP streams

pünktchen6c9274730bd2
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 42f0dda160..bd7bbb6fe2 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -1551,6 +1551,11 @@ namespace MediaBrowser.Controller.MediaEncoding
inputModifier += " " + GetFastSeekCommandLineParameter(state.BaseRequest);
inputModifier = inputModifier.Trim();
+
+ if (state.InputProtocol == MediaProtocol.Rtsp)
+ {
+ inputModifier += " -rtsp_transport tcp";
+ }
if (!string.IsNullOrEmpty(state.InputAudioSync))
{
@@ -1562,7 +1567,7 @@ namespace MediaBrowser.Controller.MediaEncoding
inputModifier += " -vsync " + state.InputVideoSync;
}
- if (state.ReadInputAtNativeFramerate)
+ if (state.ReadInputAtNativeFramerate && state.InputProtocol != MediaProtocol.Rtsp)
{
inputModifier += " -re";
}