000.mp4

import cv2

ret, first_frame = cap.read() if ret: cv2.imwrite(output_path, first_frame) print(f"Thumbnail saved to {output_path}") else: print("Failed to read the video") 000.mp4

cap.release() print(f"Total frames: {frame_count}") import cv2 ret, first_frame = cap

frame_count = 0 while cap.isOpened(): ret, frame = cap.read() if not ret: break import cv2 ret

# Example usage video_path = "000.mp4" extract_frames(video_path) If by "create feature" you mean generating a thumbnail from the video, you could modify the script to save the first frame as a thumbnail: