To batch extract metadata from videos, you can use command-line tools or scripts that work across multiple files. One of the most effective tools for this task is FFmpeg (specifically using ffprobe
), which can be paired with a script to automate metadata extraction.
Here’s how you can do it:
Requirements
-
FFmpeg installed (includes
ffprobe
) -
Basic knowledge of using Terminal (Linux/macOS) or Command Prompt/Powershell (Windows)
-
Your video files collected in a single folder
Method 1: Bash Script (Linux/macOS)
Save this script in the same directory as your videos (e.g., extract_metadata.sh
), give it execution permissions:
Method 2: PowerShell Script (Windows)
Make sure to create the output folder first or add this line before the loop:
Method 3: Python Script (Cross-platform)
Run it with:
Output Example (.json
)
Each .json
will include details like:
-
Duration
-
Codec
-
Bitrate
-
Resolution
-
Frame rate
-
Audio channels
-
Creation time (if embedded)
Let me know if you want metadata in a CSV or need to process other formats like .mkv
, .avi
, or .mov
.
Leave a Reply