Skip to content

Plan: Correct encoding decision model #101

@shiny-code-bot

Description

@shiny-code-bot

Objective

Correct Mediaforce's encoding decision model after the ab-av1/VMAF workflow proved to be the wrong long-term center of the product. Keep the working host orchestration, queue, staging, review media, and settings surfaces, but move the product toward a size-first and subjective-review-first workflow where metrics are guardrails instead of the boss.

The near-term correction is to make the operator's preferred outcome explicit: target episode size normalized by runtime, 1080p/source-preserving resolution defaults, and low-bitrate AV1 tolerance as configurable policy. The longer-term correction is to evaluate and integrate a scene-aware engine path such as Av1an or Xav with SSIMULACRA2 support after the workflow can compare outputs honestly.

Finish Line

Size-first review workflow is explicit, tested, and has a measured scene-aware engine migration path.

Current Status

State: Done
Next action: Return to app testing with the improved size-first defaults and current ab-av1 engine path.
Blocked by: None
Waiting for: None
Last verified: 2026-05-27 after #102, #103, and #104 were completed; PRs #105-#110 merged; bounded bakeoff evidence collected on mounted /Volumes/media.

Scope

  • In: Policy/default fields for size-first goals, assistant/tuning context, Folder Studio/settings display, docs, tests, and the durable engine-migration plan.
  • In: Review of blast radius around encode quality search, host capability checks, queue review gates, and settings persistence.
  • Out: Replacing the encode engine in the first slice, rewriting queue orchestration, or making Av1an/Xav mandatory before a bakeoff.

Acceptance Criteria

  • Defaults include a configurable size goal, typical runtime, quality floor, max height, and metric guardrails.
  • Runtime settings can save/load those defaults without dropping existing settings.
  • Folder tuning payloads expose the default size goal so the assistant has a concrete target even when the operator says only "use the defaults" or asks for a smaller encode.
  • UI copy distinguishes target size from safety ceiling and review metrics.
  • Existing ab-av1 sample/encode paths remain backward compatible.
  • Tests cover normalization, settings save payloads, and folder tuning context.
  • Follow-up issues exist for scene-aware engine bakeoff and SSIMULACRA2/Av1an/Xav integration.

Relationships

Parent plan for the encoding decision-model correction. Sub-issues track independently reviewable implementation slices.

Validation

  • uv run --with pytest pytest tests/test_tuning_runtime.py tests/test_encode_queue_recovery.py
  • npm --prefix frontend run test:unit -- --run
  • npm --prefix frontend run check
  • npm --prefix frontend run lint
  • bash scripts/pre-commit-check.sh before PR readiness

Decisions

  • The current ab-av1 sparse VMAF/XPSNR workflow is retained only as the fast sample engine, not treated as the product's final decision model.
  • Size target and subjective review are first-class product concepts; VMAF/XPSNR are guardrails.
  • Do not make Av1an/Xav/SSIMULACRA2 mandatory until a local bakeoff proves installability, speed, and output quality on representative episodes.

Open Questions

Resolved for this plan:

  • Representative bakeoff item used: tv/Stranger Things/Season 4/Stranger.Things.S04E09.Chapter.Nine.The.Piggyback.1080p.NF.WEB-DL.DDP5.1.Atmos.H.264-Kitsune.mkv.
  • Final engine selector decision for now: keep the current global ab_av1_fast_sample engine for production testing; treat Av1an/SSIMULACRA2 as future integration work after host plugin/runtime readiness is proven across a broader sample set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    planDurable planning issueplan:donePlan completed or superseded

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions