Recording a video chat using a stream mixer

Hi,

How can i record a video chat using a stream mixer in one file?
1601902693488.png


What parameter should i pass in the remote stream name in the above rest method?

1601902757526.png


Where can i find the media session ID to start the recording in the above rest method?

Kindly assist.

Thanks
MA
 
Hello,

To record all mixers, enable this setting (config flashphoner.properties)
Code:
record_mixer_streams=true

To find out mediaSessionId, use rest-api/stream/find request
Code:
rest-api/stream/find
{
  "name": "<mixer name>",
  "published": true
}
 
You shoud use stream name to find a mixer stream, not a mixer name. For examp[le, if mixer is started with the following query
Code:
POST /rest-api/mixer/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
 
{
    "uri": "mixer://mixer1",
    "localStreamName": "mixer1_stream"
}
you can find its output stream using this query
Code:
POST /rest-api/stream/find HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json
 
{
    "name":"mixer1_stream",
    "published":true
}
 
OK thanks

Its working, but I have noticed that after approx one minute the result is shown as an error, is there a timeout attached with this?
 
Its working, but I have noticed that after approx one minute the result is shown as an error, is there a timeout attached with this?
Mixer is stopped if you've not added any streams to it in 1 minute. So recording is stopped too.
Please do the following:
1. Create a mixer with /mixer/startup query
Code:
POST /rest-api/mixer/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json

{
    "uri": "mixer://mixer1",
    "localStreamName": "mixer1_stream"
}
2. Publish a stream named "test" for example
3. Add stream "test" to mixer
Code:
POST /rest-api/mixer/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json

{
    "uri": "mixer://mixer1",
    "remoteStreamName": "test"
}
4. Find mixer strean and start recording.
Then, you can publish a second stream and add it to the mixer.
Another way is automatically create a mixer when first stream is published. Just publish a stream named "test#mixer1", and mixer will be created. To add a second stream, publish "test2#mixer1". Then find the stream "mixer1" and start recording.
Is there any working sample available that shows the Mixer based 2 streams recording function?
There is no such a sample out of the box.
 
Hi there,

Thank you for your support and explaination. I have one more query regarding setting the stream name. How can i set the stream name in room.publish example from the video chat demo.


Kindly assist.

Thanks
MA
 
Hello,

A name of a stream published by a participant in a room is composed this way: <room_name>-<participant_name>-<unique_id_generated_for_stream>.
 
OK great, the file is recorded but with very large size as shown below, how can I change the file size settings:
You can use lower mixer resolution and bitrate, for example
Code:
mixer_video_width=852
mixer_video_height=480
mixer_video_bitrate_kbps=1000
 
Top