import ffmpeg
# Probe the file to get metadata probe = ffmpeg.probe(input_file) 4_Kerolay_Chaves_(White_Fairyy2).mp4
# Convert the frame to grayscale and apply a simple transformation gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) import ffmpeg # Probe the file to get
while True: ret, frame = cap.read() if not ret: break cv2.COLOR_BGR2GRAY) while True: ret
# Open the video file cap = cv2.VideoCapture("4_Kerolay_Chaves_(White_Fairyy2).mp4")
# 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']
if cv2.waitKey(1) & 0xFF == ord('q'): break