Record

Start Recording

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:startRecord

Description of the Start Recording API

Example - Recording by Output Stream Name POST http[s]://{host}/v1/vhosts/default/apps/app:startRecord { "id": "{unique_record_id}", "stream": { "name": "{output_stream_name}", } }

Example - Recording by Output Stream Name with Track Ids POST http[s]://{host}/v1/vhosts/default/apps/app:startRecord { "id": "{unique_record_id}", "stream": { "name": "{output_stream_name}", "trackIds": [ 100, 200 ] } }

Example - Recording by Output Stream Name with Variant Names POST http[s]://{host}/v1/vhosts/default/apps/app:startRecord { "id": "{unique_record_id}", "stream": { "name": "{output_stream_name}", "variantNames": [ "h264_fhd", "aac" ] } }

* variantName means Application.OutputProfiles.OutputProfie.Encodes.[Video|Audio|Data].Name in the Server.xml configuration file. Example - Split Recording by Interval POST http[s]://{host}/v1/vhosts/default/apps/app:startRecord { "id": "{unique_record_id}", "stream": { "name": "{output_stream_name}" }, "interval": 60000, "segmentationRule": "discontinuity" } Example - Split Recording by Schedule POST http[s]://{host}/v1/vhosts/default/apps/app:startRecord { "id": "{unique_record_id}", "stream": { "name": "{output_stream_name}" }, "schedule" : "0 */1 *" "segmentationRule": "continuity" }

Path Parameters

NameTypeDescription

vhost_name*

string

A name of VirtualHost

app_name*

string

A name of Application

Headers

NameTypeDescription

authorization*

string

A string for authentication in Basic Base64(AccessToken) format. For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token

Request Body

NameTypeDescription

segmentationRule

string

Define the policy for continuously or discontinuously timestamp in divided recorded files. - continuity - discontinuity (default)

id*

string

An unique identifier for recording job.

stream*

string

Output stream.

name*

string

Output stream name.

trackIds

array

Used for recording specific track IDs.

schedule

string

Schedule-based split recording settings. Same as crontab setting. Unable to use with interval. Format : <second minute hour>

interval

number

Interval based split recording settings. Unable to use with schedule. Format : Milliseconds

filePath

string

Set the path of the file to be recorded. Format: See Config Settings

infoPath

string

Set the path to the information file to be recorded. Format: See Config Settings

variantNames

array

Used for recording specific variant names.

{
    "message": "OK",
    "response": [
        {
            "state": "ready",
            "id": "stream_o",
            "vhost": "default",
            "app": "app",
            "stream": {
                "name": "stream_o",
                "tracks": []
            },
            "filePath": "/path/to/save/recorded/file_${Sequence}.ts",
            "infoPath": "/path/to/save/information/file.xml",            
            "interval": 60000,  
            "schedule": "0 0 */1",       
            "segmentationRule": "continuity",
            "createdTime": "2021-08-31T23:44:44.789+0900"
        }
    ],
    "statusCode": 200
}

Stop Recording

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:stopRecord

Description of the Stop Recording API

Request Example POST http[s]://{host}/v1/vhosts/default/apps/app:stopRecord { "id": "{unique_record_id}" }

Path Parameters

NameTypeDescription

vhost_name*

string

A name of VirtualHost

app_name*

string

A name of Application

Headers

NameTypeDescription

authorization*

string

A string for authentication in Basic Base64(AccessToken) format. For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token.

Request Body

NameTypeDescription

id*

string

An unique identifier for recording job.

{
    "message": "OK",
    "response": [
        {
            "state": "stopping",
            "id": "custom_id",            
            "vhost": "default",
            "app": "app",
            "stream": {
                "name": "stream_o",
                "tracks": []
            },
            "filePath" : "/path/to/save/recorded/file_${Sequence}.ts",
            "infoPath" : "/path/to/save/information/file_${Sequence}.xml",
            "outputFilePath": "/path/to/save/recorded/file_1.ts",
            "outputInfoPath": "/path/to/save/information/file_1.xml",
            "sequence" : 1,
            "segmentationRule": "discontinuity",
            "recordBytes": 1200503,
            "recordTime": 4272,
            "totalRecordBytes": 1204775,
            "totalRecordTime": 4272,
            "createdTime": "2021-08-31T23:44:44.789+0900",
            "startTime": "2021-08-31T23:44:44.849+0900"
        }
    ],
    "statusCode": 200
}

Recording Status

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:records

Description of the Recording Status API Request Example: POST http[s]://{host}/v1/vhosts/default/apps/app:records { "id" : "{unique_record_id}" }

Path Parameters

NameTypeDescription

vhost_name*

string

A name of VirtualHost

app_name*

string

A name of Application

Headers

NameTypeDescription

authorization*

string

A string for authentication in Basic Base64(AccessToken) format. For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token.

Request Body

NameTypeDescription

id

string

An unique identifier for recording job. If no value is specified, the entire recording job is requested.

{
    "message": "OK",
    "response": [
        {
            "state": "ready",
            "id": "custom_id_1",
            "vhost": "default",
            "app": "app",
            "stream": {
                "name": "stream_o",
                "tracks": []
            },
            "interval": 5000,            
            "filePath" : "/path/to/save/recorded/file_${Sequence}.ts",
            "infoPath" : "/path/to/save/information/file_${Sequence}.xml",
            "outputFilePath": "/path/to/save/recorded/file_1.ts",
            "outputInfoPath": "/path/to/save/information/file_1.xml",
            "recordBytes": 737150,
            "recordTime": 1112,
            "totalRecordBytes": 18237881,
            "totalRecordTime": 26148,            
            "sequence": 1,            
            "segmentationRule": "discontinuity",            
            "createdTime": "2021-08-31T21:05:01.171+0900",
            "startTime": "2021-08-31T21:05:01.171+0900", 
        },
        {
            "state": "recording",
            "id": "custom_id_2",
            "vhost": "default",                    
            "app": "app",
            "stream": {
                "name": "stream_o",
                "tracks": []
            },
            "interval": 5000,            
            "filePath" : "/path/to/save/recorded/file2_${Sequence}.ts",
            "infoPath" : "/path/to/save/information/file2_${Sequence}.xml",
            "outputFilePath": "/path/to/save/recorded/file2_12.ts",
            "outputInfoPath": "/path/to/save/information/file2_12.xml",
            "recordBytes": 737150,
            "recordTime": 1112,
            "totalRecordBytes": 18237881,
            "totalRecordTime": 26148,            
            "sequence": 12,            
            "segmentationRule": "continuity",            
            "createdTime": "2021-08-31T21:05:01.171+0900",
            "startTime": "2021-08-31T21:05:01.171+0900", 
        }
        ....
    ],
    "statusCode": 200
}

Last updated