Skip to main content
Version: v1

Streaming

Stream Parameters

The main parameters of a stream are the output protocol stream.protocol and stream qualities (output resolution) stream.qualities.
By default, stream.protocol = "llhls", and stream.qualities = ["bypass"].
The bypass quality means that the incoming video stream from the streamer will not be transcoded and will be delivered to the player in its original quality.

Stream Management

The following operations are available for managing a stream object: create, update, delete, enable, and disable.

info

All operations on a stream object are performed via background tasks.

Creating a Stream

To create a stream object, call the API method create_stream.
The stream is created as a background task with type CREATE_STREAM.
After the task completes successfully, the ID of the created stream object will be stored in the task.result field.

info

A stream is enabled immediately upon creation.

Stream Send & Playback URLs

After creating or updating a stream, the fields stream.default_provider_urls and stream.default_publisher_urls are generated:

  • default_provider_urls – list of URLs for stream ingestion, with no access restrictions
  • default_publisher_urls – list of URLs for viewing the stream, with no access restrictions

These URLs are intended for testing purposes only, as they are not protected from third-party access.

Generating Signed URLs

To control access to streams (both for streaming and viewing), signed URLs can be generated.
Signed URLs are not linked to the stream object and are not stored in the system.

Restreaming

To forward the original stream to external streaming platforms, use the API method start_stream_push_publishing for the stream object.
Supported protocols: RTMP, SRT.
Examples of restreaming URLs:

  • rtmp://example.com:1935/app/live
  • rtmp://example.com/app/live/stream
  • srt://example.com:9000/app?passphrase=12345qwert&mode=caller
  • srt://example.com:9000?streamid=#!::u=admin,m=request
note

When using SRT restreaming with standard query parameters, only the value "caller" is allowed for the "mode" parameter.

To stop restreaming, use the API method stop_stream_push_publishing.

note

Restreaming is not disabled or deleted when the parent stream object is disabled using disable_stream.
If the stream is re-enabled and a stream is sent to Arviol’s server, restreaming will automatically resume.

To get the current restreaming settings, use get_stream_push_publishers.

Stream Recording

Enabling and disabling stream recording is done by calling the start_stream_recording and stop_stream_recording methods for the stream object. To obtain signed links to recorded stream fragments, use the get_stream_record_links method.

Initial Setup

  1. Create a stream object and wait for the background task to complete
  2. Provide the default send/view URLs to the user
  3. If needed, initiate restreaming to one or more platforms and enable stream recording

Managing Signed URLs

For complete protection against unauthorized access, it's recommended to provide clients with an API to generate signed URLs on demand.

For example, to restrict access to a player on a website to authenticated users only, you'll need to generate viewing URLs per user session.

API Methods

Streams

Push Publishing

Stream recording

Signed URL Generation