> ## Content Index
> Fetch the complete content index at: https://ffmpeguru.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Use ffprobe for JSON metadata
- URL: https://ffmpeguru.com/use-ffprobe-for-json-metadata/
- Published: 2026-08-03T09:00:00.000Z
- Updated: 2026-10-13T17:59:33.000Z
- Author: FFmpeguru
- Tags: ffmpeg

![](https://picsum.photos/seed/ffback1/1200/630)

The human-readable output of \`ffmpeg -i\` is great for eyes and bad for scripts. ffprobe has a JSON output mode that exposes the same data as a structured document, so a Python, Node, or shell script can read stream count, codec names, duration, and bitrates without parsing free-form text.

## The command

```
ffprobe -v quiet -print_format json -show_format -show_streams input.mp4
```

## What it does

ffprobe runs the same demuxer as ffmpeg but prints a structured report instead of decoding. With \`-show\_format\` you get the container-level fields (duration, bitrate, format name); with \`-show\_streams\` you get one record per video, audio, and subtitle stream (codec, resolution, sample rate, channel layout). The JSON is stable across FFmpeg versions, so a script written today will still parse against next year's build.

## Requirements

Any FFmpeg installation. The JSON is produced by the libavformat demuxer, so the input must be in a format FFmpeg was built with — practically everything in mainstream use. No codec or hardware requirement, since the report is built from the container header.

## Things to avoid

- Parsing the human-readable output instead. The text format is not a stable API; the JSON one is.
- Forgetting \`-v quiet\` and getting a wall of stderr in front of your JSON.
- Calling \`ffprobe\` on a remote URL without \`-timeout\`; a slow server will hang the call indefinitely.
- Assuming every JSON key is guaranteed; \`-show\_entries format=duration:stream=codec\_name\` is the supported way to restrict output to the fields you need.