Ffprobe.exe Here
ffprobe [options] input_file Without any options, ffprobe outputs a compact summary. For example:
While FFmpeg is the workhorse for converting and manipulating audio and video, ffprobe.exe is the analyst. It doesn't change a single byte of your media. Instead, it reads media files and displays their internal structure, metadata, and stream characteristics with surgical precision. For developers, quality assurance engineers, content archivists, and video enthusiasts, ffprobe is the first and most important tool in the diagnostic toolkit. ffprobe.exe
info = get_media_info("video.mp4") print(info['format']['duration']) ffprobe.exe is an essential tool for anyone who works with digital media files. It transforms opaque binary files into clear, structured, actionable data. Whether you are a video editor checking source properties, a developer building a media analyzer, or a DevOps engineer validating transcoded assets, ffprobe gives you the truth about your media. Instead, it reads media files and displays their
Start with simple -show_streams commands, then graduate to JSON output and scripting. Combine it with ffmpeg for intelligent transcoding decisions (e.g., "only re-encode if the bitrate exceeds 5 Mbps"). Master ffprobe , and you will never again wonder what's really inside a media file. It transforms opaque binary files into clear, structured,
ffprobe -show_frames -select_streams v input.mp4 Displays packet-level information (PTS, DTS, duration, size, flags). Useful for analyzing streaming issues or container structure. 5. -print_format (or -of ) Specifies output format. Essential for scripting. Supported formats: default , compact , csv , flat , ini , json , xml , old .
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'example.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Duration: 00:02:30.15, start: 0.000000, bitrate: 1024 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 896 kb/s, 30 fps, 30 tbr, 15360 tbn (default) Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) This tells you: container format, duration, bitrate, video codec (H.264), resolution (1080p), frame rate, audio codec (AAC), sample rate, and channels. 1. -show_format Displays container-level information: format name, duration, overall bitrate, number of streams, and format metadata.
For video engineers, ffprobe is superior because it understands FFmpeg’s internal structures and can analyze packets, keyframes, and encoding artifacts. PowerShell Example: Get Video Info as Object $output = ffprobe -v quiet -print_format json -show_streams -show_format input.mp4 | ConvertFrom-Json $videoStream = $output.streams | Where-Object $_.codec_type -eq "video" Write-Host "Resolution: $($videoStream.width)x$($videoStream.height)" Bash Example: Check if Video is H.265/HEVC if ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1 input.mkv | grep -q hevc; then echo "HEVC video detected" fi Python Example (subprocess) import subprocess, json def get_media_info(filepath): cmd = ['ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', filepath] result = subprocess.run(cmd, capture_output=True, text=True) return json.loads(result.stdout)