Skip to content

Releases: BishnuMahali/Video-Optimizer

v3.0.0 - The Ultimate Plateau-Aware VMAF Edition

21 May 10:19

Choose a tag to compare

Video Optimizer v3.0.0 — The Ultimate Plateau-Aware VMAF Edition

We are thrilled to announce the official release of Video Optimizer v3.0.0. This major release unifies both the Python and PowerShell suites under a highly optimized, state-of-the-art visual quality seeking engine. By combining absolute feature parity with advanced algorithmic bounds and defensive thread safety, v3.0.0 represents a new milestone in automated, visually perfect compression.

🚀 Key Architectural Upgrades

1. Two-Stage Plateau-Aware Binary Search (PABS) with Directional Search

Standard binary search tends to overshoot towards visual extremes (like CQ 1) when visual targets are mathematically unreachable due to the source video's quality limits. v3.0.0 introduces a state-of-the-art, noise-tolerant visual seek pipeline:

  • Stage 1 (Binary Search & Plateau Break): Probes boundary extremes (floor cq_max and ceiling cq_min) first to allow instant 1-pass exits on low targets or baseline-sufficient files. Midpoint search loops are executed until boundaries collapse to a width of 1 integer CQ. A 3-point plateau check monitors probed scores; if 3 CQs yield scores within a 0.05 tolerance, the engine breaks early to save processing time and sets the highest CQ on the plateau as the midpoint.
  • Stage 2 (Directional Refinement Scan): Scans the tested history to find the closest tested similar_cq in the appropriate direction:
    • Case A (Quality is sufficient): Searches to the right (higher CQs / more compression) to find the absolute maximum compression that remains on the plateau.
    • Case B (Quality is insufficient): Searches to the left (lower CQs / higher quality) to find the first CQ that achieves sufficient quality.
  • Visual Ceiling Mapping: When a VMAF target is unreachable, the engine dynamically shifts the effective VMAF target exactly to the known ceiling score (ceiling_score), locking onto the maximum achievable visual quality without size-bloating visual overshoots.

2. Bulletproof Thread Safety & Exception Handling

To eradicate background thread unpacking crashes (cannot unpack non-iterable NoneType object), v3.0.0 wraps all visual-seeking loops inside defensive fallback handlers:

  • Python GUI: run_vmaf_search is encapsulated in a comprehensive try/except block. If an extreme environment error occurs, it logs a full traceback and returns a safe fallback tuple (26, 0.0, 0.0, 26) to ensure seamless thread unpacks.
  • PowerShell TUI & GUI: The VMAF seeking helpers and background runspace job loops are guarded with robust try/catch streams, allowing processing to fail gracefully, clean up temporary files, and log errors without crashing active runs.

3. One-Time Reference Caching (300% Speedup)

Probing loops historically cut sample segments on every iteration, leading to excessive Disk I/O. v3.0.0 extracts reference sample segments exactly once before seeking. Probing iterations reuse these segments, speeding up VMAF searches by up to 300% and saving tremendous drive endurance.

4. System-Aware Multi-Threaded VMAF Calculations

Uses logical core scaling to configure libvmaf=n_threads=N dynamically (N = CPU_Cores // 2, capped between 1 and 4), reducing bottleneck comparative overhead during sample evaluations.

5. Platform-Independent Configuration Persistence

The Python GUI config storage directory is made immune to varying launch paths by using a platform-independent fallback (Path.home() / ".Video_Optimizer" instead of the current working directory .), and automates settings saving on both GUI window close (WM_DELETE_WINDOW) and console interrupt (KeyboardInterrupt / Ctrl+C).


💾 Downloads / Individual Files

Users can download the individual scripts below to run their preferred edition of the suite:

  • Video-Optimizer-GUI.py: The flagship desktop app with sleek CustomTkinter themes, virtualized logs, stats dashboards, and automatic virtual environment boots.
  • Video-Optimizer-GUI.ps1: A native, modern WPF graphical application written in PowerShell.
  • Video-Optimizer.ps1: The keyboard-driven interactive CLI/TUI script, optimized for headless configurations, terminals, and automation scripts.
  • Video Optimizer.bat: The smart launcher utility that handles Python detection, local virtual environments, pip packages, and executes the GUI natively.

🤝 Support & Connect

These projects are simple utility scripts built to solve everyday problems. If you find them helpful in your workflow and would like to support me, any small contribution is deeply appreciated! ❤️

Buy Me A Coffee Ko-fi Patreon PayPal

GitHub Website YouTube Instagram Facebook X (Twitter) LinkedIn

v2.5.0 - Ultimate Python GUI Edition

12 May 18:43

Choose a tag to compare

The Ultimate Upgrade (v2.5.0)

This release marks the transition to Python as the primary interface, while retaining the core high-performance FFmpeg logic that made the PowerShell version a success.

🌟 New Python GUI Features:

  • Professional Desktop Interface: Built with CustomTkinter for a sleek, system-aware Light/Dark mode experience.
  • VMAF Target Ladder (Multi-Pass): Automatically hunt for the perfect visual quality.
  • Persistent Config System: All settings are now saved automatically.
  • Smart Encoder Intelligence: Auto-detects supported hardware encoders (NVENC, AMF, QSV).
  • Beautified Real-Time Logs: High-fidelity console output.

⚙️ Engine Restoration (Best-in-Class Logic):

  • Full Hardware Parity: Matches the original PowerShell script's capabilities.
  • GPU-Accelerated Decoding: Uses -hwaccel flags for maximum throughput.
  • NVENC Visual Tuning: superior NVIDIA encoding quality.

Note: PowerShell version remains available and updated with engine parity fixes.

v2.0.0: The VMAF Update

09 May 13:19

Choose a tag to compare

Major Release: Dynamic VMAF Optimization Engine

Version 2.0.0 introduces high-precision perceptual quality targeting using Netflix's VMAF algorithm.

Key Features:

  • Dynamic VMAF Engine: Automatically finds the perfect Constant Quality (CQ) value for each video.
  • Adaptive TUI: New terminal interface that evolves based on mode selection.
  • Hybrid Precision Search: Up to 15 sample-based passes to home in on visual transparency.
  • Professional Reporting: New ASCII summary tables and VMAF-aware logging.

v1.1.0 - Smarter retries and launcher

08 May 19:43

Choose a tag to compare

What's Changed

  • Added a Windows launcher, Video Optimizer.bat, that prefers the newest installed PowerShell 7+ through pwsh.exe and falls back to Windows PowerShell.
  • Added an unoptimizable retry cache for files kept in place: the same file with the same encoder, quality, preset, audio, and container settings is skipped on future runs, while changed settings or changed files retry normally.
  • Improved recursive scanning behavior and hardcoded extension handling since v1.0.0, including a fix for extension mis-exclusion.
  • Improved encoder detection and interactive menu navigation, including folder browser support.
  • Updated README usage notes for the launcher and failed-file cache.

Validation

  • PowerShell script parse check passed.
  • Launcher was smoke-tested far enough to confirm it starts the script and selects PowerShell 7 in this environment. Full menu interaction requires a real console window.

v1.0.0 - Initial Release

07 May 22:59

Choose a tag to compare

The first official release of the Ultimate Video Optimizer! This script provides a powerful, interactive terminal interface to optimize your video library using FFmpeg with hardware acceleration support.

Key Features:

  • Interactive TUI: Easily configure target folders, encoders, quality, and more.
  • Hardware Acceleration: Auto-detects and supports NVIDIA (NVENC), AMD (AMF), and Intel (QSV).
  • Multi-Pass Quality Fallback: Automatically tries lower quality settings if the initial pass doesn't result in a smaller file.
  • Recursive Processing: Optimize entire directory trees.
  • Smart Audio Handling: Automatic AAC fallback and compatibility validation for MP4/MOV containers.
  • Safety First: Validates output integrity (size + duration) and provides safe replacement with optional backups.
  • Flexible Post-Processing: Choose how to handle files that couldn't be optimized (Move, Delete, or Ignore).

Requirements:

  • PowerShell 5.1 or later.
  • FFmpeg installed and in your PATH.