Membrane SDK for LiveCompositor, that takes multiple input streams, transforms them according to provided transformations and composes them into output streams / videos.
It is part of Membrane Multimedia Framework.
The package can be installed by adding membrane_live_compositor_plugin
to your list of dependencies in mix.exs
:
def deps do
[
{:membrane_live_compositor_plugin, "~> 0.10.0"}
]
end
LiveCompositor requires having locally installed:
- FFmpeg 6.0 - for streaming inputs / outputs to LiveCompositor
- wget - for downloading LiveCompositor binary file
- tar - for decompressing LiveCompositor binary file
Examples can be found in examples
directory.
To run example run:
cd examples
mix deps.get
mix run lib/[example_name].exs
The example presents dynamically added video arranged onto a tiled layout and "twisted" with the simple shader. Shaders can be used to create custom visual effects.
The example presents dynamic transition of input videos. Transitions are used for smooth, dynamical animations.
The example presents dynamic outputs linking. Multiple outputs are useful for live-streaming for multiple platforms (e.g. different layout for mobile devices), target resolutions or any other case, when user want to process input videos differently.
Example of processing that does not need to be real time. Multiple offline sources (mp4 files) are composed together and produce output mp4 file. To simplify the example the same input file is read multiple times as a separate inputs. Depending on hardware capabilities this example can run faster or slower than real time.