import cv2
import numpy as np

cap = cv2.VideoCapture("output/サカナクション／新宝島(エレキギターTAB) 難易度★★★ sakanaction shintakarajima.mp4")

# Skip to 30 seconds
fps = cap.get(cv2.CAP_PROP_FPS) or 30.0
cap.set(cv2.CAP_PROP_POS_FRAMES, 30 * fps)

ret, frame_30s = cap.read()
if ret:
    cv2.imwrite("C:/Users/Certes/.gemini/antigravity/brain/975cea00-dd68-4689-9ee3-f1a2408b4ee6/raw_frame_30s.png", frame_30s)
    
# Skip to 35 seconds
cap.set(cv2.CAP_PROP_POS_FRAMES, 35 * fps)
ret, frame_35s = cap.read()
if ret:
    cv2.imwrite("C:/Users/Certes/.gemini/antigravity/brain/975cea00-dd68-4689-9ee3-f1a2408b4ee6/raw_frame_35s.png", frame_35s)
    
cap.release()
print("Saved raw frames for structural analysis.")
