提高性能
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[config]
|
||||
urls=rtsp://admin:xkrs0425@172.16.20.15:554/D6/sub/av_stream,rtsp://admin:qd123456@172.16.20.13:554/D4/sub/av_stream
|
||||
wss=ws://172.16.10.227:8099/websocket/message/rtsp/d6,ws://172.16.10.227:8099/websocket/message/rtsp/d5
|
||||
api=http://172.16.10.227:8099/business/t_monitor_ai/add
|
||||
wss=ws://172.16.10.97:8099/websocket/message/rtsp/d6,ws://172.16.10.97:8099/websocket/message/rtsp/d5
|
||||
api=http://172.16.10.97:8099/business/t_monitor_ai/add
|
2
main.py
2
main.py
@@ -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',
|
||||
'-'
|
||||
]
|
||||
|
Reference in New Issue
Block a user