stream.media

Stream file

type

object

properties

  • alwaysOn

This tells the server to start the stream between itself and the video source. It is mandatory if you want to guarantee the buffering at all time.

For example if alwaysOn is true Ant Media Server will start the broadcast.

This settings is not useful for streams that are pushed to the server (stream of type : LiveStream).

Default value is [false]

type

boolean

default

False

  • endpoint

Here are the supported endpoint (an endpoint is a video source) types :

  • LiveStream -> RTMP / SRT

  • IPCamera -> OnVif

  • StreamSource -> RTSP / OnVif (RTSP)

LiveStream is ingested by Ant Media Server, IP Camera and Stream Source is pulled by Ant Media Server. For example, the following StreamSource let us access its video using RTSP.

oneOf

Live stream endpoint

IpCamera endpoint

Stream source endpoint

  • isTemplateGeneratedByOspComposer

Name of the playbook that generated this file. If present, the file is managed by the Composer and may be overwritten on regeneration. Used for selective clean. Do not edit or set manually.

type

string

  • serverId

The antmedia-server.media ↗️ that this stream will be referenced to.

This stream will be created on this server. In case the stream already exists it will use the stream that is already existing on the server.

type

string

  • streamApplication

In practical terms, an “application” in Ant Media Server could be seen as a “container” for a streaming service. You can create multiple applications within a single Ant Media Server instance, each serving different needs. For instance, one application could be used for a live broadcast service, while another could be set up to provide VOD services.

Each application is associated with a unique URL path, such as :

http(s)://<server-ip>:<server-port>/<application-name>

The value of this filed will be the <application-name>. For example “OnSphereApp”.

By default there are two common Applications in Ant Media Server:

  • LiveApp: Default application for live streaming.

  • WebRTCApp: Default application for WebRTC-based streaming.

These applications can be managed through Ant Media Server’s management console or via REST APIs.

In our use case it is used in combination with the streamId. So you will be creating the streamId in this streamApplication.

type

string

  • streamId

This is the streamId created in the Ant Media server.

For example if your streamId is “test”, you will then use it to access the HLS stream in your web player.

Each stream is associated with a unique URL path, such as :

http(s)://<server-ip>:<server-port>/<application-name>/play.html?id=<stream-id>

On the configuration page of Ant Media, if you don’t provide a streamId a random one will be created for you OnSphere need to know this streamId so it is mandatory.

type

string

  • templateId

The id of the template to use for this file

type

string

  • templateVariables

The variables and their values to be replaced from the template

type

object

additionalProperties

  • variablesFiles

The variables files to use to replace the variables. The first file of the list will take precedence over the following one. Template variables take precedence over the contents of the files.

type

array

items

type

string

additionalProperties

False

Live stream endpoint

type

object

properties

  • type

type

string

enum

liveStream

default

liveStream

additionalProperties

False

IpCamera endpoint

type

object

properties

  • type

type

string

enum

ipCamera

default

ipCamera

  • hostname

The ip address of the OnVif camera.

"hostname" : "X.X.X.X"

type

string

  • passwordProvider

The OnVif password of the camera to add on the Ant Media server.

oneOf

PLAINTEXT

SECRET

ENCRYPTED

  • username

Username is needed to connect to the OnVif device, for example :

"username": "test"

type

string

additionalProperties

False

PLAINTEXT

type

object

properties

  • type

type

string

enum

PLAINTEXT

default

PLAINTEXT

  • password

The password to use in plaintext. It can be for example thisIs@TestPassword123.

type

string

additionalProperties

False

SECRET

type

object

properties

  • type

type

string

enum

SECRET

default

SECRET

  • secretPath

The path of the secret containing the password. This is a path to the secret containing the password.

type

string

additionalProperties

False

ENCRYPTED

type

object

properties

  • type

type

string

enum

ENCRYPTED

default

ENCRYPTED

  • encryptedPassword

The password encrypted Base64(IV+AES256(password, input)) the password must be a shared secret available for the osp-configuration-dispatcher

see documentation ↗️ see toolbox ↗️

type

string

  • secretPath

The full path to the secret exposed by the orchestrator; this password is used to encrypt the encryptedPassword.

type

string

additionalProperties

False

Stream source endpoint

type

object

properties

  • type

type

string

enum

streamSource

default

streamSource

  • streamUrl

A dynamic or static stream URL this stream will be representing.

It will be subscribing on its changes dynamically attribute.

For example, if you have variable that publishes a string representing a RTSP stream :

root.camera.dynamic-addr

oneOf

RTSP URL file

Simple URL file

additionalProperties

False

RTSP URL file

Define the url of a stream by constructing it from its different part.

For example, rtsp://test:pwd@X.X.X.X:4585/axis-media/media.amp?videocodec=h264 will be split as:

  • hostname: X.X.X.X

  • port: 4585

  • username: test

  • password: pwd

  • path: /axis-media/media.amp?videocodec=h264

  • secure: false

type

object

properties

  • type

type

string

enum

RTSP

default

RTSP

  • hostname

type

string

  • password

oneOf

PLAINTEXT

SECRET

ENCRYPTED

  • path

type

string

  • port

type

integer

default

554

  • secure

type

boolean

default

False

  • username

type

string

additionalProperties

False

Simple URL file

type

object

properties

  • type

type

string

enum

RAW

default

RAW

  • url

You can create a camera by simply passing the URL row as follows for example :

rtsp://test:test@X.X.X.X/axis-media/media.amp?videocodec=h264

This method is not recommended if it involves passing the username password in clear text inside the configuration.

type

string

additionalProperties

False