瀏覽代碼

增加message 和 chunk_size

zhensolid 1 年之前
父節點
當前提交
f8df99276e
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      nginx.conf

+ 5 - 1
nginx.conf

@@ -7,9 +7,13 @@ events {
 }
 
 rtmp {
+     # 从20M增加到50M,因为4K视频帧可能会更大
+    max_message 50M;
+
     server {
         listen ${RTMP_PORT};
-        chunk_size 4000;
+        # 从4000增加到8192,提高传输效率
+        chunk_size 8192;
 
         application stream {
             live on;