Extract Video Metadata in INI Format Using FFmpeg

This article explains how to use FFmpeg’s companion tool, FFprobe, to extract comprehensive video metadata and format the output as an INI file. You will learn the exact command-line syntax, the meaning of each parameter, and how to save the resulting metadata directly to a .ini file for easy parsing and configuration management.

To extract video metadata in the INI format, you must use ffprobe, which is the stream analysis tool included with the FFmpeg installation.

The Command

Run the following command in your terminal or command prompt:

ffprobe -v error -show_format -show_streams -print_format ini input.mp4 > metadata.ini

Command Breakdown

Customizing the Output

If you only require specific metadata blocks rather than the entire file details, you can adjust the flags:

To extract container format metadata only:

ffprobe -v error -show_format -print_format ini input.mp4 > format_metadata.ini

To extract stream metadata only (video/audio properties):

ffprobe -v error -show_streams -print_format ini input.mp4 > stream_metadata.ini