Ffprobe.exe <2025-2027>
width=1920 height=1080 r_frame_rate=30000/1001 ffprobe -v error -select_streams a:0 -show_entries stream=codec_name,sample_rate,channels -of default=noprint_wrappers=1 audio.mp3 Example 4: Get Duration and Bitrate Without Extra Text ffprobe -v error -show_entries format=duration,bit_rate -of default=noprint_wrappers=1 video.mkv Example 5: Detect if a File Contains Audio ffprobe -v error -select_streams a -show_entries stream=codec_type -of default=noprint_wrappers=1 sample.avi If nothing returns, there's no audio stream. Example 6: Extract All Metadata Tags ffprobe -v quiet -show_entries format_tags -of default=noprint_wrappers=1 input.mov Example 7: Verify HDR (High Dynamic Range) Information ffprobe -v error -select_streams v:0 -show_entries stream=color_primaries,color_transfer,color_space,pix_fmt -of default=noprint_wrappers=1 hdr_video.mkv Example 8: Analyze Packet Timestamps for A/V Sync Issues ffprobe -show_packets -select_streams v -v quiet input.ts > video_packets.txt Output Formats for Automation JSON (Recommended for Programming) ffprobe -v quiet -print_format json -show_format -show_streams input.mp4 Use jq (on Linux/macOS) or ConvertFrom-Json (PowerShell) to parse. XML ffprobe -print_format xml -show_streams input.mp4 CSV ffprobe -print_format csv -show_streams input.mp4 Flat (Key=Value) ffprobe -print_format flat -show_streams input.mp4 Advanced Use Cases 1. Batch Probing Multiple Files Using a loop in Windows Batch:
ffprobe [options] input_file Without any options, ffprobe outputs a compact summary. For example: ffprobe.exe
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 . Batch Probing Multiple Files Using a loop in
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) Then explore deeper as needed.
Create an alias or batch file called mediainfo that runs ffprobe -hide_banner -show_format -show_streams %1 to get a quick, readable summary anytime. Then explore deeper as needed.