A Python script that uses ffprobe
to extract metadata from video files and generates an Excel report with details like resolution, audio/video codecs, frame rate, HDR status, and more.
- Extracts detailed metadata for video files, including audio track information (track numbers, codecs, languages).
- Outputs an Excel file with structured metadata.
- Supports multiple directories for scanning.
- Python 3.x
ffmpeg
installed and accessible viaffprobe
.openpyxl
library for Excel file creation.
- Clone the repository:
git clone https://github.com/CTinMich/Video-Metadata-Extractor.git
- Navigate to the repository directory:
cd video-metadata-extractor
- Install dependencies:
pip install -r requirements.txt
- Open the script
video_metadata_extractor.py
in a text editor or IDE. - Locate the following lines:
dirs = [] # Add your video directory paths here. output_path = "" # Specify where the Excel report should be saved.
- Add the paths to your video directories. For example:
dirs = ["/path/to/videos", "/another/path/to/videos"]
- Specify the output path for the report. For example:
output_path = "/path/to/save/report"
- Add the paths to your video directories. For example:
- Run the script:
If the script is not executable, you can explicitly run it using Python:
./video_metadata_extractor.py
python3 video_metadata_extractor.py
- The Excel report will be saved to the specified path.
The generated Excel file contains columns like:
- Full file path
- File size in GB
- Resolution (e.g.,
1920x1080
) - Audio tracks (with track numbers, codecs, and languages)
- Video codec
- Video profile
- Bitrate (in kbps)
- Container type
- Frame rate (e.g.,
23.976 fps
) - HDR/SDR status
Feel free to fork the repository and submit pull requests. Issues and feature requests are welcome!
This project is licensed under the MIT License.
- The script uses the shebang
#!/usr/bin/env python3
to ensure compatibility across different systems. - Ensure Python 3 is installed and accessible in your system's PATH.