v3.1 — CPU-Only, Fully Offline

AI Video Encoding
Per Shot, Not Per Video

BAVE analyzes every scene individually and predicts optimal x264 parameters using a forward-surrogate ML model. Professional delivery presets: Theatrical, Streaming, Festival. No GPU required — all inference runs on CPU.

3
Delivery Presets
~500
Parameter Candidates
25
Content Features
0
GPU Required

Built for Professional Encoding

Every feature serves one goal: optimal quality per shot with predictable, repeatable results.

🎬

AI Per-Shot Encoding

The forward-surrogate ML model evaluates ~500 parameter candidates per shot and selects the optimal x264 settings (CRF, preset, tune, AQ, psy-rd, bframes, subme, deblock, me_range, rc_lookahead, etc.) for each scene individually.

🔍

Dual-Detector Scene Detection

Fused AdaptiveDetector + ContentDetector cascade with adaptive thresholds. Catches hard cuts and gradual transitions. Precision guard drops boundaries where frame-MAD ≤ 2× baseline. No magic numbers — thresholds derived from content's own motion energy.

🎯

Three Delivery Presets

Theatrical: CRF unconstrained, VMAF 96 target, veryslow, grain rewarded.
Streaming: CRF+VBV, ~2500kbps target, VMAF 93, slow preset.
Festival: Two-pass bitrate, exact 1GB file size, slow preset.

🧠

ViT-B/32 Semantic Analysis

INT8-quantized Vision Transformer computes whole-video visual diversity (cosine similarity of frame embeddings). Sampled 30–300 frames adaptively. Cached once per video, reused across all shots. Runs fully on CPU.

🔊

Smart Audio Routing

Auto-detects stereo/surround (5.1/7.1), downmix/upmix with libfdk_aac VBR5, 48kHz SOXR resampling. Single continuous audio track — no per-shot cuts, no clicks. Loudness measured via EBU R128.

⚙️

Format Conversion Pipeline

HDR→SDR tonemap, deinterlace, scale to FHD 8-bit BT.709 in one FFmpeg filter chain. Lossless intermediate (qp=0, ultrafast). Blackbar detection via cropdetect at multiple sample points. All reuse cached media_info — no redundant ffprobe.

💾

Crash-Resilient Checkpointing

Shot-level state machine: pending → processing → encoded → concatenated → finalized. SQLite checkpoint DB survives power loss/OOM. Resume from any shot. Automatic 72-hour TTL cleanup.

📦

Professional Output Naming

Project folder: FilmName Year Director
Video: FilmName Year Director FHD STEREO THEATRICAL BAVE.mp4
Stills: FilmName Year Director/Stills/FilmName Year Director Stills 00h00m18s.png
Zero underscores. Metadata & copyright embedded in output and stills.

🖥️

Custom Frameless UI

Premium dark theme with glassmorphism. Horizontal filmstrip with shot thumbnails, palette strips, per-shot parameter preview. Real-time resource gauges (CPU/RAM/disk I/O). Drag-drop import. Batch queue with multiple preset selection.

How the AI Pipeline Works

BAVE's encoding pipeline reuses every heavy computation exactly once. No redundant ffprobe, no re-analysis, no silent fallbacks.

Phase 1: Preview (Runs Once Per File)

  1. ffprobe → media_info (duration, fps, resolution, codec, color space, HDR)
  2. inspect_media → deep container analysis
  3. detect_audio_config → audio topology
  4. measure_audio_loudness → LUFS/peak
  5. detect_blackbars_full_video → crop info
  6. analyze_format → conversion decision (HDR→SDR, deinterlace, scale)
  7. convert_video_for_model → FHD 8-bit intermediate (shared with encode)
  8. detect_scenes_fast → shot_starts (dual detector fusion)
  9. compute_semantic_similarity → ViT-B/32 INT8 (cached LRU=20)
  10. analyze_shots_parallel → features + thumbnails + palettes (ThreadPoolExecutor)

Phase 2: Encode (Per-Shot AI Selection)

  1. VideoProfile from pre-provided media_info — zero new ffprobe
  2. Reuse: converted path, shot_starts, features, semantic similarity (cached)
  3. frame_align_cut_points → exact frame boundaries (0-frame drift)
  4. Per-shot: forward surrogate predicts (bitrate, VMAF, time) for each candidate
  5. Scoring: quality_reward − bitrate_penalty − time_penalty − ceiling_penalty ± tune_reconciliation
  6. Best candidate → FFmpeg x264 command (crf, preset, tune, aq, psy-rd, bframes, subme, deblock, me_range, rc_lookahead, aq-mode, b_adapt, trellis, direct, hqdn3d, cas)
  7. Parallel encode pool (mp.Pool, workers = encoding_workers())
  8. Retry: up to 2 inner retries, preset escalation on timeout
  9. Concat via concat demuxer with exact frame counts (-frames:v)
  10. mux_final_output → single continuous audio track + verify_output

Forward Surrogate Models (v5.0)

Three CatBoost GBDT models exported to ONNX for CPU inference. Trained on 178,208 rows from 896 unique clips.

📊

Bitrate Model

R² = 0.633 | MAE = 3591 kbps
Kendall τ = 0.635 | Spearman ρ = 0.823

VMAF Model

R² = 0.530 | MAE = 1.79
Kendall τ = 0.592 | Spearman ρ = 0.775

⏱️

Time Model

R² = 0.757 | MAE = 7.00s
Kendall τ = 0.709 | Spearman ρ = 0.888

Three Modes for Every Delivery Target

Each preset uses a different optimization objective, not just different settings.

🎭

Theatrical

Unconstrained quality maximization

  • Method: CRF (unconstrained)
  • Target VMAF: 96.0 (cinema standard)
  • Encoder preset: veryslow
  • Bitrate/maxrate/bufsize: None
  • Quality weight: 4.0 (2× boost)
  • Bitrate penalty: 0 (unconstrained)
  • Time penalty: Halved
  • Grain: Rewarded (film grain preserved)
📺

Streaming

Per-shot quality adaptation with VBV cap

  • Method: CRF + VBV
  • Target VMAF: 93.0 (streaming standard)
  • Encoder preset: slow
  • Target bitrate: ~2500 kbps (soft)
  • Maxrate: 3500 kbps | Bufsize: 5000 kbps
  • Quality weight: 2.0 (base)
  • Bitrate penalty: Doubled (0.2)
  • Ceiling penalty: Active at 3500 kbps
  • Grain: Penalized under VBV cap
🏆

Festival

Exact file size via two-pass bitrate

  • Method: Two-Pass Bitrate
  • Target VMAF: 93.0
  • Encoder preset: slow
  • Max size: 1024 MB (exact)
  • Bitrate: Calculated via festival formula
  • Quality weight: 2.0 (base)
  • Time penalty: Full weight (prefers faster)
  • Grain: Penalized under cap
  • Safety factor: 0.85 for overhead

Benchmarks & Specs

BAVE is CPU-only. All AI inference and encoding run locally on your CPU.

System Requirements

OSWindows 10/11 64-bit
RAM (min)8 GB
RAM (rec)16+ GB
CPU (min)4-core (i5-6400 / Ryzen 3 1200)
CPU (rec)8+ core (i7-8700K / Ryzen 7 2700X)
Disk~1.5 GB (includes FFmpeg + models)
GPUNot Required

Pipeline Speed (Typical 1080p/24fps)

~30s
Preview (import + scenes + ViT + shot analysis)
~2-5x
Real-time encode (per shot, CPU-dependent)
~500
Parameter candidates evaluated per shot
0
Redundant ffprobe calls

Fallback Hierarchy (No Silent Degradation)

Level 1: AI surrogate runs normally (all features valid, pred_VMAF ≥ 80)
    │
    ├─► NaN/Inf features → _get_default_conservative_params (CRF 18/20, slow)
    │
    ├─► pred_VMAF < 80 → _get_default_conservative_params (unreliable prediction)
    │
    ├─► FFmpeg pipe decode fails → OpenCV fallback (semantic similarity)
    │
    ├─► PySceneDetect fails → FFmpeg select=gt(scene,threshold) fallback
    │
    └─► Encode timeout → retry with faster preset (same CRF/quality)

Every fallback either logs a warning or raises. No silent degradation.

License Tiers

Per-seat perpetual license with 1 year updates. Offline activation — no subscription, no phone home.

Personal
$199/seat

1 workstation license

  • 1 encoding workstation
  • All 3 delivery presets
  • AI per-shot encoding
  • Ed25519 offline license
  • 1 year updates
  • Email support
  • Device transfer
  • Grant eligibility
Buy Personal
Studio
$1,299/seat

Unlimited + enterprise features

  • Unlimited workstations
  • All 3 delivery presets
  • AI per-shot encoding
  • Ed25519 offline license
  • 1 year updates
  • 24/7 dedicated support
  • Device transfer + bulk management
  • Air-gapped certificate issuance
  • API access for automation
Contact Sales

Try Before You Buy

Free 7-day trial — full features, no credit card. Offline activation via machine config exchange.

Download Trial

Independent Filmmaker Grant

We provide 100% free Studio licenses for student directors, indie filmmakers, and creators facing regional or financial hardship. Reviewed directly by Benyamin Khodabandeh.

Apply for Grant