Optimize streaming latency: remove -re flag, add keyframe settings, reduce HLS segments, faster ICE timeout
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 21s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 21s
This commit is contained in:
@@ -22,8 +22,8 @@ rtspTransports: [tcp, udp]
|
||||
hls: yes
|
||||
hlsAddress: :8888
|
||||
hlsAllowOrigin: '*'
|
||||
hlsSegmentCount: 10
|
||||
hlsSegmentDuration: 2s
|
||||
hlsSegmentCount: 3
|
||||
hlsSegmentDuration: 1s
|
||||
hlsPartDuration: 200ms
|
||||
hlsAlwaysRemux: yes
|
||||
|
||||
|
@@ -9,7 +9,6 @@ fi
|
||||
|
||||
# Start ffmpeg with drawtext filter for score overlay
|
||||
exec ffmpeg \
|
||||
-re \
|
||||
-rtsp_transport tcp \
|
||||
-i rtsp://localhost:8554/court \
|
||||
-vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf:\
|
||||
@@ -25,7 +24,11 @@ y=10" \
|
||||
-c:v libx264 \
|
||||
-preset ultrafast \
|
||||
-tune zerolatency \
|
||||
-g 30 \
|
||||
-keyint_min 30 \
|
||||
-b:v 2M \
|
||||
-maxrate 2M \
|
||||
-bufsize 1M \
|
||||
-f rtsp \
|
||||
-rtsp_transport tcp \
|
||||
rtsp://localhost:8554/court_h264
|
@@ -230,8 +230,8 @@
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
// Timeout after 2 seconds
|
||||
setTimeout(resolve, 2000);
|
||||
// Timeout after 500ms for faster connection
|
||||
setTimeout(resolve, 500);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user