# Display the frame or perform analysis cv2.imshow('frame', gray)

import ffmpeg

# Get video and audio streams video_streams = [stream for stream in probe['streams'] if stream['codec_type'] == 'video'] audio_streams = [stream for stream in probe['streams'] if stream['codec_type'] == 'audio']

# Define the input file input_file = "4_Kerolay_Chaves_(White_Fairyy2).mp4" 4_Kerolay_Chaves_(White_Fairyy2).mp4

if cv2.waitKey(1) & 0xFF == ord('q'): break

while True: ret, frame = cap.read() if not ret: break