Skip to content

LIVE STREAMING

This service allows you to conduct live video broadcasts of events for a wide audience in real time.

Resource Creation

At the beginning you`ll have to create your resource by clicking “CREATE RESOURCE” in the upper right corner.

Choosing a Resource

Please click on the icon "RTMP/RTSP" to create a CDN resource.

Live Resource Creation

You`ll see a dialogue window with configurations for live streaming.

To set it up please choose the way of content delivery to publication servers.

Possible ways of publishing the stream to CDNvideo network:

RTMP/RTSP-publish

Description

To publish a stream, you`ll have to configure an encoder supporting the RTMP/RTSP-publish protocol.

Before you create a Live resource, please check the products and pick up the right one. You`ll find detailed guidelines on how to configure encoders here.

Configuration Guidelines

The first stream is created automatically. You are free to add or delete the streams as needed.

Please input the name of the stream or click the “Dice” icon to create it automatically.

Choose the stream quality from the drop down menu.

Important!

It`s not available to create more than 10 RTMP/RTSP-publish streams.

Attention

An exclusive ID-number is assigned to every stream. Please use these IDs when referring to technical support and your personal manager.

Click "CREATE RESOURCE".

The resource has been created! You`ll be taken to the “Setup instructions” tab.

There are two URLs provided for publishing (the major one and the backup one) and the Stream name including an authorizing token. Choose the desired way of publishing (RTMP or RTSP) for generating correct links.

Check the example below (RTMP-publish):

  • URL primary: rtmp://a.r.cdnvideo.net/livemaster/
  • URL backup: rtmp://b.r.cdnvideo.net/livemaster/
  • Streams: m97yox4iyw_0k1z5tsvxkb?auth=jkJt47ncuaFo78z1WXgAgJp

The backup URL is to be used only if there is enough bandwidth. When creating several streams, each of them will get its own Streams name.

If you need to publish a stream in several qualities, some encoders (e.g. Wirecast) will require the Streams names to be inserted individually. To check them all, click the “down arrow” button. If you use, e.g., FMLE 3.2, just copy the whole line.

Checking the Stream

After you get the publication links and configure your encoder, please make sure that the stream works properly. Open the “Player” tab, and if the encoder is configured properly, the player will play your live stream.

Choose the comfortable way to watch publishing: separated streams or union (SMIL-files)

Attention

Please use the “Code for embedding” frame to embed the player into your website.

Transcoding

This service is suitable for companies that do not have the opportunity to give us a stream with the following characteristics necessary for Internet broadcasting:

  • protocol: RTMP, RTSP, MPEG_TS;
  • video codec: h.264;
  • audio codec: AAC/mp3.

If you are unable to provide a stream with the specified parameters, as well as to reduce the cost of hardware and software, use the stream transcoding service.

This service is activated by default.

To activate the transcoding service on the page of creating or editing an RTMP-publish resource, you should:

  • specify the source stream that you will publish;
  • choose the suitable transcoding package (package parameters can be seen by clicking on the "Show details" button);
  • click on the button "CREATE RESOURCE" or "SAVE".

If you want to refuse this service and publish several qualities by yourself - deactivate it.

Attention

If you order a transcoding service, then you should specify ONLY ONE input stream.

Additional Configurations

CDN Resource Name

To change the resource name please specify the new name and then click “SAVE”.

Attention

The resource Name is generated automatically during the creation stage.

Local authorization

A decision on access to a stream is made by means of our network based on criteria indicated by the content owner. In this case, the user request authorization is done exclusively on the CDNvideo network; external resources are not used. At the time when the user is requesting protected resource the content owner should create a special reference.

Example:

http://example.a.trbcdn.net/path/to/stream?md5=ycmYPfxHwqjnIM93o7JNOA&e=1387984517

The reference contains two authorization parameters:

  • ‘md5=’ — is a MD5 hash in Base64 format for URL that is generated based on the URI of the requested stream, lifetime of the reference, secret key, user’s IP address (optional);
  • ‘e=’ — is time of reference expiration in the POSIX time format.

When accessing the resource using the generated reference CDN calculates the MD5 value and compares it with the received value. If the MD5 values do not match, a response code ‘403 Forbidden’ (playback is denied) is returned to the user.

If the current time is greater than the “e” value (expires), a response code ‘410 Gone’ (the target is no longer available) is returned to the user.

An algorithm for calculating the MD5 hash using the user’s IP address as one of the input parameters is as follows:

md5 = base64_url(md5(SECRET/path/to/stream1.2.3.4expiretime))

Attention

The domain part of the URI while computing the hash is not used!

Example of URL generation:

  1. The following input data is available:

  2. Calculation of the timeline of reference validity. In the above example it is a week from the time of generation.

    $ php -r 'print time() + (7 * 24 * 60 * 60) . «\n»;'
    1387984517
    

  3. Calculation of the MD5 hash in Base64 format for URL:
    $ php -r 'print str_replace("=", "",strtr(base64_encode(md5("zah5Mey9Quu8Ea1k/path/to/stream1.2.3.41387984517", TRUE)), "+/", "-_")) . "\n";'
    ycmYPfxHwqjnIM93o7JNOA
    
  4. Resulting reference:

    http://example.a.trbcdn.net/path/to/stream?md5=ycmYPfxHwqjnIM93o7JNOA&e=1387984517

In local authorization the following parameters are controlled:

  1. URI of the stream being requested. It is verified whether the reference was established for exactly this stream.
  2. Secret key. It is verified whether the reference is established exactly by the content owner.
  3. Expiration time of reference validity (optional). You can cancel time validation via "Do not impose time restrictions".
  4. IP address of the user (optional). It is verified whether the stream is requested exactly from the IP address for which the reference was established. You can cancel IP address validation via "Do not impose IP address filter".
External authorization

External authorization is designed to be able to restrict access to the stream with custom logic described in your authorization script. A decision to access the stream is made based on response of your script.

If the authorization script responded with status code = 200, then access to the stream is allowed. Otherwise, access is denied.

The following headers are passed to the authorization script:

  • Host: contains the domain name of the server for which the request is intended;
  • X-Request-URI: contains the URI of the requested stream;
  • X-Forwarded-For: contains the real IP address of the user;
  • X-Remote-Addr: contains the IP address of the user or the proxy server.

HLS-cache

Description

Stream is pulled from the origin server to CDNvideo distribution server at the user’s first request and served from CDN cache for subsequent requests. The object received by the distribution server is cached for a specified time.

This method can be used if you have ready HTTP-based live streams:

  • Adobe HDS;
  • Apple HLS;
  • Microsoft Smooth Streaming (MSS).

Repackaging streams into any other formats and protocols is not available.

Configuration Guidelines

Please click on the icon "HLS-cache" to create a CDN resource.

Content Source

It is important to configure your content source carefully. Afterwards the CDN network will request the mentioned source for content caching:

Content source may be:

Attention

If you`ve got several content sources (primary/backup), you may configure priority for each of them. If the first priority content source is unavailable, CDN network will automatically switch to the next one. Switching back to the first one will happen automatically as well, when it is restored.

If you use hosting providers like Wix, Amazon S3, etc., please pay attention to the next section - “Hostname”.

Hostname

Many virtual hostings (like Amazon S3) commonly serve several websites from the same web server. So CDN network needs to know the precise Hostname to get access to your content.

If you don’t know your Hostname or where to find it, please try to check this service. Specify your website’s domain there and check the “Information” tab - “Resource Name”.

Here is what you should do if you don`t know your Hostname:

  1. Visit your website and copy a link to any image, having clicked at it with the right mouse button.
  2. Paste the link into a new Browser window. The domain you see will be a Content Resource for your website. E.g., if your website is running on Wix, the Content Resource will be the following domain: static.wixstatic.com
  3. Visit the following resource https://check-host.net and enter your website domain (not the one for Content Resource).
  4. Now check the “Information” tab - the “Resource Name” is your very Hostname. E.g., if your website is running on Amazon, your Hostname may look like: ec7-54-151-126-156.eu-west-1.compute.amazonaws.com
  5. Write the figured out Hostname in your account.

To download content from the source server to the distribution server cache, you need to provide a stream URL.

Specify the path to the stream. The domain name is automatically substituted from the "Source of Data".

Attention

You can specify several playlists.

Click "CREATE RESOURCE".

The resource has been created! You`ll be taken to the “Setup instructions + Player” tab.

Checking the Stream

After you get the publication links and configure your encoder, please make sure that the stream works properly.

Important!

You need to replace your original domain with the one, specified in "Your CDN-link" field. After that your content will deliver from the CDN network.

Attention

Please use the “Code for embedding” frame to embed the player into your website.

Additional Configurations

You can configure your CNAME, add your SSL certificate and change your resource name using Additional Settings.

By default, after the settings are saved, your content will be available via HTTPS and will look like: https://example.a.trbcdn.net.

Custom SSL-certificate

To start with our service, you will need to upload your certificate or generate a new one. To do this, click the “ADD CERTIFICATE” link in the upper right corner.

Then please choose the certificate you are planning to use for your resource:

CNAME Record

CNAME record allows to assign an alias to a host. It usually relates to some functional meaning, or just shortens the host`s name.

Your content will be available by default at example.a.trbcdn.net/images/1.jpg, but you may configure access to your content at cdn.example.com/images/1.jpg. You will need to create a CNAME record using the manual below. The record should be created on the servers to which your domain is delegated.

  1. Open the DNS management page at the website of your DNS hosting company.

  2. Create a CNAME record with the following data (the names of the textboxes may vary depending on the CMS):

  3. Wait until the DNS changes are effective. It may take up to 72 hours.

If you set your CNAME when setting up a live resource, the "Setup instructions + Player" tab will describe the setting of CNAME on your DNS server and provide an additional CDN link to the playlist.

CDN Resource Name

To change the resource name please specify the new name and then click “SAVE”.

Attention

The resource Name is generated automatically during the creation stage.

Local authorization

A decision on access to a stream is made by means of our network based on criteria indicated by the content owner. In this case, the user request authorization is done exclusively on the CDNvideo network; external resources are not used. At the time when the user is requesting protected resource the content owner should create a special reference.

Example:

http://example.a.trbcdn.net/path/to/stream?md5=ycmYPfxHwqjnIM93o7JNOA&e=1387984517

The reference contains two authorization parameters:

  • ‘md5=’ — is a MD5 hash in Base64 format for URL that is generated based on the URI of the requested stream, lifetime of the reference, secret key, user’s IP address (optional);
  • ‘e=’ — is time of reference expiration in the POSIX time format.

When accessing the resource using the generated reference CDN calculates the MD5 value and compares it with the received value. If the MD5 values do not match, a response code ‘403 Forbidden’ (playback is denied) is returned to the user.

If the current time is greater than the “e” value (expires), a response code ‘410 Gone’ (the target is no longer available) is returned to the user.

An algorithm for calculating the MD5 hash using the user’s IP address as one of the input parameters is as follows:

md5 = base64_url(md5(SECRET/path/to/stream1.2.3.4expiretime))

Attention

The domain part of the URI while computing the hash is not used!

Example of URL generation:

  1. The following input data is available:

  2. Calculation of the timeline of reference validity. In the above example it is a week from the time of generation.

    $ php -r 'print time() + (7 * 24 * 60 * 60) . «\n»;'
    1387984517
    

  3. Calculation of the MD5 hash in Base64 format for URL:
    $ php -r 'print str_replace("=", "",strtr(base64_encode(md5("zah5Mey9Quu8Ea1k/path/to/stream1.2.3.41387984517", TRUE)), "+/", "-_")) . "\n";'
    ycmYPfxHwqjnIM93o7JNOA
    
  4. Resulting reference:

    http://example.a.trbcdn.net/path/to/stream?md5=ycmYPfxHwqjnIM93o7JNOA&e=1387984517

In local authorization the following parameters are controlled:

  1. URI of the stream being requested. It is verified whether the reference was established for exactly this stream.
  2. Secret key. It is verified whether the reference is established exactly by the content owner.
  3. Expiration time of reference validity (optional). You can cancel time validation via "Do not impose time restrictions".
  4. IP address of the user (optional). It is verified whether the stream is requested exactly from the IP address for which the reference was established. You can cancel IP address validation via "Do not impose IP address filter".
External authorization

External authorization is designed to be able to restrict access to the stream with custom logic described in your authorization script. A decision to access the stream is made based on response of your script.

If the authorization script responded with status code = 200, then access to the stream is allowed. Otherwise, access is denied.

The following headers are passed to the authorization script:

  • Host: contains the domain name of the server for which the request is intended;
  • X-Request-URI: contains the URI of the requested stream;
  • X-Forwarded-For: contains the real IP address of the user;
  • X-Remote-Addr: contains the IP address of the user or the proxy server.