3.3 KiB
3.3 KiB
Local Windows Setup for Development
Purpose: Run encoderPro directly on Windows for easier debugging
Quick Setup
1. Install Python
Make sure you have Python 3.9+ installed:
python --version
2. Install Dependencies
cd C:\Users\ckoch\OneDrive\Documents\development\encoderPro
pip install flask flask-cors pyyaml
3. Create Local Config
Create config-local.yaml:
movies_dir: C:/Users/ckoch/Videos/test-movies
archive_dir: C:/Users/ckoch/Videos/archive
work_dir: C:/Users/ckoch/Videos/work
state_db: C:/Users/ckoch/OneDrive/Documents/development/encoderPro/data/state.db
log_dir: C:/Users/ckoch/OneDrive/Documents/development/encoderPro/logs
profiles:
default: sweetspot_qsv
definitions:
sweetspot_qsv:
encoder: intel_qsv_h265
quality: 23
preset: medium
description: "Intel QSV H.265"
subtitle_check:
enabled: true
quality_check:
enabled: true
warn_threshold: 10.0
error_threshold: 20.0
parallel:
max_workers: 1
4. Create Directories
# Create test directories
mkdir C:\Users\ckoch\Videos\test-movies
mkdir C:\Users\ckoch\Videos\archive
mkdir C:\Users\ckoch\Videos\work
mkdir C:\Users\ckoch\OneDrive\Documents\development\encoderPro\data
mkdir C:\Users\ckoch\OneDrive\Documents\development\encoderPro\logs
5. Run Dashboard Locally
cd C:\Users\ckoch\OneDrive\Documents\development\encoderPro
# Set environment variables
$env:CONFIG_FILE="config-local.yaml"
$env:DASHBOARD_DEBUG="true"
# Run dashboard
python dashboard.py
6. Open Browser
Navigate to: http://localhost:5000
Debugging
Check Logs in Real-Time
# In another terminal
Get-Content C:\Users\ckoch\OneDrive\Documents\development\encoderPro\logs\encoderpro.log -Wait
Check Database
# Install SQLite (if not installed)
# Download from: https://www.sqlite.org/download.html
# Query database
sqlite3 C:\Users\ckoch\OneDrive\Documents\development\encoderPro\data\state.db
# View all files
SELECT id, relative_path, state FROM files;
# View stats
SELECT state, COUNT(*) FROM files GROUP BY state;
# Exit
.quit
Test Encoding Directly
# Run reencode script directly
python reencode.py -c config-local.yaml --scan-only
# Check what it found
python reencode.py -c config-local.yaml --stats
Benefits of Local Setup
✅ No Docker rebuild - Just edit and refresh ✅ Direct logs - See errors immediately in console ✅ Debugger - Can use VS Code debugger ✅ Faster iteration - No container restart ✅ Database access - Can query SQLite directly
Common Issues
"Module not found"
pip install flask flask-cors pyyaml
"Permission denied" on database
Make sure the data directory exists and is writable.
"FFmpeg not found"
You need FFmpeg installed on Windows:
- Download from https://ffmpeg.org/download.html
- Add to PATH
Next Steps
- Put a test video file in
C:\Users\ckoch\Videos\test-movies\ - Run dashboard:
python dashboard.py - Open browser:
http://localhost:5000 - Click "Scan Library"
- Select the file
- Click "Encode Selected"
- Watch the console output to see exactly what's happening!
This will help us debug the "pending but not processing" issue.