file_path = 'Caleidoscopio.S01E02.WEBDL.ITA.HD.mkv.mp4' metadata = extract_metadata(file_path) for key, value in metadata.items(): print(f"{key}: {value}")
def extract_metadata(file_path): probe = ffmpeg.probe(file_path) video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None) audio_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'audio'), None) Caleidoscopio.S01E02.WEBDL.ITA.HD.mkv.mp4
First, ensure you have ffmpeg-python installed: file_path = 'Caleidoscopio