The Recording API is separate from the regular ScaleEngine API.
You query the origin server where you publish your streams directly
via HTTP GET requests. The API allows publishers to request recorded
streams to start, stop, and split recording on demand. All streams that
match the stream parameter and their transcoders will perform the requested
action.
If a request is already in process, additional stop/split actions will skip
performing their action and return the result from the first pending request.
These additional requests will return as an error to indicate that this request
did not execute and is the results of a previous stop/split. After 20 seconds of
waiting if the file name is not set all requests will return a timeout error.
Responses from the API Module are return in XML format.
To connect to the API a GET Request is sent with the necessary parameters,
which include:
https://jb-origin.secdn.net/serecordcontrols?action=start&app=jb-origin/live&stream=my-stream&secret=myapipassword
Actions | Description / Requirements | Response |
---|---|---|
start | Starts a recording on the requested stream using the default
parameters. The size, duration, schedule, and default parameters can be added to the query to request behaviour other than the default. Size will indicate that the recording should split when the size in mb is reached. Duration will indicate that the recording should split when the length of the video in minutes is reached. Schedule will define that the recording should split based on a crontab expression. Default does not require a value, but will overwrite the saved parameters back to the default settings. |
Success: <ScaleEngineRecordControls> <streams> <stream> <name>stream-name</name> <error>this will display only if there is an error</error> <message>Stream {stream_name}: Default Recording started</message> </stream> </streams> </ScaleEngineRecordControls> |
stop | Stop will tell the recorder to stop recording the request stream. |
Success: <ScaleEngineRecordControls> <streams> <stream> <name>stream-name</name> <error>this will display only if there is an error</error> <message>Recording has stopped for stream {stream_name}</message> <deleted>true or false if delete file was requested</deleted> <duration>file duration</duration> <file>recorded file name</file> </stream> </streams> </ScaleEngineRecordControls> |
split | Split will cause the current file to be saved and moved, and a recording to start. |
Success: <ScaleEngineRecordControls> <streams> <stream> <name>stream-name</name> <error>this will display only if there is an error</error> <message>Recording has been split for stream {stream_name}</message> <deleted>true or false if delete file was requested</deleted> <duration>file duration</duration> <file>recorded file name</file> </stream> </streams> </ScaleEngineRecordControls> |