CloudHubRTS Electron
- Overview
- RtsEngine
- RtsUpStream
- RtsUpStreamEventHandler
- RtsDownStream
- RtsDownStreamEventHandler
- RtsMixingUpstream
- RtsMixingUpstreamEventHandler
- RtsServerStreamMixing
- RtsServerStreamMixingEventHandler
- RtsDevicesManager
- Update log
Server stream Mixing
configMixing
Configures mixing the server stream
configMixing(obj: object)
Parameter | Description |
---|---|
obj | Configuration items: destUrl: Destination Url destVideoWidth: Width (pixels) of the destination video destVideoHeight: Height (pixels) of the destination video destVideoBandWidthKBPS: Bitrate of destination video(KBPS) destVideoFramerate: Destination video frame rates(fps) destBackgroundColor: background color of destination video. The default value is -1 destAudioBandWidthKBPS: Audio bitrate(KBPS) destAudioChannels: Count of destination audio channels. The default value is 1 sourceStreamCount: The number of mixing source streams sourceStreams: Mixed source streams [url: The url of the source stream x: Horizontal position (pixel) of the video frame relative to the top left corner y: Vertical position (pixel) of the video frame relative to the top left corner width: Width (pixel) of the video frame height: Height (pixel) of the video frame zOrder: Layer position of the video frame. The value ranges between 0 and 100. fit: Video display mode true:Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with grey. false:Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.] mixingExtraInfo: mixingExtraInfo |
Note: destVideoWidth and destVideoHeight, both values = 0 at the same time, mean no video.These two values >0, but valid values in the range of [16-1920] indicate that there is a video; otherwise, the error will be returned.
Note:The format of destUrl must be followed: RTS Url addresses after server mixing
Note:The format of url must be followed:RTS Splicing the push URL
Returns
- 0 : Success
- Not 0 : Fail
startMixing
Starts mixing the server stream
startMixing(obj: object)
Parameter | Description |
---|---|
obj | Configuration items: destUrl: Destination Url destVideoWidth: Width (pixels) of the destination video destVideoHeight: Height (pixels) of the destination video destVideoBandWidthKBPS: Bitrate of destination video(KBPS) destVideoFramerate: Destination video frame rates(fps) destBackgroundColor: background color of destination video. The default value is -1 destAudioBandWidthKBPS: Audio bitrate(KBPS) destAudioChannels: Count of destination audio channels. The default value is 1 sourceStreamCount: The number of mixing source streams sourceStreams: Mixed source streams [url: The url of the source stream x: Horizontal position (pixel) of the video frame relative to the top left corner y: Vertical position (pixel) of the video frame relative to the top left corner width: Width (pixel) of the video frame height: Height (pixel) of the video frame zOrder: Layer position of the video frame. The value ranges between 0 and 100. fit: Video display mode true:Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with grey. false:Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.] mixingExtraInfo: mixingExtraInfo |
Note: destVideoWidth and destVideoHeight, both values = 0 at the same time, mean no video.These two values >0, but valid values in the range of [16-1920] indicate that there is a video; otherwise, the error will be returned.
Note:The format of destUrl must be followed: RTS Url addresses after server mixing
Note:The format of url must be followed:RTS Splicing the push URL
Returns
- 0 : Success
- Not 0 : Fail
destVideoBandWidthKBPS (Maximum bandwidth limit table for mixed-stream video)
Image resolution | Framerate | Maximum bandwidth(kbps) | remark |
---|---|---|---|
320*240 | fps <= 30 | 256 | Image resolution <= 320*240 |
640*480 | fps <= 30 | 768 | 320*240 < Image resolution <= 640*480 |
1280*720 | fps <= 30 | 1536 | 640*480 < Image resolution <= 1280*720 |
1920*1080 | fps <= 30 | 2048 | 1280*720< Image resolution <= 1920*1080 |
stopMixing
Stops mixing the server stream
stopMixing()