Skip to content

dfk007/exif-inspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

📸 Exif Checker

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.

✨ Features

  • 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

🚀 Quick Start

Prerequisites

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

Usage

# Make the script executable
chmod +x exif-checker.sh

# Run in current directory
./exif-checker.sh

📋 Usage Modes

1. Interactive Mode (Default)

./exif-checker.sh
  • Prompts once at the start to choose display mode
  • Then asks for each file individually
  • Press q to quit at any time

2. Full Metadata Mode

./exif-checker.sh --all
  • Shows complete metadata for all files
  • No interactive prompts
  • Best for batch processing

3. Basic Summary Mode

./exif-checker.sh --basic
  • Shows only essential information
  • Fastest execution
  • Perfect for quick file overviews

📁 Supported File Types

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

📊 Information Displayed

Basic Information (Always Shown)

  • File Type: MIME type detection
  • File Size: Human-readable file size
  • Video Properties: Codec, resolution, duration, bitrate (for video files)

Full Metadata (--all mode or when prompted)

  • 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

🔍 How It Works

  1. File Discovery: Scans current directory for supported media files
  2. Basic Analysis: Uses file command for MIME type detection
  3. Video Analysis: Uses ffprobe for video stream information
  4. Metadata Extraction: Uses exiftool for comprehensive EXIF data
  5. Interactive Display: Presents information in a user-friendly format

📝 Example Output

============================================================
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

⚠️ Limitations

  • Directory Scope: Only processes files in the current directory (not recursive)
  • Dependencies: Requires exiftool and ffprobe to be installed
  • File Types: Limited to the specific file extensions listed above
  • Permissions: Requires read access to the media files

🛠️ Troubleshooting

"No media files found"

  • Ensure you're in a directory containing supported file types
  • Check that files have the correct extensions (case-sensitive)

"command not found: exiftool"

# Install exiftool
sudo apt install exiftool  # Ubuntu/Debian

"command not found: ffprobe"

# Install ffmpeg (includes ffprobe)
sudo apt install ffmpeg  # Ubuntu/Debian

💡 Tips for New Linux Users

  1. Navigate to your media folder first:

    cd /path/to/your/photos
    ./exif-checker.sh
  2. Use basic mode for quick overviews:

    ./exif-checker.sh --basic
  3. For batch processing, use full mode:

    ./exif-checker.sh --all > metadata_report.txt
  4. Check file permissions if you get access errors:

    ls -la *.jpg  # Check if files are readable

🔧 Customization

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

📄 License

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! 📸✨

About

A command-line tool for analyzing and extracting EXIF metadata from images and videos, with easy-to-read outputs for photographers and content creators.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages