
Live Streaming from Unreal Engine to Amazon IVS
Explore the integration between Unreal Engine and Amazon Interactive Video Service (IVS), demonstrating how you can stream live content from Unreal Engine directly to Amazon IVS.
Use Case | Description |
---|---|
Live Streaming of Gameplay | Engage the gamer’s community around their skills and experiences by enabling them to live stream their gameplay. |
Real-time Sharing of Game Development Processes | Game development companies can share behind-the-scenes game development processes in real-time, allowing their audience to witness it firsthand. |
Exclusive Sneak Peeks of Upcoming Titles | Game studios can build excitement and anticipation among their fan base by offering exclusive sneak peaks of upcoming gaming titles |
Live Streaming Unreal Engine Tutorials and Workshops | Allows Unreal Engine experts to teach a mass audience how to use the software to create gaming or other content. This provides an interactive and engaging learning experience for the audience. |
- Unreal Engine. You will need to have Unreal Engine version 5.4.3 or later installed.
- AWS Account. We will be leveraging the power of Amazon Web Services (AWS) to create the backend resources needed to live stream from Unreal Engine to Amazon IVS.
- Part 1 - Create an Unreal Editor project and Install Pixel Streaming Plugin
- Part 2 - Create an IVS Stage on AWS
- Part 3 - Write code to forward the media stream from Unreal Editor to IVS
- Part 4 - Test it out












- Command-line flag parsing: First we define command line flags for the URL we want to connect to, an origin URL for the request that is passed in the HTTP header, and a participant token. The URL we want to connect to will default to http://localhost since our signaling server is running locally and is listening on port 80 for websocket connections. The origin will be http://localhost as well since we will be running this Go program locally. Finally, we also specify a participant token to authenticate with the IVS stage we just created. This can be thought of as the password that enables us to send audio and video from Unreal Engine to IVS.
- Websocket connection: Next, we establish a websocket connection to the URL specified from above. We also set up a deferred function to close the connection when we exit the program.
- Initial communication: After connecting to the websocket URL, we set up a for loop that continually parses incoming JSON messages from the websocket connection. The different type of messages we handle include
config
: Updates peer connection with configuration informationoffer
: Also known as a WebRTC offer, we create a session with our IVS stage (more on this later), set up a peer connection with the signaling server from the Pixel Streaming Plugin (more on this later), and send an answer. This offer and answer process allows the our Go program and the signaling server to negotiate and agree on the parameters of the connection.iceCandidate
: We use this to add ICE candidates to the peer connection. ICE stands for Interactive Connectivity Establishment. ICE candidates are network addresses that represent potential connection points for a device. Without ICE candidates, we wouldn’t be able to find the best connection point between our Go program and the signaling server. ICE candidates are also used to overcome network address translation (NAT) and firewall traversal issues that can prevent direct connections between peers. Here, both our Go program and our signaling server are running locally, so that won’t be an issue here.playerCount
: Prints the number of connected players or the number of participants that have joined the stagestreamerList
: We use this JSON message to subscribe to the first available streamer. In this case our “streamer” is the media stream provided by the Pixel Streaming Plugin running in Unreal Engine.
createStagesSession
. A stage session just represents a period of activity when a participant joins a stage. In this case, our Go program is the participant joining the stage.YOUR_PARTICIPANT_TOKEN_HERE
with the participant token you created earlier in the IVS console> go run ./main.go -token YOUR_PARTICIPANT_TOKEN_HERE


Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.