Introduction
HLS and other HTTP live streams can be delivered via CDN Static services and HLS and other HTTP on-demand streams can be delivered via CDN Static or CDN Static Push services.
Use more CDN Locations for your live and on-demand streaming
CDN Video, CDN Video Push and CDN Live services deliver streams only through (Wowza based) streaming CDN Locations. Please refer to the network page for a list of all our CDN Locations and please note that streaming CDN Locations are marked with a "play" icon. On the other hand CDN Static and CDN Static Push services deliver streams through all CDN Locations. It is because all our CDN Locations support (Nginx based) HTTP delivery.
Live streaming
Re-streaming (pull from your streaming server) of a live stream through a CDN Live service is limited to an RTMP protocol. Your origin live stream has to be accessible on RTMP URL starting with rtmp://. Please note that the CDN Live service automatically transcodes the origin live stream into multiple protocols such as RTMP and HLS. With CDN Static service you can re-stream any HTTP live stream. In particular you can re-stream HLS (Apple HTTP Live Streaming) live stream.
Video on demand
CDN Video and CDN Video Push services are designed to work with regular video files such as video.mp4 on the origin. Please note that CDN Video and CDN Video Push services automatically transcode the video into multiple protocols such as RTMP and HLS. Both services are not designed to work with HLS (and other HTTP) on-demand streams on the origin. With CDN Static and CDN Static Push services you can re-stream any HTTP on-demand stream. In particular you can re-stream HLS (Apple HTTP Live Streaming) on-demand stream.
Integration on your end
The following is recommended for .m3u8 files.
- Enable CORS.
- Set MIME type to application/vnd.apple.mpegurl.
- Set Cache-Control HTTP header value to no-cache.
Live streaming
On your end you need a streaming server configured to HTTP streaming. Please refer here for a configuration for the Wowza Media System. For smooth playing it is recommended to set max-age (value of the Cache-Control HTTP header on your origin server) for your video segments (usually with .ts extension) to be around their length (usually 10 seconds).
Video on demand
On your end (or on your CDN Storage) you need a HTTP on-demand stream such as HLS. For smooth playing it is recommended to set max-age (value of the Cache-Control HTTP header on your origin) for your video segments (usually with .ts extension) to 86400 (24 hours). Please refer here for more details on how to set custom HTTP headers on CDN Storage.
Integration on CDN end
Let's assume that your HLS stream is located on the following origin URL.
http://mycompany.com/stream/playlist.m3u8
Create a CDN Static service with the following properties.
- Set Origin Domain to mycompany.com.
- Enable both MP4 and FLV HTTP pseudo streaming in advanced settings (not mandatory but recommended).
Let's assume that 12345.r.cdnsun.net is the Service Identifier of your new CDN Static service. Then your CDN accelerated HLS stream is located on the following CDN URL.
http://12345.r.cdnsun.net/stream/playlist.m3u8
Integration of CDN Static Push service is analogical. First create a CDN Storage and upload your HLS on-demand stream to it. Then use that storage as Origin Storage for your CDN Static Push service.
HLS optimization
Internally we can optimize CDN Static and CDN Static Push services for HTTP streaming (HLS, Dash, etc.). Optimized CDN services will have significantly higher cache-hit ratio which will result into a substantial improvement of streaming performance. Please contact us via the support form below to request this optimization. Your request should contain a Service Identifier (e.g., 12345.r.cdnsun.net) of the CDN service that you want to optimize.
What next?
Read about the following topics.