Skip to main content

Compositor - Multiview

Currently not released yet. Beta documentation

Compositor - Multiview - MistProcMultiview

This is a compositor made to serve as an input process. It's in a bit of a special place as it's meant to create a new stream, but only from processing existing streams, using the raw track of these streams and compositing them into one output.

While the input/output are directly compatible with SDI, should you wish to show them in browser or over IP you will need to add an encoder.

tip
  • The multiviewer tries to generate a frame at the requested framerate. This means that depending on how sources line up a frame can be behind. In this case the last frame will be used.
  • While the multiviewer tries to uphold the requested framerate your hardware will determine whether it is possible. Do not expect a 100% flawless framerate.

Configuration

The multiviewer is best configured through the interface. The most notable thing is that every stream added to the Multiview will be put into the given resolution. This means that the stream will need to scale/resize, so setting this correctly is key. Other than that a size and position can be given to each source to customize the positioning. If no position or size has been given a grid will be created with "best fit".

Interface

The multiviewer is quite complex, however if you do it in a few steps it's much easier.

Setting up multiview

First you will need to set up the source to multiview and you will see the designer and additional options appear.

image

Multiview designer

For adding/removing/compositing we recommend opening the designer, it makes the task much easier.

image

tip
  • Any stream that has a JPG output will show the JPG instead of the source name

Changing the multiview live

If you made edits to the designer, whether it is adding, removing or changing positions of sources you will see the changes appear at the next generated frame.

image

Configuration file / API

The following would be setting up grid for 9 streams using the scaling defaults

    "multiview": {
"always_on": true,
"copyaudio": "0",
"name": "multiview",
"processes": [],
"resolution": "1920x1080",
"source": "multiview",
"sources": [
{
"h": 360,
"stream": "example1",
"text": "custom text",
"w": 640,
"x": 0,
"y": 0
},
{
"h": 360,
"stream": "example2",
"text": "",
"w": 640,
"x": 640,
"y": 0
},
{
"h": 360,
"stream": "example3",
"text": null,
"w": 640,
"x": 1280,
"y": 0
},
{
"h": 360,
"stream": "example4",
"text": null,
"w": 640,
"x": 0,
"y": 360
},
{
"h": 360,
"stream": "example5",
"text": null,
"w": 640,
"x": 640,
"y": 360
},
{
"h": 360,
"stream": "example6",
"text": null,
"w": 640,
"x": 1280,
"y": 360
},
{
"h": 360,
"stream": "example7",
"text": null,
"w": 640,
"x": 0,
"y": 720
},
{
"h": 360,
"stream": "example8",
"text": null,
"w": 640,
"x": 640,
"y": 720
},
{
"h": 360,
"stream": "example9",
"text": null,
"w": 640,
"x": 1280,
"y": 720
}
],
"stop_sessions": false,
"tags": [],
"target_fps": 60
}

Command line

Using the command line is not recommended for the Multiview as it doesn't allow you to make live changes. However you can do it should you wish.

Example: Setting up a Multiview through commandline

MistProcMultiview --sources {"h":720,"stream":"example1","text":"give","w":960,"x":0,"y":0} --sources {"h":360,"stream":"example2","text":"me","w":480,"x":960,"y":0} --sources {"h":360,"stream":"example3","text":"that","w":480,"x":1440,"y":0} --sources {"h":360,"stream":"example4","text":"sweet","w":480,"x":960,"y":360} --sources {"h":360,"stream":"example5","text":"sdi","w":480,"x":1440,"y":360} --sources {"h":360,"stream":"example6","text":"image","w":480,"x":0,"y":720} --sources {"h":360,"stream":"example7","text":"or","w":480,"x":480,"y":720} --sources {"h":360,"stream":"example8","text":"bust","w":480,"x":960,"y":720} --sources {"h":360,"stream":"example9","text":"!!!","w":480,"x":1440,"y":720} --copyaudio 0 --resolution 1920x1080 --target_fps 60 -s multiview multiview

Required options

KeyNameTypeDescriptionValidation
sinkTarget streamstringStream to which the generated track will be added. Defaults to the source stream. May contain variables.
sourcesSource to addstringsource and parameters to add to the multiviewer

Source options

KeyNameTypeDefault / ValueUnitHelp / DescriptionOptions (if applicable)
streamstream nameStringStream name within MistServer to use
texttext to displayStringstream name"" or null for empty, string for a value otherwise stream name will be used.
wwidthIntegerautomatic fitpxwidth the stream should use
hheightIntegerautomatic fitpxheight the stream should use
xpositioning XIntegerautomatic fitpxposition the stream gets in
ypositioning YIntegerautomatic fitpxPosition the stream gets in

Optional options

KeyNameTypeDefaultCLI OptionDescriptionChoices
resolutionResolutionstring1920x1080--resolutionResolution of the output stream (e.g. 1920x1080).
aspectAspect ratio handlingselectletterbox--aspectHow to handle aspect ratio mismatches between input and grid cells.letterbox – Preserve aspect, add black bars, crop – Preserve aspect, crop excess, stretch – Stretch to fit (may distort image)
scalingScaling algorithmselectinteger--scalingAlgorithm used to scale input sources to fit grid cells.bilinear – High quality, slower, nearest – Fast, lower quality, integer – Integer-only scaling (fast + HQ)
target_fpsTarget framerateint0--target_fpsTarget output framerate (fps). If 0, waits for all sources to have new frames before output.
copyaudioCopy audiostring--copyaudioCopy audio from one of the input sources.