How to integrate AWS Live Stream with VNIS Video Stream?

VNIS Video Stream ensures that your video streaming will have zero downtime and will scale during demand spikes. This is possible due to VNIS Video Stream’s mid-stream CDN switching and P2P video delivery.

If you are using AWS MediaPackage and MediaLive, it is possible to improve the availability and scalability of your HLS live stream videos by integrating them with VNIS Video Stream.

The diagram and instructions below will show you how you can do this.

Step 1: Obtain the m3u8 URL from AWS MediaPackage

You need to ensure that your live stream will be transcoded to HLS format. Check this article to learn more about video transcoding live streams and AWS MediaLive.

Log in to your AWS MediaPackage account, then navigate to ‘ Channels’.

Then select a workflow, by clicking the workflow link.

Then you will be directed to another page. On this page and on the ‘Origin endpoints’ section, select the link for the ‘ HLS endpoint’. 

You will be directed to another page. On this page, you can copy the m3u8 URL of your target HLS video by clicking the ‘ Copy’ (paper) icon beside the Endpoint URL (e.g. https://15bcd044c531aa99.mediapackage.ap-northeast-1.amazonaws.com/out/v1/6b211aef51f3482cac360f8cc83c06c6/index.m3u8). 

You will need this m3u8 URL in VNIS Video Stream.

It should be noted that, for live streaming to be possible, you also need to set up an RTMP server into your streaming device. This server will pull the video stream from your streaming device and push it into the channel. Check this article to learn more about setting up an RTMP server through AWS MediaLive.

Step 2: Create Stream Source in VNIS Video Stream

To set up a live stream, navigate to ‘ Stream’ > ‘Live Streams’, and then click the ‘Create live stream’ button.

On this page, set the Stream detail info.


The Stream detail info includes: 

  • Stream source name: a unique name for the stream source (e.g. ss name)
  • Protocol: specify the video format/container of the video stream. For now, only HLS is available.
  • Origin server: the origin server is where your video streams are hosted. Use the domain name associated to your origin server (e.g. example.com). You may also set this origin as a ‘CDN candidate’ and by doing so, this server will be used together with other CDNs for mid-stream CDN switching.

Next, set the CDN configuration.


The system will recommend you to install 1 Basic CDNs by default, namely Alibaba Cloud. You may also install additional CDNs depending on your business strategy.

You can add up to a maximum of 10 CDNs per stream source. If you set your origin as a CDN candidate, then your origin will also be counted as 1 CDN.

You may also enable P2P video delivery and/or Domain allowlist.

Finally, click the ‘Create live stream’ button.

You can follow this article for more details on how to create a Live Stream.

Step 3: Paste the m3u8 URL to the VNIS SDK 

After creating a live stream, VNIS Video Stream will generate code snippets. 

Go to the ‘ Install & Test’ tab and paste the copied m3u8 URL on the ‘Playlist URL’ field (from AWS MediaPackage), and then click the ‘Insert’ button. 


This process will insert the m3u8 URL of your target HLS video into the code snippets of the SDK.

You may check the preview of your video on the ‘ Video Preview’ tab and by clicking the ‘Preview’ button.

 

You can click the ‘ Copy’ button to copy all the code snippets into your streaming app code. You can also open the ‘See our docs’ link, to check more detailed instructions on how to input the code snippets for different players and JS frameworks.

You can follow this article or more details on how to use the code snippets.

Reminders:

  1. Make sure that your channel (in MediaLive) is running.
  2. Make sure that you input the RTPM server into your streaming device settings.
  3. Make sure that your streaming device is live.