Repository navigation
feat(tune): vmafx-tune in Go (Stage 1 — compare subcommand) - #17
Merged
Merged
Conversation
Adds cmd/vmafx-tune/ — the Stage-1 Go port of the vmaf-tune rate-quality tuning CLI. The binary is installed as `vmafx-tune-go` alongside the Python binary to avoid collisions during the migration (ADR-0705). Stage 1 ships one fully-functional subcommand: - `compare`: rate-quality sweep using a VMAF-target CRF bisect for each (codec, target) pair. Supports libx264 and libx265 via subprocess ffmpeg. Hardware encoders are Stage-2 scope. New Go packages: - pkg/encoder/ Encoder interface + LibX264Encoder / LibX265Encoder - pkg/bisect/ Stateless VMAF-target bisect (mirrors Python Phase B) - pkg/report/ JSON (RFC 8259 strict, NaN→null) + Markdown renderers JSON output is schema-compatible with the Python vmaf-tune compare v1/v2 payload so the existing report.py renderer ingests Go output unchanged. All other subcommands (tune-per-shot, ladder, fast, corpus, report, ...) are stubs that print a redirect to `vmaf-tune <subcommand>`. Python tools/vmaf-tune/ is unchanged. Deliverables: - ADR-0705 (docs/adr/0705-vmafx-tune-go-stage1.md) - Research digest (docs/research/vmafx-tune-go-stage1-2026-05-28.md) - User docs (docs/usage/vmafx-tune-go.md) - AGENTS.md invariants (cmd/vmafx-tune/AGENTS.md) - Changelog fragment (changelog.d/added/vmafx-tune-go-stage1.md) - Rebase notes + state.md entries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Union all Phase 4a ADR index rows (0701-0706) in numeric order. Union go.mod/go.sum: merge cobra deps (tune) with gRPC/prometheus deps (server). Union .gitignore, Makefile, docs/principles.md, docs/rebase-notes.md, docs/state.md with all Phase 4 foundation + server + rust-sys additions.
lusoris
marked this pull request as ready for review
May 28, 2026 11:26
6 tasks done
19 of 26 tasks
14 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cmd/vmafx-tune/— the Stage-1 Go port ofvmaf-tune, installed asvmafx-tune-goalongside the Python binary during the migrationcomparesubcommand: rate-quality sweep via VMAF-target CRF bisect for libx264 and libx265vmaf-tune <subcommand>; Pythontools/vmaf-tune/is unchangedNew packages
pkg/encoder/Encoderinterface +LibX264Encoder/LibX265Encoder(subprocess ffmpeg)pkg/bisect/pkg/report/EmitJSON(RFC 8259 strict, NaN→null) +EmitMarkdownrenderersJSON output is schema-v1/v2 compatible with the Python
compare.py/report.pyoutput.Test plan
go build ./cmd/vmafx-tune— clean buildgo test ./... -count=1— all pass (bisect convergence, encoder mock, stub redirect, version flag)go vet ./...— cleanvmafx-tune-go compare --reference src.mp4 --codecs libx264 --targets 60 --format json— produces valid RFC 8259 JSON with expected schema shapevmafx-tune-go ladder— exits non-zero, prints redirect tovmaf-tune ladderSmoke-test reproducer
Deliverables checklist
docs/research/vmafx-tune-go-stage1-2026-05-28.md## Alternatives consideredAGENTS.mdinvariant note:cmd/vmafx-tune/AGENTS.mdchangelog.d/added/vmafx-tune-go-stage1.mdfragmentdocs/rebase-notes.mdentry: no rebase impact (fork-only new directories)State / ADR
docs/adr/0705-vmafx-tune-go-stage1.mddocs/state.md:T-VMAFX-TUNE-GO-STAGE1-2026-05-28row added to Recently closedOut of scope (Stage 2+)
Hardware encoders (NVENC, QSV, AMF),
tune-per-shot,ladder,fast,corpus,report, HTML rendering,--workersconcurrency cap,--score-backendGPUauto-detection.
ffmpeg-patches impact
no ffmpeg-patches impact: this PR adds a new Go binary under
cmd/; it does nottouch any C API surface, public headers,
meson_options.txt, or theffmpeg-patches/stack.
🤖 Generated with Claude Code