File size: 652 Bytes
00c55c8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from torchcodec.decoders import VideoDecoder
import os
import glob
root = "/workspace/datasets/pi/real_world_data_cb408/guess_ball_0422/videos/chunk-000"
splits = ["observation.images.cam_high", "observation.images.cam_left_wrist", "observation.images.cam_right_wrist"]
for split in splits:
video_paths = glob.glob(os.path.join(root, split, "*.mp4"))
for path in video_paths:
if not os.path.exists(path):
print(f"不存在: {path}")
continue
try:
decoder = VideoDecoder(path)
print(f"正常: {path}")
except Exception as e:
print(f"损坏: {path} → {e}") |