AWS Media Blog

Setting up for streaming with Amazon Interactive Video Service

Amazon Interactive Video Service (IVS) is a managed, live-video streaming service. In this post we show you how to:

  1. Set up live streaming on your PC with OBS Studio.
  2. Set up live streaming on your cell phone with Streamlabs.

Prerequisites

Before you begin setting up your stream, follow the steps in Getting Started with Amazon IVS in the Amazon IVS User Guide to do the following:

  1. Create an AWS account.
  2. Set up an AWS Identity and Access Management (IAM) user and policy.
  3. Create an Amazon IVS channel to feed your video into. We recommend doing this is with the Amazon IVS console.

When you create an Amazon IVS channel, you get an Ingest server and Stream key. You use these to set up streaming. (You also get a Playback URL, to use later to play back your stream.)

The Getting Started document also describes OBS Studio setup, specifically a setup using the OBS auto-configuration wizard. Here, we describe a more advanced setup with several manually specified options.

Setting up live streaming with OBS Studio

OBS Studio is free, open-source software for recording and live streaming. OBS provides real-time source and device capture, scene composition, encoding, recording, and streaming.

Follow these steps to get up and running quickly with OBS Studio:

  1. Download and install OBS: https://obsproject.com/download.
  2. Run OBS Studio. On the main screen, click Settings (bottom right).
  3. In the Settings window, click Stream on the left.
  4. In the Service box, select Custom… Then, enter the Server and Stream Key:

OBS Settings window: Stream tab

If you created your channel with the IVS console:

      • The Server you enter is the Ingest server returned by the IVS console after you created a channel.
      • The Stream Key you enter is the Stream key returned by the IVS console after you created a channel.

If you created your channel with the AWS CLI:

      • The Server you enter is a combination of three things:
        • An ingestion protocol: rtmps://
        • The ingestEndpoint returned by the AWS CLI after you created a channel.
        • A path: /app/
      • The Stream Key you enter is the streamKey value returned by the AWS CLI after you created a channel.

5. In the Settings window, click Video on the left.

OBS Settings window: Video tab

6. Configure the Output (Scaled) Resolution and Common FPS Values (frame rate). We recommend 852×480 and 30 (480p30), respectively. Later, in step 13, you can adjust these settings, if necessary.

7. In the Settings window, click Output on the left. In the Output Mode field, select Advanced, then click the Streaming tab.

8. Specify the following values:

Field Value
Encoder x264
Rate Control CBR
Bitrate 1500 Kbps (later, in step 13, you can adjust this setting, if necessary.)
Keyframe Interval 2 (seconds). Set to either 1 or 2, otherwise the end-to-end latency is >5 seconds.
CPU Usage Preset veryfast
Tune zerolatency

9. Click OK to close the Settings window.

10. In the OBS main window, go to the Sources area, right-click, select Add, and add the following sources:

    • Video Capture Device, which is your webcam.
    • Text, if you want to add a title to your streaming session.
    • Browser, with a URL of https://www.clocktab.com/, which you can use to observe the end-to-end latency of your stream.

11. Click Start Streaming at the bottom right to start the live stream.

OBS main window: streaming

Note: The square in the bottom-right corner should be green during the streaming session: this means that the video encoder is sending the stream to the video backend successfully. If the status is orange or red, go to step 13 to lower your bitrate and/or adjust your video settings.

12. Click Stop Streaming to end your live video stream.

13. To improve performance, you can adjust your video settings and bitrate according to your estimated network connection speed. The settings used earlier in steps 6 and 8 assumed a medium network connection speed. The following table provides a starting point for making adjustments.

    • Set Output (Scaled) Resolution and Common FPS Values, as in step 6.
    • Set Bitrate, as in step 8.
Network Connection Speed Output (Scaled) Resolution /  Common FPS Values (step 6) Bitrate (step 8)
Acceptable (SD) 852×480 / 30 1500 Kbps
Good (HD) 1280×720 / 30 or 60 4500 Kbps
High (full HD) 1920×1080 / 30 or 60 8500 Kbps

Setting up live streaming on your cell phone

Setting up Amazon IVS for streaming on your cell phone is as straightforward as setting up on your PC. Follow these steps to set up cell phone streaming using the Streamlabs app.

  1. Install Streamlabs from either the Google Play or Apple App Store.
  2. Open Streamlabs on your cell phone and select Other Platforms.

Streamlabs login
3. Enter the Server and Stream Key:

Streamlabs: setting Server and Stream Key

If you created your channel with the IVS console:

      • The Server you enter is the Ingest server returned by the IVS console after you created a channel, with outbound port number (:443) added. For example: rtmps://16801e9e183b.global-contribute.live-video.net:443/app/
      • The Stream Key you enter is the Stream key returned by the IVS console after you created a channel.

If you created your channel with the AWS CLI:

      • The Server you enter is a combination of four things:
        • An ingestion protocol: rtmps://
        • The ingestEndpoint returned by the AWS CLI after you created a channel.
        • An outbound port::443
        • A path: /app/
      • For example: rtmps://16801e9e183b.global-contribute.live-video.net:443/app/
      • The Stream Key you enter is the streamKey value returned by the AWS CLI after you created a channel.

When you are done, click Continue.

4. Click through the next three screens to give Streamlabs permissions to access your camera and microphone, take pictures, and record video and audio,

5. Click the 3-bar (hamburger) icon in the top-left corner, then click Editor. Click the plus button (+) in Add a Layer, then Add Camera.

Streamlabs: adding a camera layer

6. Click the check mark at the top-left to return to the main screen.
7. Click the camera icon in the bottom-left corner to toggle between front and rear cameras.

Streamlabs: selecting front or rear camera

8. Click the 3-bar (hamburger) icon in the top-left corner to return to the main menu, then click Settings.
9. From the Settings page, click Broadcast.
Streamlabs: broadcast settings

10. Specify the following values:

Network Connection Speed Output resolution /  Expected frame rate Max video bitrate
Acceptable (SD) 852×480 / 30 1500 Kbps
Good (HD) 1280×720 / 30 or 60 4500 Kbps

11. After you return to the main menu, click the red circle in the bottom center of the screen to begin streaming.

Streamlabs: broadcasting

Note: If your network bandwidth is too low to support your selected video bitrate, a warning will appear, as in the example image (“poor connection”). Go back to step 10 and lower the Max video bitrate.

12. Tap your screen and click the stop button in the bottom center of the screen to stop streaming.

Verifying your live stream

To verify that your OBS Studio or Streamlabs video stream is live and working properly, do the following:

  1. Open the Amazon IVS Console.
  2. Click the 3-bar (hamburger) icon in the top-left corner, and select Live channels.
  3. Find your channel, and click its name.

IVS Console: finding your channel

4. The channel detail page shows your live stream and provides other useful information.

IVS Console: your channel details

For more information