8.3 KiB
encoderPro Dashboard - New Features Summary
Overview
This document summarizes the new features added to the encoderPro dashboard to enable profile selection and individual movie re-encoding.
Feature 1: Encoding Profile Selection in Settings
What It Does
Users can now select the default encoding profile directly from the dashboard's Encoding Settings panel, without manually editing the YAML configuration file.
User Interface Changes
- Encoding Settings Panel (formerly "Quality Settings")
- New section: "📹 Encoding Profile"
- Profile dropdown with all available profiles
- Profile description area showing encoder, quality (CRF), preset, and description
- Combined save button for both profile and quality check settings
How It Works
- Dashboard loads available profiles from
/api/profileson page load - Populates dropdown with profile names
- Shows default profile as pre-selected
- When profile is selected, displays detailed information about:
- Encoder (e.g.,
cpu_x265,nvidia_nvenc_h265) - Quality (CRF value)
- Preset (e.g.,
slow,medium,fast) - Description (if available)
- Encoder (e.g.,
- Clicking "💾 Save All Settings" updates the config file with the new default profile
API Endpoint Used
GET /api/profiles- Get available profilesPOST /api/config- Save updated configuration
Code Location
- Frontend:
templates/dashboard.htmllines 411-480 (HTML), lines 927-968 (JavaScript) - Backend: Existing
/api/profilesand/api/configendpoints
Feature 2: Individual Movie Selection and Re-Encoding
What It Does
Users can select specific movies from the file quality table and queue them for re-encoding with a chosen profile. This allows targeted re-processing without re-encoding the entire library.
User Interface Changes
File Quality Analysis Table
- New checkbox column (first column)
- "Select All" checkbox in header
- Individual checkboxes for each file
- Disabled for files currently processing
Selection Controls (above table)
- Selection counter: Shows "X files selected"
- Profile dropdown: Select encoding profile for re-encoding
- Re-encode button: "🎬 Re-encode Selected"
- Disabled when no files selected or no profile chosen
- Enabled when both conditions are met
How It Works
Selection Flow
- User views files in the quality table
- Can filter by state (all, pending, completed, failed)
- Checks boxes next to files they want to re-encode
- Selection count updates in real-time
- Uses "Select All" to select all visible files at once
Re-Encoding Flow
- User selects one or more files
- Chooses encoding profile from dropdown
- Clicks "🎬 Re-encode Selected"
- Confirmation dialog shows:
- Number of files
- Selected profile
- Warning that state will be reset
- On confirmation:
- Files reset from
completed/failedtopending - Profile name assigned to each file
- Success message shown
- Table refreshes to show updated states
- Files reset from
Background Process
- API endpoint
/api/jobs/reencode-selectedreceives request - Updates database:
UPDATE files SET state = 'pending', profile_name = ?, updated_at = CURRENT_TIMESTAMP WHERE id IN (...) - Files are now queued for processing
- When user starts the encoding job, these files will be processed with their assigned profiles
Use Cases
- Quality Upgrade: Re-encode completed files with higher quality profile (lower CRF)
- Failed File Recovery: Re-process failed files with different encoder or settings
- Profile Testing: Test new profiles on specific files before batch processing
- Selective Compression: Re-encode only large files with more aggressive compression
- Format Change: Switch from CPU to GPU encoding for specific files
API Endpoint
New Endpoint: POST /api/jobs/reencode-selected
Request:
{
"file_ids": [1, 5, 12, 23],
"profile": "quality_cpu"
}
Response:
{
"success": true,
"message": "4 files queued for re-encoding",
"count": 4
}
Code Location
- Frontend HTML:
templates/dashboard.htmllines 482-531 (table structure) - Frontend JavaScript:
templates/dashboard.htmllines 1033-1189 (selection logic) - Backend API:
dashboard.pylines 575-615 (new endpoint) - Documentation:
DASHBOARD-API.mdlines 310-340
Technical Implementation Details
JavaScript State Management
let selectedFiles = new Set(); // Tracks selected file IDs
let availableProfiles = {}; // Caches profile definitions
Key Functions
loadEncodingProfiles()
- Fetches profiles from API
- Populates both dropdowns (settings and re-encode)
- Updates profile description
toggleFileSelection(fileId)
- Adds/removes file ID from selection set
- Updates selection counter
toggleSelectAll()
- Selects/deselects all non-disabled checkboxes
- Updates selection set
updateSelectedCount()
- Updates "X files selected" text
- Enables/disables re-encode button based on:
- At least one file selected
- Profile chosen
reencodeSelected()
- Validates selection and profile
- Confirms with user
- Calls API endpoint
- Refreshes table on success
Database Changes
The /api/jobs/reencode-selected endpoint updates the files table:
- Sets
statetopending - Sets
profile_nameto chosen profile - Updates
updated_attimestamp
This allows the main encoding script to pick up these files and process them with the specified profile.
User Workflow Example
Scenario: Re-encode low-quality files with better settings
-
Filter Files
- Select "Completed Only" from filter dropdown
- Table shows all completed encodes
-
Review Results
- User notices some files have poor quality scores
- Or some files have large file sizes despite encoding
-
Select Files
- Click checkboxes next to files needing re-encoding
- Or click "Select All" to choose all visible files
- Counter shows "5 files selected"
-
Choose Profile
- Select "quality_cpu" from profile dropdown
- (This profile uses CRF 19 for higher quality)
-
Queue Re-Encoding
- Click "🎬 Re-encode Selected"
- Confirm dialog: "Re-encode 5 file(s) using profile 'quality_cpu'?"
- Click OK
-
Processing
- Success message: "✅ 5 file(s) queued for re-encoding!"
- Files now show as "pending" in table
- User clicks "▶️ Start Processing" to begin encoding
-
Monitoring
- Files process with new profile
- Statistics update in real-time
- Activity log shows progress
Benefits
For Users
- No YAML editing required - Configure profiles through UI
- Granular control - Re-encode specific files, not entire library
- Flexibility - Test different profiles on different files
- Recovery - Easy to retry failed files with different settings
- Efficiency - No need to re-encode entire library to change quality
For Workflow
- Iterative improvement - Test and refine encoding settings
- Quality assurance - Upgrade files that didn't meet quality standards
- Resource optimization - Use GPU profiles for some files, CPU for others
- Error recovery - Quickly retry failed encodes with different encoders
Future Enhancements
Potential improvements for future versions:
-
Bulk Profile Assignment
- Apply different profiles to different groups of files
- Profile recommendations based on file characteristics
-
Quality Preview
- Show estimated file size before re-encoding
- Compare current vs. target quality scores
-
Scheduled Re-Encoding
- Queue files for processing during off-peak hours
- Priority queue for urgent re-encodes
-
Batch Operations
- Reset multiple files to different states
- Bulk delete from database
- Export selection to CSV
-
Advanced Filtering
- Filter by quality score, file size, encoder used
- Save custom filter presets
- Search by filename patterns
Summary
These two features provide users with:
- Easy profile management through the UI
- Precise control over which files to re-encode
- Flexible workflows for quality improvement and error recovery
The implementation is fully integrated with the existing encoderPro system and requires no changes to the core encoding logic.