浏览代码

fix: rtsp live stream ffprobe timeout (#11279)

Caidy 1 年之前
父节点
当前提交
4440600379
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

+ 5 - 0
MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

@@ -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;
         }