Add multivariant output support to Membrane.Transcoder#21
Open
khamilowicz wants to merge 1 commit into
Open
Conversation
4b429b5 to
406c796
Compare
The output pad is now availability: :on_request, allowing a single transcoder bin to produce multiple independent output streams each with their own output_stream_format, transcoding_policy, and native_acceleration options. Single-output backward-compatible usage is unchanged — implicit via_out links inherit bin-level options and use the same internal child names, so existing tests and code require no modification. Multi-output pipelines use a Membrane.Tee.Parallel (new dep) placed between the connector and per-output transcoding chains within a single atomic spec, avoiding the race where the Tee could receive data before any output is connected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
406c796 to
0eb8420
Compare
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
Membrane.Transcodernow exposesavailability: :on_requestoutput pads, each accepting independentoutput_stream_format,transcoding_policy, andnative_accelerationoptions viavia_out. Single-output backward-compatible usage is unchanged.Membrane.Tee.Parallelbetween the connector and per-output transcoding chains, created atomically with all outputs in one spec to avoid the race where the Tee could receive data before any output is connected.examples/multivariant_output.exsdemonstrates a single H264 input transcoded simultaneously to H264, H265, and VP8 outputs.Usage
Test plan
mix test --exclude vk— 54 tests, 0 failureselixir examples/multivariant_output.exsto verify the example produces three non-empty output files🤖 Generated with Claude Code