Skip to content

Cross-platform support: Windows, Linux, and Intel Mac lanes plus loudnorm, captions, and VP9 alpha deliverables - #7

Merged
bmadcode merged 2 commits into
mainfrom
cross-platform
Jul 22, 2026
Merged

Cross-platform support: Windows, Linux, and Intel Mac lanes plus loudnorm, captions, and VP9 alpha deliverables#7
bmadcode merged 2 commits into
mainfrom
cross-platform

Conversation

@bmadcode

@bmadcode bmadcode commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What this does

Makes the Manticore pipeline fully cross-platform (code-complete for Windows, Linux, and Intel Mac, pending real-hardware validation) and lands the Mac-ready enhancements from the 2026-07-21 platform research.

Cross-platform port

  • Transcription: transcribe.py gains an onnx-asr provider running the same parakeet-tdt-0.6b-v3 weights as an ONNX conversion, so verbatim fillers and 80 ms word timestamps carry over. New auto provider picks parakeet-mlx on Apple Silicon (byte-identical to the 1.0 lane) and onnx-asr everywhere else. PEP 508 markers select dependencies per platform; long audio is chunked (20 s windows, 2 s overlap) with a seam-repair merge; words.json stays byte-compatible across lanes.
  • Install-time platform detection: check_deps.py detects OS, arch, and GPU vendor and emits a platform verdict selecting one of three new stack reference files (skills/mc-setup/references/stack-{macos,windows,linux}.md); mc-setup reads the stack file during the interview.
  • Per-OS hardware encoder ladders with real one-frame probes (Windows: nvenc, qsv, amf; Linux: nvenc, vaapi; libx264 fallback). macOS videotoolbox behavior is byte-for-byte unchanged.
  • mc-audio portability: per-OS venv interpreter resolution, cu126 torch index on Windows NVIDIA (size surfaced in consent), cuda/mps/cpu device ladders in MusicGen and AudioLDM2.
  • Portability fixes: valid Windows file URIs in edl_to_fcpxml.py (Path.as_uri), PATH-resolved registered tools and .cmd shim safety in farm_asset.py, per-OS manual steps and in-process preview serving in verify_ograf.py, explicit UTF-8 artifact IO.

Added (works everywhere, validated on macOS)

  • Two-pass loudnorm at final render, -14 LUFS default, configurable via [render] loudness-target, disable with loudnorm = false or --no-loudnorm. Previews are never normalized.
  • mc-package captions: new stdlib-only captions.py emits packaging/captions/final.srt, final.vtt, and transcript.md from the edited timeline (words.json + edl.json), with a caption-only filler cleanup (--no-clean keeps verbatim).
  • mc-stream-pack one-command WebM VP9 alpha transcode + verify from a ProRes 4444 master (--transcode-webm).
  • Resolve handoff docs: free-edition Fusion Scripts install paths for resolve_import.py, the Linux free-edition codec caveat, and an opt-in pointer to the community Resolve MCP server for Studio users (no MCP dependency).

Verification

  • All 26 test suites pass under uv run; genericity release gate clean.
  • macOS smoke-verified: parakeet-mlx stays the default lane, videotoolbox still wins the encoder ladder, loudnorm lands within 1 LU of target on a test tone, captions fixtures cover reorder, multi-source, and cleanup.
  • Windows/Linux lanes are desk-checked only. Needs validation on real hardware before release: onnx-asr lane end to end, nvenc/qsv/amf/vaapi probes, cu126 torch install, .cmd shim launching, Windows locale IO.

README platform matrix, user guide, PIPELINE.md, TODO, CHANGELOG (Unreleased), and the docs/ pages are updated to match.

Summary by CodeRabbit

  • New Features

    • Added cross-platform stack detection and standardized runtime behavior across Windows, Linux, Intel Macs, and Apple Silicon.
    • Improved transcription with auto provider selection, deterministic chunking/merging, and consistent timestamps/confidence handling.
    • Added SRT/VTT captions and a publishable transcript to the packaging output, plus OBS VP9 WebM alpha deliverables (with ProRes alternatives).
    • Added default final-render loudness normalization to -14 LUFS (two-pass).
  • Documentation

    • Updated setup/platform matrices, provider guidance, Resolve free-vs-Studio handoff, and packaging/output details.
  • Bug Fixes

    • Enhanced Windows command safety, media URI generation, UTF-8 handling, encoder portability, and render/verification robustness.

…m mastering, captions, VP9 alpha deliverable

Cross-platform port: onnx-asr transcription lane running the same
parakeet-tdt-0.6b-v3 weights (auto provider, PEP 508 dependency markers,
chunked long audio, byte-compatible words.json), per-OS venv and torch
index in mc-audio, cuda/mps/cpu device ladders, per-OS hardware encoder
ladders with one-frame probes, Windows file URI and .cmd shim fixes,
UTF-8-explicit artifact IO, and install-time OS/GPU detection with three
per-platform stack reference files consumed by mc-setup.

Mac-ready enhancements: two-pass loudnorm (-14 LUFS default) at final
render, mc-package captions emitter (final.srt, final.vtt, transcript.md
from words.json + edl.json), one-command WebM VP9 alpha transcode+verify
in mc-stream-pack, free-Resolve Fusion Scripts import lane docs, and the
opt-in Resolve MCP pointer.

macOS Apple Silicon behavior is unchanged; Windows/Linux lanes are
code-complete pending real-hardware validation. All 26 test suites and
the genericity gate pass.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f45062db-6d54-44b4-934a-a13019430cd3

📥 Commits

Reviewing files that changed from the base of the PR and between ffd0a3e and 2820d15.

📒 Files selected for processing (2)
  • skills/mc-ograf/scripts/verify_ograf.py
  • skills/mc-setup/scripts/check_deps.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/mc-ograf/scripts/verify_ograf.py
  • skills/mc-setup/scripts/check_deps.py

Walkthrough

The update adds cross-platform setup and transcription lanes, hardware-aware rendering with loudness normalization, edited-timeline caption packaging, alpha WebM verification, portable command execution, and expanded platform and Resolve documentation.

Changes

Cross-platform production

Layer / File(s) Summary
Platform detection and stack selection
skills/mc-setup/scripts/check_deps.py, skills/mc-setup/references/stack-*.md, README.md, skills/mc-setup/customize.toml, skills/mc-setup/SKILL.md
Setup detects OS, CPU, and GPU vendor, then reports a recommended stack reference file with transcription lane, Torch source, encoder ladder, and other per-platform defaults.
Multi-provider transcription with ONNX and Parakeet
skills/mc-cut/scripts/transcribe.py, skills/mc-cut/scripts/tests/test-transcribe.py, skills/mc-cut/SKILL.md
Transcription supports automatic provider selection (Parakeet on Apple Silicon, ONNX elsewhere) with deterministic chunk merging, confidence mapping from token scores, and CUDA escalation warnings.
Platform-specific audio environments and device selection
skills/mc-audio/scripts/ensure_workspace.py, skills/mc-audio/scripts/farm_audio.py, skills/mc-audio/scripts/engines/*.py, skills/mc-audio/scripts/tests/test-*.py, skills/mc-audio/SKILL.md
Audio workspace creation detects Windows+NVIDIA for cu126 Torch, resolves per-OS venv interpreter paths, and audio engines use device selection ladders (CUDA → MPS → CPU).
Hardware rendering and loudness normalization
skills/mc-cut/scripts/composite_core.py, skills/mc-cut/scripts/render_final.py, skills/mc-cut/scripts/preflight.py, skills/mc-cut/scripts/tests/test-*.py, docs/user-guide.md
Rendering probes OS-specific hardware encoder ladders (nvenc/qsv/amf/vaapi), wires VAAPI hwupload where required, falls back to libx264, and optionally applies two-pass loudness normalization to −14 LUFS.
Portable command execution and artifact generation
skills/mc-assets/scripts/farm_asset.py, skills/mc-assets/scripts/tests/test-farm_asset.py, skills/mc-cut/scripts/edl_to_fcpxml.py, skills/mc-cut/scripts/tests/test-edl_to_fcpxml.py
Asset farming uses POSIX shell tokenization and PATH resolution with cmd.exe shim safety checks; FCPXML generation uses RFC 8089 file URIs; all artifacts use explicit UTF-8 encoding.
Edited-timeline captions and transcript packaging
skills/mc-package/scripts/captions.py, skills/mc-package/scripts/tests/test-captions.py, skills/mc-package/SKILL.md, skills/mc-pipeline/PIPELINE.md
New packaging CLI resolves source word files to EDL segments, projects words onto edited timeline, cleans optional filler and stutter tokens, groups captions by punctuation and pause, and writes SRT, VTT, and Markdown transcript outputs.
Alpha WebM delivery and verification
skills/mc-stream-pack/scripts/render_verify.py, skills/mc-stream-pack/scripts/tests/test-render_verify.py, skills/mc-stream-pack/SKILL.md, skills/mc-setup/assets/formats/livestream-pack.md
Verification can transcode alpha masters to VP9 WebM, validate yuva420p pixel format and media properties, report transcoded paths and alpha-specific failure hints.
Manual verification, Resolve workflows, and documentation
skills/mc-ograf/scripts/verify_ograf.py, skills/mc-ograf/scripts/tests/test-verify_ograf.py, skills/mc-ograf/references/resolve-workflow.md, docs/index.html, docs/manny-under-the-hood.html, CHANGELOG.md, TODO.md
OGraf verification emits OS-specific manual steps and conditionally serves previews interactively; Resolve references document free-edition Fusion Scripts, codec constraints, and optional Studio MCP workflows; platform and rendering documentation are substantially rewritten.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant check_deps
  participant mc-cut
  participant mc-audio
  participant mc-package
  User->>check_deps: run setup
  check_deps->>check_deps: detect platform and GPU
  check_deps-->>User: report recommended stack
  User->>mc-cut: record media and transcribe
  mc-cut->>mc-cut: auto-select provider (Parakeet or ONNX)
  mc-cut-->>User: words.json with timings
  User->>mc-audio: build audio workspace
  mc-audio->>mc-audio: select CUDA or MPS or CPU
  mc-audio-->>User: validated venv
  User->>mc-package: generate captions
  mc-package->>mc-package: project words onto edited timeline
  mc-package-->>User: SRT, VTT, transcript.md
Loading

Poem

I'm a rabbit hopping cross-platform wide,
With captions and loudness tucked inside.
VP9 alpha sparkles, encoders race,
UTF-8 keeps every word in place.
Stack files bloom from burrow to sky—
Munch, render, verify, and fly! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.15% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main cross-platform lane work and the added loudnorm, captions, and VP9 alpha deliverables.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cross-platform

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
skills/mc-audio/scripts/farm_audio.py (1)

76-88: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Two helper pairs are hand-duplicated across files, each self-documented as a sync risk. venv_python() is copy-pasted between farm_audio.py and ensure_workspace.py (not in this batch), and make_venv_shim() is copy-pasted between the two test files; both docstrings literally say "keep the two in sync," which is a maintenance liability rather than a guarantee.

  • skills/mc-audio/scripts/farm_audio.py#L76-L88: extract venv_python() into a small shared module (e.g. skills/mc-audio/scripts/platform_utils.py) imported by both farm_audio.py and ensure_workspace.py, removing the duplicate definition here.
  • skills/mc-audio/scripts/tests/test-ensure_workspace.py#L30-L65: import a shared make_venv_shim() test helper instead of redefining it, so both test modules exercise the identical fixture logic.
  • skills/mc-audio/scripts/tests/test-farm_audio.py#L29-L92: same — import the shared make_venv_shim() helper instead of keeping a second hand-maintained copy.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/mc-audio/scripts/farm_audio.py` around lines 76 - 88, Remove the
duplicated venv_python() definition from
skills/mc-audio/scripts/farm_audio.py#L76-L88 and
skills/mc-audio/scripts/ensure_workspace.py, move it to a shared platform_utils
module, and import it in both callers while preserving OS-specific paths. In
skills/mc-audio/scripts/tests/test-ensure_workspace.py#L30-L65 and
skills/mc-audio/scripts/tests/test-farm_audio.py#L29-L92, replace each local
make_venv_shim() definition with an import from one shared test helper so both
suites use identical fixture logic.
skills/mc-setup/scripts/check_deps.py (1)

90-110: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

wmic is disabled by default on current Windows 11 releases; try PowerShell first.

wmic has been off by default since Windows 11 23H2/24H2 and is being fully removed in 2026, so on most current machines shutil.which("wmic") will already be None and every probe falls through to the PowerShell branch. Functionally this is handled correctly (fallback works), but since this platform-detection code is explicitly called out as pending real Windows hardware validation, swapping the probe order (PowerShell CIM first, wmic as legacy fallback) avoids a doomed-first-attempt on the majority of current installs.

♻️ Suggested reorder
     commands = [
-        ["wmic", "path", "win32_VideoController", "get", "name"],
         ["powershell", "-NoProfile", "-Command",
          "Get-CimInstance Win32_VideoController | Select-Object -ExpandProperty Name"],
+        ["wmic", "path", "win32_VideoController", "get", "name"],
     ]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/mc-setup/scripts/check_deps.py` around lines 90 - 110, Reverse the
command order in gpu_names_windows so the PowerShell CIM probe runs before the
legacy wmic probe. Keep the existing availability checks, subprocess handling,
output parsing, and wmic fallback behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/mc-ograf/scripts/verify_ograf.py`:
- Around line 77-100: Update manual_verify_steps to quote the pkg path when
constructing cd_cmd for Windows, Darwin, and other systems, while preserving the
existing platform-specific cd syntax and command text.

---

Nitpick comments:
In `@skills/mc-audio/scripts/farm_audio.py`:
- Around line 76-88: Remove the duplicated venv_python() definition from
skills/mc-audio/scripts/farm_audio.py#L76-L88 and
skills/mc-audio/scripts/ensure_workspace.py, move it to a shared platform_utils
module, and import it in both callers while preserving OS-specific paths. In
skills/mc-audio/scripts/tests/test-ensure_workspace.py#L30-L65 and
skills/mc-audio/scripts/tests/test-farm_audio.py#L29-L92, replace each local
make_venv_shim() definition with an import from one shared test helper so both
suites use identical fixture logic.

In `@skills/mc-setup/scripts/check_deps.py`:
- Around line 90-110: Reverse the command order in gpu_names_windows so the
PowerShell CIM probe runs before the legacy wmic probe. Keep the existing
availability checks, subprocess handling, output parsing, and wmic fallback
behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d4ad4d31-2a54-4567-b38d-2d8dbef093c8

📥 Commits

Reviewing files that changed from the base of the PR and between 08bfbfb and ffd0a3e.

⛔ Files ignored due to path filters (1)
  • skills/module-help.csv is excluded by !**/*.csv
📒 Files selected for processing (45)
  • CHANGELOG.md
  • README.md
  • TODO.md
  • docs/index.html
  • docs/manny-under-the-hood.html
  • docs/user-guide.md
  • skills/mc-assets/SKILL.md
  • skills/mc-assets/scripts/farm_asset.py
  • skills/mc-assets/scripts/tests/test-farm_asset.py
  • skills/mc-audio/SKILL.md
  • skills/mc-audio/scripts/engines/music_musicgen.py
  • skills/mc-audio/scripts/engines/sfx_audioldm2.py
  • skills/mc-audio/scripts/ensure_workspace.py
  • skills/mc-audio/scripts/farm_audio.py
  • skills/mc-audio/scripts/tests/test-ensure_workspace.py
  • skills/mc-audio/scripts/tests/test-farm_audio.py
  • skills/mc-cut/SKILL.md
  • skills/mc-cut/scripts/composite_core.py
  • skills/mc-cut/scripts/edl_to_fcpxml.py
  • skills/mc-cut/scripts/preflight.py
  • skills/mc-cut/scripts/render_final.py
  • skills/mc-cut/scripts/tests/test-edl_to_fcpxml.py
  • skills/mc-cut/scripts/tests/test-preflight.py
  • skills/mc-cut/scripts/tests/test-render_final.py
  • skills/mc-cut/scripts/tests/test-transcribe.py
  • skills/mc-cut/scripts/transcribe.py
  • skills/mc-ograf/SKILL.md
  • skills/mc-ograf/references/resolve-workflow.md
  • skills/mc-ograf/scripts/tests/test-verify_ograf.py
  • skills/mc-ograf/scripts/verify_ograf.py
  • skills/mc-package/SKILL.md
  • skills/mc-package/scripts/captions.py
  • skills/mc-package/scripts/tests/test-captions.py
  • skills/mc-pipeline/PIPELINE.md
  • skills/mc-setup/SKILL.md
  • skills/mc-setup/assets/formats/livestream-pack.md
  • skills/mc-setup/customize.toml
  • skills/mc-setup/references/stack-linux.md
  • skills/mc-setup/references/stack-macos.md
  • skills/mc-setup/references/stack-windows.md
  • skills/mc-setup/scripts/check_deps.py
  • skills/mc-setup/scripts/tests/test-check_deps.py
  • skills/mc-stream-pack/SKILL.md
  • skills/mc-stream-pack/scripts/render_verify.py
  • skills/mc-stream-pack/scripts/tests/test-render_verify.py

Comment thread skills/mc-ograf/scripts/verify_ograf.py
…before legacy wmic

Addresses CodeRabbit review on #7: paths with spaces no longer break the
copy-paste manual steps in verify_ograf.py, and Windows GPU detection
tries Get-CimInstance first since wmic is disabled by default on
Windows 11 23H2+ and slated for removal.
@bmadcode

Copy link
Copy Markdown
Contributor Author

Responses to the CodeRabbit review, addressed in 2820d15:

  • verify_ograf.py cd quoting: fixed. The package path is double-quoted in the printed cd commands on all three OS branches.
  • check_deps.py wmic ordering: fixed. The PowerShell Get-CimInstance probe now runs first, with wmic kept only as the legacy fallback for older Windows installs, since wmic is disabled by default on Windows 11 23H2+ and slated for removal.
  • farm_audio.py / test helper duplication: intentionally not changed. The module convention (AGENTS.md) requires every pipeline script to be a self-contained uv-run PEP 723 script with no sibling-module imports, so helpers needed in more than one script are duplicated with keep-in-sync docstrings. pick_encoder, remap_timecode, and lint_script already follow the same pattern; a shared platform_utils module would break the scripts-are-standalone rule that lets any skill run its scripts in isolation.

Both affected test suites re-run green (10 + 20 tests).

@bmadcode
bmadcode merged commit d274179 into main Jul 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant