Skip to content

A modern, high-performance desktop file converter for Windows with drag-and-drop interface, supporting images, audio, and video files with hardware acceleration and intelligent compression.

License

Notifications You must be signed in to change notification settings

soroush-thr/FormatFusion

Repository files navigation

FormatFusion - Universal File Converter

A modern, high-performance desktop application for Windows that converts images, audio, and video files with an intuitive drag-and-drop interface. Built with Python and PyQt6 following the MVVM design pattern, featuring a beautiful dark theme and optimized conversion engines.

✨ Key Features

πŸ–ΌοΈ Advanced Image Conversion

  • Supported Input Formats: PNG, JPG, JPEG, BMP, TIFF, GIF, WebP
  • Output Formats: PNG, JPG with quality optimization
  • Smart Resizing: Optional pixel-based resizing with aspect ratio preservation
  • File Size Control: Kilobyte-based size limiting with intelligent compression
  • Quality Engine: High-quality conversion using Pillow with optimization algorithms

🎡 Professional Audio Conversion

  • Supported Input Formats: WAV, M4A, FLAC, OGG, MP3, AAC, WMA
  • Output Format: MP3 with optimized encoding
  • Quality Presets: 128kbps (Standard), 192kbps (Good), 256kbps (High), 320kbps (Lossless)
  • Fast Processing: Optimized FFmpeg integration

🎬 Ultra-Fast Video Conversion

  • Supported Input Formats: MKV, MOV, AVI, WebM, FLV, MP4, WMV, M4V
  • Output Format: MP4 with H.264/AAC codecs
  • Quality Presets: 480p, 720p, 1080p, Original quality
  • Speed Optimization: 3-5x faster conversion with hardware acceleration
  • Fast Mode: Ultrafast encoding for maximum speed
  • Hardware Acceleration: Auto-detects NVIDIA, Intel, and AMD GPU encoding

🎨 Modern User Interface

  • Dark Theme: Professional navy-blue color scheme
  • Drag & Drop: Intuitive file selection with visual feedback
  • Real-time Preview: File information and conversion options
  • Progress Tracking: Visual progress bar with real-time updates
  • Smart Defaults: Automatic save location in same folder as input
  • Error Handling: Clear error messages and validation
  • Logo Support: Custom logo integration throughout the interface

Installation

Prerequisites

  1. Python 3.8 or higher

    • Download from python.org
    • Make sure to check "Add Python to PATH" during installation
  2. FFmpeg

    • Download from ffmpeg.org
    • Extract and place ffmpeg.exe in one of these locations:
      • Project root directory
      • bin/ directory
      • resources/ directory
      • System PATH

Setup Instructions

  1. Clone or Download the Project

    git clone <repository-url>
    cd FormatFusion
  2. Create Virtual Environment (Recommended)

    python -m venv venv
    venv\Scripts\activate  # On Windows
  3. Install Dependencies

    pip install -r requirements.txt
  4. Verify FFmpeg Installation

    • Place ffmpeg.exe in the project root directory
    • Or ensure it's available in your system PATH

Running the Application

From Source Code

python main.py

First Run

  1. Launch the application
  2. Drag and drop a file onto the main area, or click to browse
  3. Select your conversion options
  4. Click "Convert" and choose output location
  5. Wait for conversion to complete

Building Executable

Using PyInstaller

  1. Install PyInstaller

    pip install pyinstaller
  2. Create Executable

    pyinstaller --onefile --windowed --name FormatFusion main.py
  3. Include FFmpeg

    pyinstaller --onefile --windowed --name FormatFusion --add-data "ffmpeg.exe;." main.py

Advanced Build Script

Create build.py for automated building:

import PyInstaller.__main__
import os

# Build executable
PyInstaller.__main__.run([
    '--onefile',
    '--windowed',
    '--name=FormatFusion',
    '--add-data=ffmpeg.exe;.',
    '--add-data=requirements.txt;.',
    '--icon=icon.ico',  # Optional: add custom icon
    'main.py'
])

πŸ“ Project Structure

FormatFusion/
β”œβ”€β”€ main.py                    # Application entry point
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ setup.py                   # Automated setup script
β”œβ”€β”€ build.py                   # Executable build script
β”œβ”€β”€ README.md                  # This documentation
β”œβ”€β”€ ffmpeg.exe                 # FFmpeg binary (place here)
β”œβ”€β”€ resources/                 # Application resources
β”‚   β”œβ”€β”€ logo.png              # Custom logo (optional)
β”‚   └── README.md             # Logo setup instructions
β”œβ”€β”€ temp/                     # Documentation and guides
β”‚   β”œβ”€β”€ SETUP_GUIDE.md        # Simple setup guide
β”‚   └── VIDEO_OPTIMIZATION.md # Performance details
β”œβ”€β”€ models/                   # Data models (MVVM)
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ file_info.py          # File information model
β”‚   └── conversion_options.py # Conversion settings model
β”œβ”€β”€ viewmodels/               # Business logic (MVVM)
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── main_viewmodel.py     # Main view model
β”œβ”€β”€ views/                    # User interface (MVVM)
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── main_window.py        # Main window with dark theme
β”œβ”€β”€ services/                 # External services
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── conversion_service.py # Optimized conversion engine
└── utils/                    # Utility functions
    β”œβ”€β”€ __init__.py
    └── file_utils.py         # File operation utilities

πŸš€ Performance Optimizations

Video Conversion Speed

  • 3-5x Faster: Optimized FFmpeg settings with ultrafast presets
  • Hardware Acceleration: Auto-detects and uses GPU encoding (NVIDIA, Intel, AMD)
  • Fast Mode: Default setting for maximum speed with minimal quality loss
  • Smart Fallbacks: Automatic fallback to software encoding if hardware fails

Image Processing

  • Intelligent Compression: Smart quality adjustment for file size limits
  • Memory Efficient: Optimized Pillow usage with proper resource management
  • Batch Processing: Efficient handling of multiple image operations

Audio Conversion

  • Optimized Encoding: Fast MP3 conversion with quality presets
  • Stream Processing: Efficient audio stream handling

🎨 User Experience

Modern Interface

  • Dark Theme: Professional navy-blue color scheme with cyan accents
  • Responsive Design: Adapts to different window sizes
  • Visual Feedback: Hover effects, progress bars, and status updates
  • Custom Logo: Support for custom branding throughout the interface

Smart Features

  • Auto Save Location: Defaults to same folder as input file
  • File Type Detection: Automatic format recognition and appropriate options
  • Progress Tracking: Real-time conversion progress with visual indicators
  • Error Recovery: Graceful error handling with helpful messages

πŸ—οΈ Architecture

FormatFusion follows the Model-View-ViewModel (MVVM) pattern:

  • Models: Data structures and business entities (file_info.py, conversion_options.py)
  • Views: User interface components (main_window.py with dark theme)
  • ViewModels: Business logic and state management (main_viewmodel.py)
  • Services: External dependencies and conversion logic (conversion_service.py)
  • Utils: Helper functions and utilities (file_utils.py)

Troubleshooting

Common Issues

  1. "FFmpeg not found" Error

    • Ensure ffmpeg.exe is in the correct location
    • Check that the file is not corrupted
    • Verify FFmpeg works from command line: ffmpeg -version
  2. "Missing Dependencies" Error

    • Run pip install -r requirements.txt
    • Ensure you're using the correct Python version
    • Try creating a fresh virtual environment
  3. Conversion Fails

    • Check that input file is not corrupted
    • Ensure output directory is writable
    • Verify file format is supported
  4. Application Won't Start

    • Check Python version (3.8+ required)
    • Verify all dependencies are installed
    • Check for antivirus interference

Performance Tips

  • For large video files, use "Original" quality to avoid re-encoding
  • Close other applications during conversion for better performance
  • Use SSD storage for faster file I/O

Development

Adding New File Formats

  1. Update FileType enum in models/file_info.py
  2. Add extension mapping in _detect_file_type() method
  3. Implement conversion logic in services/conversion_service.py
  4. Add UI options in views/main_window.py

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

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

Support

For issues and questions:

  1. Check the troubleshooting section
  2. Search existing issues
  3. Create a new issue with detailed information

Changelog

Version 1.0.0

  • Initial release
  • Image, audio, and video conversion
  • Drag-and-drop interface
  • MVVM architecture
  • Windows executable support

About

A modern, high-performance desktop file converter for Windows with drag-and-drop interface, supporting images, audio, and video files with hardware acceleration and intelligent compression.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published