...
The following elements can be used in template:
Element | Description | Maximum size |
---|---|---|
{streamName} | Stream name | |
{startTime} | Recording start time (not stream creation time) | 20 characters |
{sessionId} | Session ID in BASE64 encoding | 60 characters |
{mediaSessionId} | Media session ID | 36 characters |
{login} | Login | 32 characters |
{audioCodec} | Audiocodec | 4 characters |
{videoCodec} | Videocodec | 4 characters |
When the file name matches the stream name, it may contain characters that are not allowed in file names, slash '/' for example. In that case, the file name should be encoded using the parameter
...
specifies a fragment duration as 10 seconds. Recording fragments are numbered continuosly . If rotation is enabled and recording file name defined as fixed name (for example, using REST query), then file parts numbering will be continued when recording stopped and started again,from 1, the last rcorded fragment is not numbered.
Record files handling script
...
REST methods and response statuses
REST method | Example of REST query | Example of REST response | Response statuses | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
/stream/startRecording |
| 404 - Not found 500 - Internal error | Start stream recording in specified mediasession | ||||||||
/stream/stopRecording |
| 404 - Not found 500 - Internal error | Stop stream recording in specified mediasession |
Parameters
Parameter name | Description | Example |
---|---|---|
mediaSessionId | Media session identificator | 5a072377-73c1-4caf-abd3 |
fileName | Recording file name | recordStream.mp4 |
force | Overwrite the recording file on the next /stream/startRecording call | true |
If REST query does not set recording file name explicitly, the stream in mediasession defined will be recorded to file named by template settings.
If file name is explicitly set, the stream will be recorded to file with this name. If file exists, then depending on force
parameter:
- false (by default) - file will not be overwritten, stream recording
...
- does not start
- true - file will be overwritten with new stream recording
Known issues
1. Maximum length of file name in all actual Linux file systems is limited to 255 characters. When record file is created, its name will be trimmed to this limit including extension and part number if rotation is enabled.
...