...
REST methods and responses
REST query | Example of REST query | Example of REST response | Response states | Description |
---|
/multipleRecorder/startup
| |
nametest_multi-recorder://test-record"
} |
|
| 409 - Conflict 500 - Internal error
| Launch multiple streams recorder |
/multipleRecorder/add | |
nametest_multi-recorder://test-record",
"mediaSessionId": "866a9910-fbfe-11eb-aae4-6f99b0c80a3a"
} |
|
| 404 - Not found 409 - Conflict 500 - Internal error | Add the stream with mediaSessionId to the recorder |
/multipleRecorder/find_all |
| Code Block |
---|
| [
{
"mediaSessionsId": [
"866a9910-fbfe-11eb-aae4-6f99b0c80a3a",
"9f1e2530-fbfe-11eb-9ec1-77172ac14d86",
"a970d0a0-fbfe-11eb-8fcc-912807bab442"
],
"uri": "multi-recorder://test-record",
"fileName": " |
|
stream_multiRecordedmulti-recorder___test-record.mp4"
}
] |
| 404 - Not found 500 - Internal error | Find all recorders |
/multipleRecorder/remove | |
nametest_multi-recorder://test-record",
"mediaSessionId": "866a9910-fbfe-11eb-aae4-6f99b0c80a3a"
} |
|
| 404 - Not found 500 - Internal error | Remove stream with mediaSessionId from recorder |
/multipleRecorder/terminate | |
nametest_multi-recorder://test-record"
} |
|
| 404 - Not found 500 - Internal error | Stop multiple streams recorder |
Parametes
Parameter name | Description | Example |
---|
nametest_Имя рекордера | Recorder URI | multi-recorder://test-record |
mediaSessionId |
Идентификатор медиасессии потокаstream_multiRecordedStream mediasession Id | 866a9910-fbfe-11eb-aae4-6f99b0c80a3a |
filename |
Имя файла, куда производится запись | Recording file name | multi-recorder___test-record.mp4 |
...
Recording file name
Multiple streams recording file name is formed by template with suffix _multiRecorded addition. In this case, template. In this case:
1. {streamName} parameter is set according to recorder URI, replacing all the characters not allowed to use in file system to underline.
2. {startTime}, {endTime} parameters cannot be set because they depend on stream timestamps, and we have a multiple streams with a different timestamps simultaneously. So it is recommended to use {startTimeMillis}, {endTimeMillis} parameters to add servers clock timestamps to file name.
For example, with the following template
Code Block |
---|
|
stream_record_policy_template={streamName}-{startTime}-{startTimeMillis}-{endTime}-{endTimeMillis} |
the file name for recorder with URI
Code Block |
---|
|
"uri": "multi-recorder://test-record" |
will look as follows:
Code Block |
---|
|
test_multi-recorder___test-record--1-1628821032180--1-1628821151750_multiRecorded.mp4 |
...
Code Block |
---|
|
cd /usr/local/FlashphonerWebCallServer/tools
./offline_mixer_tool.sh test_multi-recorder___test-record--1-1628821032180--1-1628821151750_multiRecorded.mp4 |
Offline mixer settings should be defined in /usr/local/FlashphonerWebCallServer/conf/offline_mixer.json file. By default, the following settings are used:
...
A mixed file is placed to the same folder as original one, with _mixed suffix addition, for example
Code Block |
---|
|
test_multi-recorder___test-record--1-1628821032180--1-1628821151750_multiRecorded_mixed.mp4 |
A picture sample from the mixed file
...