By default, if your stream is in HLS format, we will just proxy it through CDN-servers to the end-users.
To configure the service:
- Create a CDN resource in the control panel
- Configure cache settings for playlists (.m3u8) and video segments (.ts).
- If you set a Live streaming, configure file caching through RAM.
Cache settings for playlists and video segments
You can set cache settings for playlists (.m3u8) and video segments (.ts). either on your origin or in the control panel.
Origin setup recommendations:
For video segments (.ts) set the Cache-Control HTTP header to 1 minute (the time of caching should be a little bit longer than the length of a video segment (.ts)) By default, CDN servers inherit all HTTP headers from your origin and follow the stated directives. Do the same for playlists (.m3u8), but set the Cache-Control HTTP header to 1-2 seconds.
Control panel setup recommendations:
1. Configure a personal account:
For video segments (.ts). Go to the settings of the CDN Resource that you plan to use for broadcasting. Click on "Show advanced settings" and navigate to the "Cache" settings.
Add the option CDN Caching and select CDN controlled where you are to specify Cache Expiry equals 1 minute.
Add option Browser Caching and select CDN controlled where you are to choose the point Do not cache for the Cache Expiry parameter.
For playlists (.m3u8).
You can create a rule from a prepared template.
- In the resource settings, go to the Rules tab and click the arrow next to the Add rule button.
- Select the Playlists template (.m3u8) template.
- Click Add rule button.
2. Integrate the stream with the CDN.
Change your domain address in URLs to your CDN domain name. Check CNAME settings beforehand.
For example, a stream URL from origin: http://domain/playlist.m3u8
The stream URL from CDN: http://cdn.domain/playlist.m3u8
You can check your stream in any player that supports online HLS streaming (for example, VLC).
3. If you plan to stream Live, contact our technical support (email@example.com) to configure file caching through RAM. The setting will help to speed up the content delivery from the CDN and also prevent possible delivery failures.
Important! If you plan to stream VOD, please, skip this step.
4. Share your stream
Publish the updated stream URL on your website.
If you expect more than 100 viewers from different locations, we strongly recommend you to activate origin shielding to reduce the load on your origin.
How to configure file caching through RAM
In order to configure file caching through RAM instead of through hard drives, go to the CDN-resources, click the arrow sign next to the resource for Live streaming and choose Turn on LIVE STREAMING preset.
To turn off the preset, go to the CDN-resources, click the arrow sign next to the resource for Live streaming and choose Turn off LIVE STREAMING preset.