Create A Live Entity

To start live streaming, you need to create an Live Entity object. Once the request is received, Uiza will allocate resources to serve your live stream.

/v1/live_entities

POST https://api.uiza.sh/v1/live_entities

Request Body

Name
Type
Description

name

string

The live entity name with maximum 100 characters.

region

string

Select an available region in Uiza Network closest to the streamer's location

description

string

Description of the live entity. Useful for displaying to users.

dvr

boolean

Indicates whether Digital Video Recorder (DVR) is enabled for the live_entity. Set as true to enable and as false to disable. The default value is false.

encode

boolean

Indicates whether encoding is enabled for the live_entity. Set as true to enable and as false to disable. The default value is false, when the encode is true, it required a preset_id.

preset_id

string

The identifier of the video_preset to be applied when encoding your signal.

relay

array

A list of ingest servers to be relayed. Contains url and key and name (optional) in each ingest server.

{
    "id": "b7f02d48-d0ec-4c34-86d1-247a38eda4e1",
    "name": "Test event with encoding",
    "description": "Event for Test",
    "ingest": null,
    "playback": null,
    "relay": [
        {
            "id": "8cf47749-1fa4-40e9-8303-580b34f14683",
            "name": "Replay name3333",
            "url": "rtmp://a.rtmp.youtube.com/live2",
            "key": "0df3-76bz-6t4r-1by5xxxxxx",
            "status": "enable",
            "created_at": "2020-06-24T16:25:58Z",
            "updated_at": "2020-06-24T16:25:58Z"
        }
    ],
    "region": "in-bangalore-1",
    "status": "init",
    "dvr": false,
    "encode": true,
    "preset": {
        "id": "9432fa62-5988-11ea-883b-028fc5698662",
        "name": "Uiza LIVE 720p",
        "description": "",
        "is_default": true,
        "profiles": [
            {
                "id": "85844e8b-6281-11ea-883b-028fc5698662",
                "name": "720p H264 30fps Normal Latency",
                "segment_duration": 4,
                "orientation": "landscape",
                "video_profile": {
                    "video_resolution": "720",
                    "video_codec": "H264",
                    "video_bitrate": "2000K",
                    "video_frame_rate": "30"
                },
                "audio_profile": {
                    "audio_channel": "2",
                    "audio_codec": "AAC",
                    "audio_bitrate": "128K",
                    "audio_frame_rate": "1"
                }
            }
        ],
        "created_at": "2020-02-27T17:42:52Z",
        "updated_at": "2020-02-29T16:47:34Z"
    },
    "created_at": "2020-03-23T07:22:34Z",
    "updated_at": "2020-03-23T07:22:34Z"
}
[Live entity without encoding] Sample Request
curl --location --request POST 'https://api.uiza.sh/v1/live_entities' \
--header 'Authorization: uap-c1ffbff4db954ddcb050c6af0b43ba56-41193b64' \
--data-raw '{
    "name": "Test event with encoding",
    "region": "in-bangalore-1",
    "description": "Event for Test",
    "encode": false,
    "relay": [
        {
            "url": "rtmp://youtu.be/live",
            "key": "Abco1",
            "name": "Youtube 1"
        }
    ]
}'
[Live entity with encoding] Sample Request
curl --location --request POST 'https://api.uiza.sh/v1/live_entities' \
--header 'Authorization: uap-c1ffbff4db954ddcb050c6af0b43ba56-41193b64' \
--data-raw '{
    "name": "Test event with encoding",
    "region": "in-bangalore-1",
    "description": "Event for Test",
    "encode": true,
    "preset_id": "9432fa62-5988-11ea-883b-028fc5698662",
    "relay": [
        {
            "url": "rtmp://youtu.be/live",
            "key": "Abco1"
        }
    ]
}'

Defining your region helps Uiza allocate the resources that are closest to your streamers' locations. This will minimize the risks of network issues. While we are adding more and more regions to our network, here are the currently available regions.

in-bangalore-1 (Bangalore - India)

in-mumbai-1 (Mumbai - India)

sg-singapore-1 (Singapore - Singapore)

vn-saigon-1 (Ho Chi Minh City - Vietnam)

id-jakarta-1 (Jakarta - Indonesia)

us-oregon-1 (Oregon - USA)

aus-sydney-1 (Sydney - Australia)

ie-dublin-1 (Dublin - Ireland)

Last updated