Introduction to IVS
With advancements in hardware and software technology, as well as the widespread use of electronic devices, users can now watch live streams on their smartphones and tablets. Not only are gaming live streams popular among audiences, but more and more content creators are using live streaming to increase fan engagement, sell products, and promote their brand, thereby deepening their brand's presence. Consequently, there is an increased demand for live streaming, with users having higher expectations for low latency. In this practical operation, we will demonstrate Amazon Interactive Video Service (Amazon IVS), a real-time streaming service that can be easily and quickly configured.
Cloud Live Streaming Practical Operation
In this practical demonstration, we will use AWS-IVS and integrate it with OBS (Open Broadcaster Software). OBS is a free open-source software that allows streaming from any camera, including those on smartphones, computers, and cameras. It also features a studio mode, allowing users to customize multiple scenes for quick switching during live broadcasts. The implementation process is as follows:
- Create a channel in IVS to obtain server and streaming keys.
- Configure streaming settings in OBS to complete the live broadcast.
1. Accessing IVS Service
Upon logging into the AWS platform, enter "IVS" in the search bar and click on "Amazon Interactive Video Service."
If your region is not set to (Oregon), (Northern Virginia), or (Ireland), you may see the screen below. Simply change the region to one of these options in the top right corner to access the interface.
After changing the region, the screen to enable the service will appear. Click on "Create Channel.
2. IVS Channel Creation
Configuration
Upon entering the page, you'll need to set the following configurations for the channel:
- Name the channel
- Choose channel configuration: Adjust [Channel Type] and [Video Latency] based on your channel's needs. The default configuration is optimized for real-time interaction and ultra-low latency. You can also opt for a custom configuration.
In this demonstration, I chose the [Default Configuration] for illustration purposes.
Recording and Storing Streams
Next, if you wish to retain the live stream content, you can choose to automatically record it to S3. If not, you can select "Disabled."
Tags
Tags are custom attributes that can be connected to AWS resources, making it easier to identify, organize, and search for resources.
Once its done, click on create channel.
3.IVS Page
Once the channel is created, the channel information will be displayed under [General Configuration]
as shown in the figure below. When starting the stream, you can view the screen in [Live Stream]. The information in [Stream Configuration] will be needed later when setting up the stream in OBS. Additionally, [Playback Configuration] provides the playback URL.
After creating the IVS channel, the next step is to configure OBS
4.OBS Configuration
In OBS settings, adjustments need to be made for [Streaming], [Output], and [Video].
Streaming Settings
Here, we need to complete the streaming settings between OBS and IVS. First, go back to the IVS channel page and copy the [Ingest Server] and [Stream Key].
Return to the OBS screen, as shown in the figure, click on [Settings] at the bottom right, then click on [Stream] on the left side. Click on Custom for [Service], and paste the [Ingest Server] and [Stream Key] from IVS into the [Server] and [Stream Key] fields below.
After clicking OK, the streaming setup is completed.
Next is the output configuration. Click on "Video" on the left side.
Video Settings
Click on "Video" on the left side of OBS. According to official recommendations, it is suggested to change to the following settings:
- Output (Scaled) Resolution: 852×480
- Common FPS Values: 30
Output Settings
Next, click on "Output" on the left side, choose the advanced mode, and then click on "Stream". According to official recommendations, it is suggested to change to the following settings:
- Encoder: x264
- Rate Control: CBR
- Bitrate: 1500Kbps (adjust as needed)
- Keyframe Interval: 2 (set to 1 or 2 to prevent end-to-end latency exceeding 5 seconds)
- CPU Usage Preset: veryfast
- Tune: zerolatency
After all settings are configured, return to the page to set up the scene you want to live stream. As shown in the figure below, I have already set up a scene containing video, text, and time as a demonstration.
5.Start Streaming
Once the scene setup is complete, click on "Start Streaming" at the bottom.
You will see "Live" displayed at the bottom of OBS, indicating successful streaming.
Check the real-time stream from the IVS channel main page, and the delay is within 3 seconds.
6.IVS Application Showcase
According to AWS official documentation, using the Amazon IVS Player SDK can achieve the lowest latency performance. In this demonstration, we will compare the performance between the AWS IVS Player and an unofficial player. We will be using the "Playback URL" from the "Playback Configuration" section of the IVS channel for the demonstration.
VLC media player
First, let's use VLC media player for the demonstration. After opening VLC, click on "Media" and then "Open Network Stream".
Click on "Network", paste the playback URL, and then click "Play".
Streaming will commence in VLC, with a delay of approximately 25 seconds.
Next, we'll test using the Amazon IVS Player SDK.
Amazon IVS Player SDK
Developers can embed code provided by AWS for the Amazon IVS Player example into their webpages. Simply change the URL in the player.load function in your JS file to your playback URL. For example files, please refer to the AWS Developer Guide. Here, we demonstrate using the Amazon IVS Player SDK for testing, with a delay of approximately 2 seconds.
Assistant Engineer
許媁涵 Annie Hsu