| import cv2 | |
| import sys | |
| video_path = "data/sl/0723pre_data_v1/videos/chunk-000/observation.images.cam_high/episode_000045.mp4" # Replace with your actual video path | |
| video_path = 'data/test_aloha_singlearm/videos/chunk-000/observation.images.cam_high/episode_000000.mp4' | |
| print("OpenCV build info:") | |
| print(cv2.getBuildInformation()) | |
| cap = cv2.VideoCapture(video_path) | |
| if not cap.isOpened(): | |
| print(f"Error: Failed to open video file: {video_path}") | |
| sys.exit(1) | |
| ret, frame = cap.read() | |
| if not ret: | |
| print("Error: Unable to read the first frame of the video.") | |
| cap.release() | |
| sys.exit(1) | |
| print("Success: Video file opened and first frame read successfully.") | |
| cap.release() | |