> inspection
The Inspection category is about pulling technical facts out of a media file with ffprobe — codecs, resolution, frame rate, audio layout, duration, and container tags — without decoding or re-encoding a single frame. Reach for these before a conversion to confirm what you're actually working with, and in scripts to validate uploads or answer "why won't this play?".
// inspection
5 commands$ ffprobe input.mp4$ ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,width,height,r_frame_rate -of csv=p=0 input.mp4$ ffprobe -v error -select_streams a:0 -show_entries stream=codec_name,sample_rate,channels -of csv=p=0 input.mp4$ ffprobe -v error -show_entries format_tags -of default=noprint_wrappers=1 input.mp4$ ffprobe -v error -show_entries format=duration -of csv=p=0 input.mp4// faq
How do I get just one value like resolution or duration without all the other output?
Combine four flags: -v error to silence the banner and info logs, -select_streams v:0 to target a single stream, -show_entries to name the exact fields, and -of csv=p=0 to drop the labels. For example `ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 input.mp4` prints only `1920,1080`, ready to capture in a shell variable. Without -select_streams you also get a blank line for every non-video stream, since audio streams carry no width/height.
What's the difference between ffprobe and ffmpeg for inspecting a file?
ffprobe is the read-only analyzer built specifically for reporting metadata, and it supports structured output formats (json, csv, xml) that scripts can parse. ffmpeg will also dump stream info when you run `ffmpeg -i input.mp4`, but it prints an unstructured summary to stderr and is really meant for transcoding — use ffprobe for pure inspection.
Why does ffprobe seem to print nothing when I redirect its output to a file?
The default human-readable stream dump is written to stderr, not stdout, so `ffprobe input.mp4 > out.txt` captures nothing. Either redirect stderr with `2>`, or use `-print_format json` / `-of csv` which send structured output to stdout so you can pipe or save it normally.