diff --git a/reproject/main.py b/reproject/main.py index 811775c..fa70471 100644 --- a/reproject/main.py +++ b/reproject/main.py @@ -271,6 +271,15 @@ def video_stream_thread(): out = cv2.VideoWriter(gst_pipeline, cv2.CAP_GSTREAMER, 0, float(fps), (width, height)) # out1 = cv2.VideoWriter('output1.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(): try: frame = video_queue.get(timeout=1)