2026.7.1小更新

This commit is contained in:
2026-07-01 09:33:56 +08:00
parent 54ffcce39b
commit 5ce30af0bb
+4 -2
View File
@@ -162,8 +162,10 @@ class VideoStreaming:
if self.is_rtsp: if self.is_rtsp:
# 设置 RTSP 缓冲区大小(只保留 1 帧,降低延迟) # 设置 RTSP 缓冲区大小(只保留 1 帧,降低延迟)
self.cap.set(cv2.CAP_PROP_BUFFERSIZE, 1) self.cap.set(cv2.CAP_PROP_BUFFERSIZE, 1)
self.cap.set(cv2.CAP_PROP_FOURCC, try:
cv2.VideoWriter_fourcc('H', '2', '6', '4')) self.cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('H', '2', '6', '4'))
except Exception:
pass # 编码设置失败不影响连接
if "?" not in self.video_source: if "?" not in self.video_source:
self.video_source += "?tcp" self.video_source += "?tcp"
else: else: