Repository navigation
Locked outputs: render outputs of a lock group in one ffmpeg - #419
Merged
Merged
Conversation
A lock group is made by hand from outputs that read the same input and have no crop. The step supervisor renders it as one process: the composite is shared where the members' viewport lists start the same, and each member gets its own encode written to its own MediaMTX path, so relay slots and the per-path fan-out are unchanged. Adds output_groups and outputs.group_id (both schemas, Postgres migration 0015), /outputs/groups routes, a 'Render together with' choice on the Outputs card, MAX_GROUP_MEMBERS and MEDIAMTX_RTMP_FLEET_BASE_URL (fleet steps published to the app host's 127.0.0.1). Plan: docs/plans/plan_locked_outputs.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019r6rBh5m7wxPwEpZ5vkaBK
Database Test Matrix ✅Ran full test suite against both SQLite and PostgreSQL.
See workflow results for details. |
The hook calls setupToken(session) but never imported it, so main's Vitest run failed with ReferenceError (2 tests in useDskMetacodeSources.test.jsx). The import restores the call that PR #418 added. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CT3RKPqtPUMvMaBZ6zHFbw
Database Test Matrix ✅Ran full test suite against both SQLite and PostgreSQL.
See workflow results for details. |
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.
Requested by Juha · project thread
Before: every output with a DSK step ran its own ffmpeg, so two outputs from the same feed decoded and composited the picture twice and could drift apart.
After: outputs the user locks together are rendered by one ffmpeg. The composite is shared where the members' viewport lists start the same, and each member gets its own encode, written to its own MediaMTX path. Relay slots and the per-path fan-out read those paths as before, so a failing destination never restarts the group. Locking is manual only; crop and direct mode (tee straight to targets) are left out of v1.
How:
output-group-plan.js(buildGroupArgs, pure): trie of the members' viewport chains withsplit;buildDskStepArgsis its one-member case, so unlocked outputs are unchanged.output_groupstable andoutputs.group_id(both Prisma schemas, SQLite, Postgres migration0015), group rules indb/outputs.js: same input path, no crop, at mostMAX_GROUP_MEMBERS(default 4), a group of one dissolves.OutputStepManagerruns a group as one process (one step againstMAX_OUTPUT_STEPS); any graph change restarts the group once.GET/POST /outputs/groups,DELETE /outputs/groups/:id,PATCH /outputs/:id { groupId }; "Render together with" on the Outputs card (fi/en/sv).MEDIAMTX_RTMP_FLEET_BASE_URL: fleet steps published to the app host's 127.0.0.1.docs/plans/plan_locked_outputs.md, with direct mode listed as possible future work.Tests: new
output-groups.test.js(golden args, a real ffmpeg run of the graphs, database rules, supervisor, routes), lcyt-rtmp suite 367 passing, lcyt-web unit and vitest suites passing, schema drift test passing. Never run against a real MediaMTX or fleet.Generated by Claude Code