return metadata
file_path = 'Caleidoscopio.S01E02.WEBDL.ITA.HD.mkv.mp4' metadata = extract_metadata(file_path) for key, value in metadata.items(): print(f"{key}: {value}")
pip install ffmpeg-python Then, a simple Python script to extract metadata could look like this:
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)