A powerful command-line tool for extracting and displaying comprehensive metadata from media files using exiftool and ffprobe. Perfect for photographers, content creators, and anyone who needs to analyze media file properties and metadata.
- Multi-format Support: Works with images (JPG, PNG) and videos (MP4, MOV, AVI, MKV, WebM)
- Flexible Output Modes: Choose between basic summary, interactive per-file, or full metadata display
- Comprehensive Metadata: Shows EXIF data, video codec information, file properties, and technical details
- User-Friendly Interface: Interactive prompts and clear formatting
- No Installation Required: Pure bash script with standard Linux tools
Make sure you have the required tools installed:
# Install exiftool and ffmpeg (includes ffprobe)
sudo apt install exiftool ffmpeg # Ubuntu/Debian
sudo pacman -S exiftool ffmpeg # Arch Linux
sudo dnf install perl-Image-ExifTool ffmpeg # Fedora# Make the script executable
chmod +x exif-checker.sh
# Run in current directory
./exif-checker.sh./exif-checker.sh- Prompts once at the start to choose display mode
- Then asks for each file individually
- Press
qto quit at any time
./exif-checker.sh --all- Shows complete metadata for all files
- No interactive prompts
- Best for batch processing
./exif-checker.sh --basic- Shows only essential information
- Fastest execution
- Perfect for quick file overviews
The script automatically detects and processes these file formats:
Images:
.jpg/.jpeg- JPEG images.png- PNG images
Videos:
.mp4- MP4 video files.mov- QuickTime video files.avi- AVI video files.mkv- Matroska video files.webm- WebM video files
- File Type: MIME type detection
- File Size: Human-readable file size
- Video Properties: Codec, resolution, duration, bitrate (for video files)
- EXIF Data: Complete metadata from exiftool including:
- Camera settings (ISO, aperture, shutter speed)
- GPS coordinates (if available)
- Creation date and time
- Camera make and model
- Lens information
- Software used
- Video Analysis: Detailed ffprobe output including:
- Stream information
- Codec details
- Format specifications
- Duration and bitrate
- Audio track information
- File Discovery: Scans current directory for supported media files
- Basic Analysis: Uses
filecommand for MIME type detection - Video Analysis: Uses
ffprobefor video stream information - Metadata Extraction: Uses
exiftoolfor comprehensive EXIF data - Interactive Display: Presents information in a user-friendly format
============================================================
FILE: sample.jpg
============================================================
MIME/Type : image/jpeg
File size : 2.3M
----- exiftool (grouped, raw) -----
[EXIF] Make : Canon
[EXIF] Model : EOS R5
[EXIF] DateTime : 2024:01:15 14:30:25
[EXIF] ISO : 800
[EXIF] FNumber : 2.8
[EXIF] ExposureTime : 1/125
[GPS] GPS Latitude : 40.7128
[GPS] GPS Longitude : -74.0060
- Directory Scope: Only processes files in the current directory (not recursive)
- Dependencies: Requires
exiftoolandffprobeto be installed - File Types: Limited to the specific file extensions listed above
- Permissions: Requires read access to the media files
- Ensure you're in a directory containing supported file types
- Check that files have the correct extensions (case-sensitive)
# Install exiftool
sudo apt install exiftool # Ubuntu/Debian# Install ffmpeg (includes ffprobe)
sudo apt install ffmpeg # Ubuntu/Debian-
Navigate to your media folder first:
cd /path/to/your/photos ./exif-checker.sh -
Use basic mode for quick overviews:
./exif-checker.sh --basic
-
For batch processing, use full mode:
./exif-checker.sh --all > metadata_report.txt -
Check file permissions if you get access errors:
ls -la *.jpg # Check if files are readable
The script can be easily modified to:
- Add more file types by editing line 12
- Change output format
- Add additional metadata fields
- Modify the display format
This script is provided as-is for educational and personal use. Feel free to modify and distribute according to your needs.
Made with ❤️ by Daud Farzand
Happy metadata exploring! 📸✨