Control Panel — API documentation

Stream Metadata

Stream metadata object

Stream metadata returns information on an active stream. The response will include a data object that will include various information depending on the type and state of the stream being requested. Note that the structure will be variable so any code reading this result will need to handle some entries being potentially absent or different without warning.

The output will include metadata about the video/audio codecs, and if the stream is recording. Any active push publishes or transcodes will be shown. For channels, the active playlist ID and item will be shown.

Descriptions

inst String Autogenerated

Application Instance Name

Default:

Sample value:live

type String Autogenerated

Stream Type

Enum:live, channel, switchboard, transcode

Default:

Sample value:0

isRecording String Autogenerated

Is the stream recording?

Default:

Sample value:false

publish_time String Autogenerated

Date and time the stream published

Default:

Sample value:2019/12/05 19:41:54

playlist_id Integer Autogenerated

Unique Identifier of the playlist

Default:0

Sample value:1234

Only for: type: channel

now_playing String Autogenerated

Name of the stream being played

Default:

Sample value:mp4:my_video.mp4

Only for: type: switchboard

video String Autogenerated

Name of the Video being played

Default:

Sample value:mp4:my_video.mp4

Only for: type: channel

video_index Integer Autogenerated

Index of the video in the current playlist

Default:0

Sample value:0

Only for: type: channel

transcoders Array Autogenerated

List of transcoders running on the stream

Sample value:Array ( )

transcoder_count Integer Autogenerated

Number of transcoders running

Default:0

Sample value:0

last_chunk_id Integer Autogenerated

Last HLS Chunk identifier

Default:0

Sample value:0

codec Object Autogenerated

Codec information containing properties for: audio, audio_type, video, and video_type

Sample value:Array ( [audio_type] => AAC [video_type] => H264 [audio] => mp4a.40.2 [video] => avc1.42801e )

metadata Object Synthetic

Metadata information sent from the encoder and embedded into the stream.

Sample value:Array ( )

push_publish Array Autogenerated

List of pushes that are being sent from this stream.

Sample value:Array ( [0] => Array ( [entry_name] => cupertino-akamai-adaptive [stream] => my_stream [profile] => cupertino-akamai-adaptive [status] => Connected ) )

None
None
None

Examples

Get the Stream_metadata object with id .

Example URL

https://api.scaleengine.net/v2/stream_metadata/

Example cURL

curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/v2/stream_metadata/

Example request body

None

Example response data

{
    "inst": "live",
    "type": 0,
    "isRecording": "false",
    "publish_time": "2019/12/05 19:41:54",
    "playlist_id": 1234,
    "now_playing": "mp4:my_video.mp4",
    "video": "mp4:my_video.mp4",
    "video_index": 0,
    "transcoders": [],
    "transcoder_count": 0,
    "last_chunk_id": 0,
    "codec": {
        "audio_type": "AAC",
        "video_type": "H264",
        "audio": "mp4a.40.2",
        "video": "avc1.42801e"
    },
    "metadata": [],
    "push_publish": [
        {
            "entry_name": "cupertino-akamai-adaptive",
            "stream": "my_stream",
            "profile": "cupertino-akamai-adaptive",
            "status": "Connected"
        }
    ]
}

Create a new Stream_metadata object.

Example URL

https://api.scaleengine.net/v2/stream_metadata

Example cURL

curl -X PUT --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/v2/stream_metadata

Example request body

None

Example response data

{
    "inst": "live",
    "type": 0,
    "isRecording": "false",
    "publish_time": "2019/12/05 19:41:54",
    "playlist_id": 1234,
    "now_playing": "mp4:my_video.mp4",
    "video": "mp4:my_video.mp4",
    "video_index": 0,
    "transcoders": [],
    "transcoder_count": 0,
    "last_chunk_id": 0,
    "codec": {
        "audio_type": "AAC",
        "video_type": "H264",
        "audio": "mp4a.40.2",
        "video": "avc1.42801e"
    },
    "metadata": [],
    "push_publish": [
        {
            "entry_name": "cupertino-akamai-adaptive",
            "stream": "my_stream",
            "profile": "cupertino-akamai-adaptive",
            "status": "Connected"
        }
    ]
}

Update the Stream_metadata object with id .

Example URL

https://api.scaleengine.net/v2/stream_metadata/

Example cURL

curl -X POST --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/v2/stream_metadata/

Example request body

None

Example response data

{
    "inst": "live",
    "type": 0,
    "isRecording": "false",
    "publish_time": "2019/12/05 19:41:54",
    "playlist_id": 1234,
    "now_playing": "mp4:my_video.mp4",
    "video": "mp4:my_video.mp4",
    "video_index": 0,
    "transcoders": [],
    "transcoder_count": 0,
    "last_chunk_id": 0,
    "codec": {
        "audio_type": "AAC",
        "video_type": "H264",
        "audio": "mp4a.40.2",
        "video": "avc1.42801e"
    },
    "metadata": [],
    "push_publish": [
        {
            "entry_name": "cupertino-akamai-adaptive",
            "stream": "my_stream",
            "profile": "cupertino-akamai-adaptive",
            "status": "Connected"
        }
    ]
}

Delete the Stream_metadata object with id .

Example URL

https://api.scaleengine.net/v2/stream_metadata/

Example cURL

curl -X DELETE --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/v2/stream_metadata/

Example request body


			
			

Example response data

None

Errors

ACCESS_VIOLATION

You do not have access to modify this field