Broadcast from a browser with the Amazon IVS web broadcast SDK
Amazon IVS is a managed live streaming solution that is quick and easy to set up, and ideal for creating interactive video experiences. Send your live streams to Amazon IVS using standard streaming software like Open Broadcaster Software (OBS), or now with the IVS web broadcast SDK, just by opening your browser. The service is designed to do everything you need to make low-latency video available to any viewer around the world, letting you focus on building interactive experiences alongside the live stream.
Amazon IVS is well known by the developer community for simplifying live streaming integration. In addition to providing low-latency, the live video service is designed to work “out of the box.” It provides the Amazon IVS player SDK, timed metadata API, mobile broadcasting SDK, and stream chat API . Now, Amazon IVS is also simplifying the streamer side so developers can capture video from web browsers and send it as input to an Amazon IVS channel.
The Amazon IVS web broadcast SDK can integrate into new and existing applications. It supports camera source, screen share, swap between cameras, automatic bitrate adjustments, and secure streaming. Visit stream.ivs.rocks to try it out now.
In this blog post, we provide an overview of how to get started using the Amazon IVS web broadcast SDK and migrate your existing application to benefit from the SDK.
Migrating to the Amazon IVS web broadcast SDK
RTMPS is required to stream video to Amazon IVS from any source. Therefore, before the Amazon IVS web broadcast SDK, streaming from a web application needed a server to transcode or proxy the content, changing the transport from a WebSocket to RTMP. We described one potential solution in a recent blog post here.
With the introduction of the Amazon IVS web broadcast SDK, we can now implement a client-side only integration, eliminating the need for a live streaming proxy and extra architectural components to optimize scale, costs, and resilience.
Supported features and use cases
- Landscape and portrait mode presets 480p for basic channel ingest and 1080 for standard channel ingest
- Swap video positions of video devices, from rear to frontal camera, allowing for multi-position use cases
- Video controls: hide video or mute controls for simple operation
- Automatic bitrate adjustments: the Amazon IVS web broadcast SDK automatically adjusts the video bitrate to accommodate changing network conditions
Advantages of using the SDK
- Optimized latency for live streaming: With the SDK, latency is reduced; no extra round trip to servers, no double encoding. This means less buffering and the ability to watch your live streams in near-real time
- Resiliency: With the WebRTC ingest endpoint, your application can stream directly to Amazon IVS without a remote proxy
- Optimized infrastructure:When you stream directly to Amazon IVS, it is designed to automatically ingest video at a location near you
- Easier integration and development: Allows broadcasters to stream from their browsers with minimal setup
The following guide summarizes the integration steps required to migrate an existing web application to the Amazon IVS web broadcast SDK. Please visit the Getting Started guide for detailed documentation.
You can also refer to the Simplifying live streaming contribution GitHub repository if your application uses the React.js framework.
Load the IVS web broadcast SDK
The library can be either installed via npm or loaded via <script> html tags. This post will use the hosted files.
In the index.html file, load the script at the head of our page.