Configuration - Musfiq0/enhanced-screens-comparison GitHub Wiki

⚙️ Configuration

Comprehensive guide to configuring Enhanced Screens Comparison for optimal performance and results tailored to your specific needs.

🎛️ Configuration Overview

The tool offers multiple levels of configuration:

  • Global Settings: Apply to all comparisons
  • Per-Video Settings: Individual video configurations
  • Processing Options: Backend and quality preferences
  • Upload Settings: Hosting and sharing preferences

🌐 Global Configuration

File Management Settings

Screenshot Directory Management

Default Location: .\Screenshots\
Organization: Structured by timestamp and video source

Auto-Clear Options:

  • Before Generation: Remove old screenshots before starting new comparison

    • Prevents mixing results from different sessions
    • Keeps output directory clean and organized
    • Recommended for most users
  • After Upload: Remove local files after successful cloud upload

    • Saves disk space for users with limited storage
    • Maintains cloud backup while freeing local space
    • Good for high-volume users

Directory Structure

Screenshots/
├── comparison_20250706_143022/    # Timestamp-based folders
│   ├── source_frame_1000.png     # Individual screenshots
│   ├── netflix_frame_1000.png
│   ├── bluray_frame_1000.png
│   └── ...
└── comparison_20250706_151234/
    └── ...

Processing Backend Configuration

Backend Priority Order

  1. VapourSynth (Highest quality, optional)
  2. OpenCV (Reliable default)
  3. PIL (Universal fallback)

Backend Detection

# Check available backends
python comparev2.py --demo

# Output example:
[OK] VapourSynth detected and imported successfully
[OK] OpenCV detected and imported successfully
[OK] PIL detected and imported successfully
[MODE] Using VapourSynth mode (high-quality video processing)

VapourSynth Configuration

For professional-quality processing:

Installation Requirements:

  1. Download from VapourSynth Releases
  2. Install system package (R65+ recommended)
  3. Install Python bindings:
    pip install vapoursynth awsmfunc
    

Benefits:

  • Superior video processing quality
  • Advanced filtering capabilities
  • Professional encoding workflows
  • Better handling of various color spaces

📹 Per-Video Configuration

Video Display Names

Naming Best Practices

  • Be descriptive: "Netflix HDR 1080p" vs "Video1"
  • Include source info: "Blu-ray Remux" vs "Web-DL"
  • Specify quality: "4K Dolby Vision" vs "720p Compressed"
  • Use consistent format: "Source [Quality] [Notes]"

Examples:

Good Names:
- "Netflix 1080p HDR"
- "Blu-ray Remux 4K"
- "Amazon Prime 720p"
- "My Encode x264"

Poor Names:
- "Video1"
- "File"
- "Test"
- "Movie"

Crop Configuration

Preset Categories

Cinema Formats:

  • 2.40:1 Letterbox: Ultra-wide cinema (crop: top/bottom ~138px @ 1080p)
  • 2.35:1 Letterbox: Wide cinema (crop: top/bottom ~132px @ 1080p)
  • 1.85:1 Letterbox: Standard cinema (crop: top/bottom ~87px @ 1080p)

Streaming Services:

  • Netflix: Remove Netflix interface elements
  • Amazon Prime: Handle Prime Video overlays
  • Disney+: Remove Disney+ specific UI elements
  • Hulu: Remove Hulu interface elements

Technical Corrections:

  • Dirty Lines: Remove encoding artifacts (top/bottom 1-2px)
  • Overscan: Correct for overscan issues
  • Pillarbox: Handle 4:3 content on 16:9 displays

Custom Crop Specification

Crop Values (in pixels):
Left: 0      # Remove from left edge
Right: 0     # Remove from right edge  
Top: 138     # Remove from top edge
Bottom: 138  # Remove from bottom edge

Example: 2.40:1 letterbox removal at 1080p

Resolution-Aware Cropping: Crop values automatically scale with resolution:

  • 4K (3840×2160): Crop values × 2
  • 1080p (1920×1080): Base values
  • 720p (1280×720): Crop values × 0.67

Resolution Configuration

Target Resolution Options

  • 480p (854×480): Legacy compatibility, fast processing
  • 720p (1280×720): Standard HD, good balance
  • 1080p (1920×1080): Full HD, recommended default
  • 1440p (2560×1440): Quad HD, high quality
  • 4K (3840×2160): Ultra HD, maximum quality

Resolution Selection Guidelines

  • Match source: Don't exceed source resolution
  • Consider purpose: Web sharing vs archival quality
  • System capability: 4K requires significant resources
  • Storage space: Higher resolution = larger files

Aspect Ratio Preservation

The tool automatically maintains correct aspect ratios:

  • No stretching: Images maintain proper proportions
  • Smart scaling: Optimal scaling algorithms
  • Crop-first processing: Ensures consistent results

Trim Configuration

Time-Based Trimming

Start Time: Skip opening credits/intro sequences
End Time: Skip ending credits/outro content
Purpose: Focus on actual content for comparison

Use Cases:

  • Anime: Skip opening/ending themes
  • Movies: Skip studio logos and credits
  • TV Shows: Focus on episode content
  • Sync issues: Align videos with timing differences

🕐 Frame Selection Configuration

Selection Methods

Interval Mode

Best for: General comparisons, unknown content

Configuration:
- Number of screenshots: 5-20 recommended
- Automatic spacing: Evenly distributed across duration
- Skip problematic areas: Automatic avoidance of fade/black frames

Custom Frames Mode

Best for: Specific scene comparisons, known content

Frame Specification:
- Exact frame numbers: 1000,5000,10000,15000
- Comma-separated list: No spaces between values
- Frame validation: Checks availability across all videos

Fallback Strategy

When custom frames aren't available:

Default Frames: 100, 500, 1000
Auto-adjustment: Scales to video length
Smart selection: Avoids intro/outro areas

Frame Selection Best Practices

Scene Selection Guidelines

  • High detail: Choose scenes with texture and detail
  • Motion scenes: Include movement to show temporal artifacts
  • Color variety: Diverse color palettes reveal processing differences
  • Avoid transitions: Skip fades, cuts, and scene changes

Timing Considerations

  • Avoid intros: Skip opening sequences and logos
  • Representative content: Choose typical content, not special effects
  • Multiple types: Mix dialog, action, and scenic content
  • Consistent across videos: Use same frames for all videos

🌐 Upload Configuration

slow.pics Integration

Collection Settings

Episode Support Options:

  • Single Episode: Individual episode comparisons

    Format: "ShowName S01E01 source vs encode"
    Example: "Attack on Titan S01E01 Netflix vs Blu-ray"
    
  • Season Pack: Multiple episodes or batch comparisons

    Format: "ShowName Season X source vs encode"  
    Example: "Attack on Titan Season 1 Netflix vs Blu-ray"
    

Automatic Naming

The tool generates intelligent collection names:

Components:
- Show/Series name: User-specified
- Season number: S01, S02, etc.
- Episode number: E01, E02, etc.
- Source description: Derived from video names

Example: "Breaking Bad S03E07 Netflix vs AMC vs Blu-ray"

Upload Management

Auto-Upload Settings

  • Enable automatic upload: Upload immediately after generation
  • Browser opening: Automatically open results in default browser
  • Progress tracking: Real-time upload status
  • Error recovery: Retry mechanisms for failed uploads

Manual Upload Options

  • Upload existing: Retry failed uploads from local files
  • Batch upload: Multiple comparison sets
  • Custom naming: Override automatic collection names
  • Selective upload: Choose specific screenshots

🔧 Advanced Configuration

Performance Tuning

Memory Management

4K Video Processing:
- RAM Requirements: 8GB+ recommended
- Processing chunks: Automatic optimization
- Cache management: Efficient temporary file handling

CPU Optimization

  • Multi-threading: Automatic based on system capabilities
  • Processing priority: Background vs foreground processing
  • Concurrent operations: Parallel screenshot generation

Storage Configuration

Temporary Files:
- Location: System temp directory
- Cleanup: Automatic removal after processing
- Space requirements: ~100MB per comparison

Output Files:
- Format: High-quality PNG
- Compression: Lossless optimization
- Size: ~1-5MB per screenshot depending on resolution

Quality Settings

Processing Quality

VapourSynth Mode (Highest quality):

  • Professional video processing
  • Advanced filtering and scaling
  • Color space preservation
  • Bit depth handling

OpenCV Mode (Reliable default):

  • Good quality scaling
  • Broad format support
  • Stable performance
  • Cross-platform compatibility

PIL Mode (Universal fallback):

  • Basic image processing
  • Universal compatibility
  • Lightweight processing
  • Edge case handling

Output Quality

  • PNG format: Lossless compression
  • Color preservation: Full color space support
  • Bit depth: Maintains source bit depth where possible
  • Metadata: Source information preservation

📁 Configuration Files

Settings Persistence

Settings are remembered between sessions:

  • Window positions: GUI layout preferences
  • Default values: Recently used configurations
  • Backend preferences: Successful backend selections
  • Path shortcuts: Frequently used directories

Configuration Location

Windows: %APPDATA%\Enhanced-Screenshot-Comparison\
Files:
- settings.ini: User preferences
- recent_configs.json: Recent video configurations
- upload_history.json: Upload tracking

🐛 Configuration Troubleshooting

Common Configuration Issues

Backend Problems

# VapourSynth not detected
[⚠️] VapourSynth import failed, falling back to OpenCV
Solution: Install VapourSynth system package + Python bindings

# OpenCV issues
[❌] OpenCV import failed
Solution: pip install opencv-python --force-reinstall

Path Configuration

Problem: Special characters in paths
Solution: Use simple paths without spaces/special characters

Problem: Permission denied errors  
Solution: Run as administrator or change output directory

Upload Configuration

Problem: Upload always fails
Solution: Check internet connection, firewall settings

Problem: Wrong collection names
Solution: Verify show name, season/episode numbers

Performance Issues

High Memory Usage

  • Reduce target resolution: Use 1080p instead of 4K
  • Process fewer videos: Limit concurrent comparisons
  • Close other applications: Free system resources
  • Check available RAM: Monitor memory usage

Slow Processing

  • Install VapourSynth: Significant speed improvement
  • Use SSD storage: Faster I/O for video processing
  • Optimize frame selection: Fewer frames = faster processing
  • Check CPU usage: Ensure adequate processing power

💡 Configuration Best Practices

Workflow Optimization

  1. Start simple: Basic settings for first comparison
  2. Test configurations: Verify settings with small test
  3. Document successful setups: Save working configurations
  4. Iterate gradually: Add complexity once basics work

Quality Guidelines

  1. Match source resolution: Don't exceed source quality
  2. Use appropriate crops: Remove irrelevant areas
  3. Select good frames: Representative content scenes
  4. Install VapourSynth: For professional results

Organization Tips

  1. Consistent naming: Use standardized display names
  2. Logical grouping: Group related comparisons
  3. Regular cleanup: Remove old comparisons periodically
  4. Backup important results: Save significant comparisons

Proper configuration is the key to professional-quality video comparisons! ⚙️