Before you transcode anything, look at what you have. FFmpeg's probe mode is the fastest way to inspect a media file: it reads the container header and stream metadata, prints a full report, and exits. It produces no output file and is read-only, so it is safe to run on anything.

The command

ffmpeg -i input.mp4

What it prints

FFmpeg parses the container, then every stream in it. For a typical MP4 you get the duration, overall bitrate, and the format tag, followed by per-stream lines: codec name and profile, resolution and pixel aspect ratio for video, frame rate, sample rate and channel layout for audio, plus encoder metadata if present. If a stream cannot be decoded FFmpeg prints a warning but still lists the stream.

When to use it

Use it as the first step of any conversion to confirm the input codec, resolution, and audio configuration, so the command you build next targets something sensible. In a script, run it in a pre-check pass to fail fast on the wrong file rather than discovering the mismatch mid-encode, which wastes minutes. The probe reads only the container header and a tiny amount of stream data, so it returns in under a second even on a 50 GB Blu-ray remux.

Requirements

Any container and codec FFmpeg was built with, which is practically everything in widespread use. The command makes no assumption about the input other than that FFmpeg can open it, so there is no video or audio format requirement beyond FFmpeg's own build configuration.

Things to avoid

  • Expecting an output file; there is none, the command is a probe.
  • Treating a 0 exit code as proof the file is well-formed. FFmpeg will often warn and still return 0 on partially corrupt files. To validate integrity, run -f null - to decode through the whole file.
  • Parsing the human-readable output in a script. Use ffprobe -v quiet -print_format json -show_format -show_streams for machine-readable metadata instead.
  • Running on a file that is being written to by another process; the probe can read a half-written header and report nonsense.