Get video file information
inspection
// what it does
The bare `ffprobe input.mp4` prints a human-readable summary of the container and each stream — codecs, resolution, bitrate, duration — which is the fastest way to eyeball a file. The second form is the machine-readable version: `-v quiet` mutes logging, `-print_format json` emits structured JSON, and `-show_format` plus `-show_streams` dump the container-level fields and every per-stream field respectively. Pipe the JSON into jq when you need to extract values reliably in a script.
// shell
$ ffprobe input.mp4$ ffprobe -v quiet -print_format json -show_format -show_streams input.mp4// gotcha
The default (non-JSON) summary goes to stderr, so `ffprobe input.mp4 > info.txt` captures nothing — redirect with 2> instead. The `-print_format json` output, by contrast, goes to stdout.