提高性能

This commit is contained in:
2025-09-28 11:20:11 +08:00
parent eb17d1f7f5
commit 21c615bc7f
2 changed files with 3 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ def process_camera(rtsp_url, ws_url, api_url=None):
'-an', # 不处理音频
'-f', 'image2pipe', # 输出为图像流
'-pix_fmt', 'bgr24', # OpenCV 默认是 BGR
'-vf', f'fps=1,scale={width}:{height}', # 每秒 1 帧 + 缩放
'-vf', f'fps=15,scale={width}:{height}', # 每秒 1 帧 + 缩放
'-vcodec', 'rawvideo',
'-'
]