Stream mixing layouts

更新时间:
复制 MD 格式

Alibaba Cloud Real-Time Communication (RTC) provides 12 video layout configurations that you can use to start a bypass live stream or cloud recording. This topic describes these layout configurations.

Note To create a custom layout, go to the console and choose Bypass Live Streaming > Layout Management, or call the CreateMPULayout operation.

Layout elements

ParameterTypeDescription
panesobject arrayInformation about the panes. A maximum of 16 panes can be configured.
audio_mix_countintThe maximum number of audio streams that can be mixed.

The following table describes the pane parameters.

ParameterTypeDescription
paneidintThe ID of the pane.
major_paneint1: Main pane
xfloatThe x-coordinate. This is a normalized percentage.
yfloatThe y-coordinate. This is a normalized percentage.
widthfloatThe width of the pane. This is a normalized percentage.
heightfloatThe height of the pane. This is a normalized percentage.
zorderintThe display layer. Layer 0 is the bottom layer. Layer 1 is displayed on top of layer 0, and so on.

Layout coordinate system

Layout coordinate system

Default layouts

Alibaba Cloud RTC provides the following layouts:

Layout IDNumber of video sourcesLayout name
11Single view 1
22Tiled left and right 1
32Picture-in-Picture (PiP) 1
42PiP 2
53Gallery mode 3
64Gallery mode 4
75Gallery mode 5
86Gallery mode 6
97Gallery mode 7
108Gallery mode 8
119Gallery mode 9
132Tiled left and right 2

Single view 1

idxywidthheightzorder
000110

Tiled left and right 1

idxywidthheightzorder
00.00210.25160.49680.49680
10.5010.25160.49680.49680
Tiled left and right

Picture-in-Picture (PiP) 1

idxywidthheightzorder
000110
10.006250.006250.23610.23611
Picture-in-Picture 1

PiP 2

idxywidthheightzorder
000110
10.75760.75760.23610.23611
Picture-in-Picture 2

Gallery mode 3

idxywidthheightzorder
00.25470.006250.49060.49060
10.006250.50310.49060.49060
20.50310.50310.49060.49060
Gallery mode 3

Gallery mode 4

idxywidthheightzorder
00.0130.0130.48050.48050
10.50650.0130.48050.48050
20.0130.50650.48050.48050
30.50650.50650.48050.48050
Gallery mode 4

Gallery mode 5

idxywidthheightzorder
00.17180.17180.3250.3250
10.50310.17180.3250.3250
20.006250.5030.3250.3250
30.33750.5030.3250.3250
40.668750.5030.3250.3250
Gallery mode 5

Gallery mode 6

idxywidthheightzorder
00.006250.17180.3250.3250
10.33750.17180.3250.3250
20.66880.17180.3250.3250
30.006250.50310.3250.3250
40.33750.50310.3250.3250
50.66880.50310.3250.3250
Gallery mode 6

Gallery mode 7

idxywidthheightzorder
00.006250.006250.73910.73910
10.75160.13360.24220.24220
20.75160.38210.24220.24220
30.006250.75160.24220.24220
40.25470.75160.24220.24220
50.50320.75160.24220.24220
60.75160.75160.24220.24220
Gallery mode 7

Gallery mode 8

idxywidthheightzorder
00.006250.006250.73910.73910
10.75160.006250.24220.24220
20.75160.25470.24220.24220
30.75160.50320.24220.24220
40.006250.75160.24220.24220
50.25470.75160.24220.24220
60.50320.75160.24220.24220
70.75160.75160.24220.24220
Gallery mode 8

Gallery mode 9

idxywidthheightzorder
00.006250.006250.3250.3250
10.33750.006250.3250.3250
20.66880.006250.3250.3250
30.006250.33750.3250.3250
40.33750.33750.3250.3250
50.66880.33750.3250.3250
60.006250.66880.3250.3250
70.33750.66880.3250.3250
80.66880.66880.3250.3250
Gallery mode 9

Tiled left and right 2

idxywidthheightzorder
0000.510
10.500.510
Tiled left and right 2

References

You can use the following API operations to configure bypass live streaming layouts: