test1
This commit is contained in:
@@ -271,6 +271,15 @@ def video_stream_thread():
|
|||||||
out = cv2.VideoWriter(gst_pipeline, cv2.CAP_GSTREAMER, 0, float(fps), (width, height))
|
out = cv2.VideoWriter(gst_pipeline, cv2.CAP_GSTREAMER, 0, float(fps), (width, height))
|
||||||
# out1 = cv2.VideoWriter('output1.mp4', fourcc, 30.0, (1280, 720))
|
# out1 = cv2.VideoWriter('output1.mp4', fourcc, 30.0, (1280, 720))
|
||||||
# out2 = cv2.VideoWriter('output2.mp4', fourcc, 30.0, (1280, 720))
|
# out2 = cv2.VideoWriter('output2.mp4', fourcc, 30.0, (1280, 720))
|
||||||
|
if not out.isOpened():
|
||||||
|
print("❌ [Error] 视频录制启动失败!")
|
||||||
|
print("请检查:")
|
||||||
|
print("1. 分辨率是否严格匹配?(Pipeline写了1280x720,但摄像头是这个吗?)")
|
||||||
|
print("2. 是否安装了 GStreamer 插件?")
|
||||||
|
print(f"当前使用的 Pipeline: {gst_pipeline}")
|
||||||
|
else:
|
||||||
|
print("✅ [Video] 视频录制已启动,正在写入...")
|
||||||
|
|
||||||
while not stop_event.is_set():
|
while not stop_event.is_set():
|
||||||
try:
|
try:
|
||||||
frame = video_queue.get(timeout=1)
|
frame = video_queue.get(timeout=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user