Neighbour_hls-1146-1.mp4

video_info = { 'duration': probe['format']['duration'], 'resolution': f"{video_stream['width']}x{video_stream['height']}", 'frame_rate': video_stream.get('r_frame_rate', 'N/A'), 'codec': video_stream['codec_name'], }

import ffmpeg

def get_video_info(video_file): probe = ffmpeg.probe(video_file) 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) Neighbour_hls-1146-1.mp4

Back
Top