Декабрь 14, 2025, 13:28:29
|
|||
|
|||
| Новости: |
| Начало | Game Maker | Помощь | Правила форума | Поиск | Календарь | Войти | Регистрация |
import ffmpeg
pip install ffmpeg-python Then, a simple Python script to extract metadata could look like this: Caleidoscopio.S01E02.WEBDL.ITA.HD.mkv.mp4
metadata = { 'duration': probe['format']['duration'], 'resolution': f"{video_stream['width']}x{video_stream['height']}", 'video_codec': video_stream['codec_name'], 'audio_codec': audio_stream['codec_name'] if audio_stream else None, } import ffmpeg pip install ffmpeg-python Then, a simple
file_path = 'Caleidoscopio.S01E02.WEBDL.ITA.HD.mkv.mp4' metadata = extract_metadata(file_path) for key, value in metadata.items(): print(f"{key}: {value}") import ffmpeg pip install ffmpeg-python Then
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)