Step 4: Set Up Streaming Software - Amazon Interactive Video Service

Step 4: Set Up Streaming Software

You can stream to Amazon IVS with the native mobile broadcast SDK or other streaming software (like the two examples below, Open Broadcast Software (OBS) and FFmpeg). These support RTMPS, like Amazon IVS. RTMPS enables high security via use of an encrypted TLS stream. You can use any streaming software that supports RTMPS.

Key encoder settings are keyframe interval (2 seconds) and resolution/bitrate/frame rate (which are interrelated). For more detail on encoder settings, see:


  • The maximum duration of Amazon IVS streams is 48 hours. After that, the stream is terminated and the streaming session is disconnected. A successful reconnect (automatically or manually) starts a new stream.

  • If your encoder stops sending data (e.g., due to a temporary network issue), Amazon IVS waits for 30 seconds. If no broadcaster data is received during this time, Amazon IVS disconnects.

Streaming with the Amazon IVS Broadcast SDK

To broadcast from your iOS or Android applications, you can use the Amazon IVS broadcast SDK. The broadcast SDK leverages the Amazon IVS architecture and will see continual improvement and new features, alongside Amazon IVS. As a native mobile broadcast SDK, it is designed to minimize the performance impact on your application and on the devices with which your users access your application.

For details, see Broadcasting to Amazon IVS.

Streaming with OBS Studio

(OBS Studio) is a free, open-source software suite 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 the software:

  2. Run the OBS Studio Auto-Configuration Wizard, which appears when you load OBS Studio for the first time. Follow the steps and accept the defaults.

  3. When prompted, enter the Server and Stream Key.

    If you created the channel with the Amazon IVS console:

    • The Server you enter in OBS is the Ingest server from the console, with the addition of port 443 (required for Amazon IVS ingest):


    • The Stream key you enter in OBS is the Stream key from the console:


    If you created the channel with the AWS CLI:

    • The Server you enter in OBS is a combination of four things:

      • An ingestion protocol: rtmps://

      • The ingestEndpoint from the CLI response:

      • A port: 443

      • A path: /app/

      The complete entry is:


    • The Stream key you enter in OBS is the streamKey value from the CLI response:


  4. In the OBS Studio main window, choose Start Streaming.

For more on streaming with OBS Studio, see OBS Studio Quickstart.

You can modify your OBS settings manually later:

  1. Choose Settings > Stream.

  2. Choose Custom from the dropdown.

  3. Paste in the Server and/or Stream Key.

You can run the wizard again at any time: choose Tools > Auto-Configuration Wizard.

Optionally, in Settings > General, enable local recording to save your live stream for later use. As mentioned earlier, network issues between the broadcast and AWS or within AWS could result in some data loss while recording your stream. In these cases, Amazon IVS prioritizes the live stream over the recording. Recording locally via your streaming tool provides redundancy.

It’s advisable to check for OBS Studio updates regularly and update to the most current version. (For instance, if you get a “Failed to connect to server” error, you may be using an old version of OBS Studio that does not support RTMPS.)

Streaming a Recorded Video with FFmpeg

Follow these steps:

  1. Download and install FFmpeg:

  2. Set $VIDEO_FILEPATH to the location of an MP4 video to stream:

  3. Set STREAM_KEY to your StreamKey value:

  4. Set INGEST_ENDPOINT to your ingestEndpoint:
  5. Start streaming with the following terminal command (this is all one line):

    ffmpeg -re -stream_loop -1 -i $VIDEO_FILEPATH -r 30 -c:v libx264 -pix_fmt yuv420p -profile:v main -preset veryfast -x264opts "nal-hrd=cbr:no-scenecut" -minrate 3000 -maxrate 3000 -g 60 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmps://$INGEST_ENDPOINT:443/app/$STREAM_KEY

    Note, the above command is an example. For production streaming, tune the parameters to your needs.