Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Video Metadata Extractor

PHP Bootstrap FFmpeg MediaInfo ExifTool License

A powerful web-based tool for extracting comprehensive metadata from video files using multiple industry-standard libraries. This application provides detailed information about video files including technical specifications, creation dates, and generates thumbnails.

πŸš€ Features

Extracted Metadata Information

  • File Information

    • File name and MD5 hash
    • File size (formatted in B, KB, MB, GB, TB)
    • File format detection
  • Video Technical Specifications

    • Resolution (width x height)
    • Frame rate (FPS)
    • Video codec
    • Total number of frames
    • Duration (formatted as hours, minutes, seconds)
  • Date Information

    • Creation date (from metadata)
    • Modification date (from metadata)
  • Visual Content

    • Automatic thumbnail generation (screenshot at random timestamp)

Supported Libraries

The application uses multiple libraries to ensure maximum compatibility and accuracy:

  1. FFmpeg/FFprobe - Primary video analysis tool
  2. MediaInfo - Comprehensive media file analysis
  3. ExifTool - Metadata extraction and date parsing
  4. PHP - Backend processing and web interface
  5. Bootstrap - Modern, responsive UI

πŸ“‹ Requirements

System Requirements

  • PHP 8.0 or higher
  • Web server (Apache, Nginx, or built-in PHP server)
  • Sufficient disk space for temporary file uploads

External Dependencies

FFmpeg & FFprobe

# Ubuntu/Debian
sudo apt update
sudo apt install ffmpeg

# CentOS/RHEL
sudo yum install ffmpeg

# macOS
brew install ffmpeg

# Windows
# Download from https://ffmpeg.org/download.html

MediaInfo

# Ubuntu/Debian
sudo apt install mediainfo

# CentOS/RHEL
sudo yum install mediainfo

# macOS
brew install mediainfo

# Windows
# Download from https://mediaarea.net/en/MediaInfo/Download

ExifTool

# Ubuntu/Debian
sudo apt install libimage-exiftool-perl

# CentOS/RHEL
sudo yum install perl-Image-ExifTool

# macOS
brew install exiftool

# Windows
# Download from https://exiftool.org/

πŸ› οΈ Installation

  1. Clone or download the project

    git clone <repository-url>
    cd vidfor2
  2. Set up web server

    • Place files in your web server directory
    • Ensure the uploads/ directory is writable
    chmod 755 uploads/
  3. Verify external tools

    # Check if all tools are available
    ffmpeg -version
    ffprobe -version
    mediainfo --version
    exiftool -ver
  4. Configure paths (if needed) Edit process.php and update the tool paths if they're not in your system PATH:

    private $ffmpegPath = '/usr/bin/ffmpeg';
    private $ffprobePath = '/usr/bin/ffprobe';
    private $mediainfoPath = '/usr/bin/mediainfo';
    private $exiftoolPath = '/usr/bin/exiftool';

🎯 Usage

  1. Access the application

    • Open your web browser
    • Navigate to http://your-domain/index.php
  2. Upload video files

    • Click "Choose Files" to select one or multiple video files
    • Supported formats: MP4, AVI, MOV, MKV, WMV, FLV, WebM, and more
  3. Extract metadata

    • Click "Upload & Extract Metadata"
    • Wait for processing to complete
  4. View results

    • Results are displayed in a table format
    • Each row contains comprehensive metadata for one video file
    • Thumbnails are generated automatically

πŸ“Š Supported Video Formats

  • Common Formats: MP4, AVI, MOV, MKV, WMV, FLV, WebM
  • Professional Formats: ProRes, DNxHD, CineForm
  • Codecs: H.264, H.265, VP9, AV1, MPEG-2, MPEG-4
  • Containers: All formats supported by FFmpeg

πŸ”§ Configuration

File Upload Limits

Adjust PHP settings in php.ini for large files:

upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 300
memory_limit = 256M

Output Directory

The uploads/ directory stores temporary files and thumbnails. Ensure it has proper permissions:

chmod 755 uploads/
chown www-data:www-data uploads/  # For Apache/Nginx

πŸ› Troubleshooting

Common Issues

  1. "Command not found" errors

    • Ensure all external tools are installed and in PATH
    • Check tool paths in process.php
  2. Permission denied errors

    • Verify uploads/ directory permissions
    • Check web server user permissions
  3. Large file upload failures

    • Increase PHP upload limits
    • Check server timeout settings
  4. Missing metadata

    • Some files may not contain all metadata fields
    • The application uses fallback methods for incomplete data

Debug Mode

Enable debug logging by uncommenting debug lines in process.php:

file_put_contents($this->uploadDir . 'debug.log', $output, FILE_APPEND);

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

For support and questions:

  • Create an issue in the repository
  • Check the troubleshooting section above
  • Verify all dependencies are properly installed

Note: This tool is designed for legitimate video analysis purposes. Please ensure you have the right to analyze any video files you upload.

About

A powerful web-based tool for extracting comprehensive metadata from video files using multiple industry-standard libraries. This application provides detailed information about video files including technical specifications, creation dates, and generates thumbnails.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages