Skip to content

DV to HD upscaling tool using Vapoursynth with QTGMC deinterlacing, neural network enhancement, and batch processing. Transform legacy footage into cinema-ready HD with advanced options for upsampling chroma subsampling and bit depth.

License

Notifications You must be signed in to change notification settings

Hank-tha-Cowdog/dvcvapourize

Repository files navigation

🎬 DVC Vapourize

Professional DV to HD upscaling tool using Vapoursynth with QTGMC deinterlacing and chroma enhance

Python VapourSynth License Platform

Transform your legacy DV footage into pristine 4K ProRes with professional-grade deinterlacing, chroma cleanup, and neural network upscaling.

✨ Features

  • πŸš€ QTGMC Deinterlacing - Industry-standard motion-compensated deinterlacing
  • 🧠 NNEDI3 Neural Upscaling - AI-powered 2Γ— upscaling to HD (1920x1080)
  • 🎯 Advanced Chroma Cleanup - Multi-pass temporal and spatial chroma artifact removal
  • 🎨 Color Space Conversion - Professional color space handling for cinema workflows
  • πŸ“ Batch Processing - Process entire directories with progress monitoring
  • πŸ–₯️ GUI & CLI - Both graphical interface and command-line operation
  • ⚑ Optimized Pipeline - Multi-threaded processing with performance profiling
  • πŸ“Š Rich Progress Tracking - Real-time frame-by-frame progress with ETA

🎯 Designed For

  • DV Footage (720Γ—576 PAL, 720Γ—480 NTSC)
  • Legacy Video Formats (AVI, MKV, MP4, MXF, DV, HDV)
  • Professional Post-Production workflows
  • Archive Restoration projects

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • FFmpeg (in system PATH)
  • VapourSynth R57+

1. Environment Setup

# Create virtual environment
python -m venv dvc_vapourize_env

# Activate environment
# Windows:
dvc_vapourize_env\Scripts\activate
# macOS/Linux:
source dvc_vapourize_env/bin/activate

# Install Python dependencies
pip install -r requirements.txt

2. VapourSynth Setup

Install VapourSynth and required plugins:

# Install vsrepo (VapourSynth plugin manager)
pip install vsrepo

# Install required plugins
vsrepo install qtgmc
vsrepo install nnedi3
vsrepo install havsfunc
vsrepo install ffms2
vsrepo install lsmas
vsrepo install mvtools
vsrepo install vsdehalo

# Update all plugins
vsrepo upgrade-all

3. Run the Application

GUI Mode

python main_window.py

Command Line Mode

# Single file processing
python vs_pipeline.py --input "input_video.avi" --output "output_directory"

# Batch processing with test mode
python vs_pipeline.py --input "input_directory" --output "output_directory" --batch_mode --test_mode --test_frames 500

# Full batch processing with recursive subdirectory scanning
python vs_pipeline.py --input "input_directory" --output "output_directory" --batch_mode --recursive

πŸ“‹ Command Line Options

Option Description Default
--input Input file or directory path Required
--output Output directory path Required
--batch_mode Enable batch processing Single file
--recursive Process subdirectories Disabled
--test_mode Process limited frames for testing Disabled
--test_frames Number of frames in test mode 200

πŸ”§ Processing Pipeline

Input DV Video β†’ Rewrap to ProRes β†’ VapourSynth Processing β†’ Final ProRes 422 HQ
                        ↓                       ↓                        ↓
                Format Detection    β”Œβ”€ Deinterlacing (QTGMC)    DCI-P3 Color Space
                Color Space Setup   β”œβ”€ Chroma Cleanup           Professional Codec
                Audio Preservation  β”œβ”€ Square Pixel Conversion  4K Resolution
                                   β”œβ”€ NNEDI3 2Γ— Upscaling      
                                   └─ Format Optimization       

Processing Stages

  1. Analysis & Rewrapping - Detect format, rewrap to ProRes container
  2. Deinterlacing - QTGMC with Placebo preset for maximum quality
  3. Chroma Cleanup - Multi-pass temporal and spatial artifact removal
  4. Pixel Aspect Correction - Convert DV to square pixels (1920Γ—1080)
  5. Neural Upscaling - NNEDI3 2Γ— upscaling to 4K (3840Γ—2160)
  6. Final Encoding - ProRes 422 HQ with DCI-P3 color space

πŸŽ›οΈ Advanced Configuration

VapourSynth Scripts

  • upscale.vpy - Main processing pipeline
  • rewrap.py - Format conversion and analysis

Key Parameters

# QTGMC Settings
Preset="Placebo"          # Maximum quality
SourceMatch=3             # Advanced source matching
Lossless=2               # High quality mode
MatchEnhance=0.95        # Motion matching enhancement

# NNEDI3 Settings
nsize=6                  # 32Γ—6 neighborhood
nns=4                    # 256 neurons
qual=2                   # Highest quality

πŸ“ Supported Formats

Input Formats

  • Containers: AVI, MKV, MP4, MOV, MXF, TS, M2TS, DV, HDV
  • Codecs: DV, HDV, H.264, MPEG-2, ProRes
  • Resolutions: 720Γ—576 (PAL DV), 720Γ—480 (NTSC DV), 1440Γ—1080 (HDV)

Output Format

  • Container: QuickTime MOV
  • Codec: ProRes 422 HQ (10-bit 4:2:2)
  • Resolution: 3840Γ—2160 (4K UHD)
  • Color Space: DCI-P3
  • Audio: PCM 24-bit uncompressed

πŸ› οΈ Troubleshooting

Common Issues

VapourSynth Import Errors

# Ensure VapourSynth is properly installed
python -c "import vapoursynth; print('VapourSynth OK')"

# Check plugin installation
vsrepo installed

FFmpeg Not Found

# Verify FFmpeg installation
ffmpeg -version

# Add FFmpeg to system PATH

Memory Issues

  • Reduce thread count in settings
  • Enable test mode for large files
  • Process smaller batches

Performance Optimization

  • CPU: Use thread count = CPU cores
  • RAM: 16GB+ recommended for 4K processing
  • Storage: SSD recommended for temp files
  • GPU: NVIDIA GPU optional for monitoring

πŸ“Š Performance Metrics

Typical processing times (DV β†’ 4K):

  • Test Mode (200 frames): ~2-5 minutes
  • Full Video (25fps PAL): ~0.1-0.5Γ— real-time
  • Batch Processing: Automatic queue management

🀝 Contributing

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

πŸ“„ License

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

πŸ™ Acknowledgments

  • VapourSynth Team - Powerful video processing framework
  • QTGMC by Vit - Industry-standard deinterlacing
  • NNEDI3 - Neural network edge-directed interpolation
  • FFmpeg - Universal media processing

πŸ“ž Support

  • πŸ“– Documentation: Check the code comments and docstrings
  • πŸ› Issues: Report bugs via GitHub Issues
  • πŸ’¬ Discussions: Join GitHub Discussions for help

Developed and tested on Windows 11 | Compatible with macOS and Linux

About

DV to HD upscaling tool using Vapoursynth with QTGMC deinterlacing, neural network enhancement, and batch processing. Transform legacy footage into cinema-ready HD with advanced options for upsampling chroma subsampling and bit depth.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages