...
REST-method | Example of REST query | Example of response | Response statuses | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
/mixer/startup |
| 200 - OK 400 - Bad request 409 - Conflict 500 - Internal error | Creates a mixer the provided stream is published for | ||||||||
/mixer/add |
| 200 - OK 404 - Mixer not found 404 - Stream not found 500 - Internal error | Add the RTMP stream to the mixer | ||||||||
/mixer/remove |
| 200 - OK 404 - Mixer not found 404 - Stream not found 500 - Internal error | Remove the RTMP stream from the mixer | ||||||||
/mixer/find_all |
| 200 - OK 404 - Not found 500 - Internal error | Find all mixers | ||||||||
/mixer/terminate |
| 200 - OK 404 - Not found 500 - Internal error | Terminate operation of the mixer | ||||||||
/stream/startRecording |
| 200 - OK 404 - Not found 500 - Internal error | Start recording of the stream in the given media session | ||||||||
/stream/stopRecording |
| 200 - OK 404 - Not found 500 - Internal error | Stop recording the stream in the given media session | ||||||||
/mixer/setAudioVideo |
| 200 - OK 400 - Bad request 404 - Not found 500 - Internal error | Mute/unmute video or change audio level for mexer incoming stream | ||||||||
/mixer/set_body_watermark |
| 200 - OK 400 - Bad request 404 - Not found | Add watermark to mixer output stream picture | ||||||||
/mixer/set_stream_watermark |
| 200 - OK 400 - Bad request 404 - Not found | Add watermark to one of the mixer input streams pictures in the mixer output stream | ||||||||
/mixer/set_stream_label |
| 200 - OK 404 - Not found | Set or change mixer participant stream label to display | ||||||||
/mixer/set_parameter |
| 200 - OK 400 - Bad request 404 - Not found | Change the mixer parameter | ||||||||
/mixer/set_stream_avatar |
| 200 - OK 400 - Bad request 404 - Not found 500 - Internal server error | Set avatar picture to audio stream in mixer | ||||||||
/mixer/remove_stream_avatar |
| 200 - OK 404 - Not found 500 - Internal server error | Remove avatar picture from audio stream in mixer | ||||||||
/mixer/set_position |
| 200 - OK 404 - Not found 500 - Internal server error | Move the stream picture to the position (for custom XML layouts only) |
Parameters
Parameter name | Description | Example |
---|---|---|
uri | Unique identifier of the mixer | mixer://mixer1 |
localStreamName | Name of the output stream of the mixer | stream3 |
hasVideo | Mix video | true |
hasAudio | Mix audio | true |
remoteStreamName | Name of the stream added to the mixer | stream1 rtmp://rtmp.flashphoner.com:1935/live/rtmp_stream1 |
mediaSessionId | Media session identifier | ce92b134-2468-4460-8d06-1ea3c5aabace |
status | Stream status | PROCESSED_LOCAL |
background | Mixer background | background.png |
watermark | Mixer watermark | watermark.png |
mixerLayoutClass | Mixer layout | com.flashphoner.mixerlayout.TestLayout |
streams | Streams list or regular expression for search | ^stream.* ["stream1", "stream2"] |
audioLevel | Incoming stream audio level | 0 |
videoMuted | Mute video | true |
streamLabel | Mixer participant stream label to display | John Doe |
avatar | Picture URI in PNG, JPG, BMP formats | https://mystorage.com/storage/avatar.jpg |
videoPositionId | Position identifier in custom XML layout to place a stream picture | speaker |
Mixer configuration while creating the instance using REST API
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[ { "localMediaSessionId": "7c9e5353-8680-4ad2-8a47-1a366091785c", "localStreamName": "m1", "uri": "mixer://m1", "status": "PROCESSED_LOCAL", "hasAudio": true, "hasVideo": true, "record": false, "mediaSessions": [], "mixerLayoutClass": "com.flashphoner.media.mixer.video.presentation.GridLayout", "mixerLayoutDir": "/opt/mixer1-layout", "mixerActivityTimerCoolOffPeriod": 1, "mixerActivityTimerTimeout": -1, "mixerAppName": "defaultApp", "mixerAudioOpusFloatCoding": false, "mixerAudioSilenceThreshold": -50, "mixerAudioThreads": 4, "mixerAutoScaleDesktop": true, "mixerDebugMode": false, "mixerDesktopAlign": "TOP", "mixerDisplayStreamName": false, "mixerDecodeStreamName": false, "mixerFontSize": 20, "mixerFontSizeAudioOnly": 40, "mixerIdleTimeout": 20000, "mixerInBufferingMs": 200, "mixerIncomingTimeRateLowerThreshold": 0.95, "mixerIncomingTimeRateUpperThreshold": 1.05, "mixerMcuAudio": false, "mixerMcuVideo": false, "mixerMcuMultithreadedMix": false, "mixerMinimalFontSize": 1, "mixerMcuMultithreadedDelivery": false, "mixerOutBufferEnabled": false, "mixerOutBufferInitialSize": 2000, "mixerOutBufferStartSize": 150, "mixerOutBufferPollingTime": 100, "mixerOutBufferMaxBufferingsAllowed": -1, "mixerShowSeparateAudioFrame": true, "mixerTextAutoscale": true, "mixerTextColour": "0xFFFFFF", "mixerTextBulkWriteWithBuffer": true, "mixerTextBulkWrite": true, "mixerTextBackgroundOpacity": 100, "mixerTextBackgroundColour": "0x2B2A2B", "mixerTextPaddingLeft": 5, "mixerVoiceActivitySwitchDelay": 0, "mixerVoiceActivityFrameThickness": 6, "mixerVoiceActivityFramePositionInner": false, "mixerVoiceActivityColour": "0x00CC66", "mixerVoiceActivity": true, "mixerVideoWidth": 1280, "mixerVideoThreads": 4, "mixerVideoStableFpsThreshold": 15, "mixerVideoQuality": 24, "mixerVideoProfileLevel": "42c02a", "mixerVideoLayoutDesktopKeyWord": "desktop", "mixerVideoHeight": 720, "mixerVideoGridLayoutPadding": 30, "mixerVideoGridLayoutMiddlePadding": 10, "mixerVideoFps": 30, "mixerVideoDesktopLayoutPadding": 30, "mixerVideoDesktopLayoutInlinePadding": 10, "mixerVideoBufferLength": 1000, "mixerVideoBitrateKbps": 2000, "mixerUseSdpState": true, "mixerType": "NATIVE", "mixerThreadTimeoutMs": 33, "mixerTextPaddingTop": 5, "mixerTextPaddingRight": 4, "mixerTextFont": "Serif", "mixerTextPaddingBottom": 5, "mixerTextDisplayRoom": true, "mixerTextCutTop": 3, "mixerRealtime": true, "mixerPruneStreams": false, "audioMixerOutputCodec": "alaw", "audioMixerOutputSampleRate": 48000, "audioMixerMaxDelay": 300, "mixerAudioOnlyHeight": 360, "mixerAudioOnlyWidth": 640, "videoOutputCodec":"vp8", "mixerTextAlign": "TOP_CENTER" } ] |
...
Code Block | ||
---|---|---|
| ||
audio_mixer_output_channels=2 |
Characters decoding in input stream name
Since build 5.2.1802 it is possible to decode a characters encoded by encodeURIComponent() in input stream name. The feature may be enabled by the following parameter
Code Block | ||
---|---|---|
| ||
mixer_decode_stream_name=true |
or by the following /mixer/startup
query parameter
Code Block | ||||
---|---|---|---|---|
| ||||
{
"uri": "mixer://mixer1",
"localStreamName": "mixer1",
...,
"mixerDecodeStreamName": true
} |
In this case a decoded characters available in the font used will be displayed, or a similar characters.
MCU support
Mixer MCU support for audio can be enabled with the following parameter
...