DEV Community

Cover image for Broadcasting to an Amazon IVS Real-Time Stream with WHIP from OBS

Broadcasting to an Amazon IVS Real-Time Stream with WHIP from OBS

Todd Sharp on February 22, 2024

Until recently, broadcasting to an Amazon Interactive Video Service (Amazon IVS) real-time stage required developers to utilize one of our Broadcas...
Collapse
 
mavipe profile image
Matthew

Thank you Todd for this great article.

Following the instructions detailed in the post I've been able to broadcast video to an Amazon IVS real-time stage using WHIP with OBS, Gstreamer and JavaScript in the browser.

For my use case, I only want to broadcast audio. When I try to publish an audio-only stream, by following the same steps and simply omitting the video part from the configurations, I get a 400 Bad Request response from the live-video.net/publish endpoint, with the body: {"code":2001,"message":"failed to create publisher session"}.

Is this a limitation of WHIP or IVS, and is there a workaround?

Collapse
 
recursivecodes profile image
Todd Sharp

Let me check on this and get back to you!

Collapse
 
mavipe profile image
Matthew • Edited

Thanks Todd.

I've forked the amazon-ivs-stage-recorder example repo and made some changes to demonstrate this issue: github.com/mattvick/amazon-ivs-sta...

The README.md file explains how to run the code to see the error response, and how adding a video codec and transceiver remedies the issue.

Let me know if you have any questions, or maybe you can see from the code that I'm doing something wrong.

Thread Thread
 
recursivecodes profile image
Todd Sharp

Very helpful, thank you. As a workaround, did you try adding a video track? It doesn't have to send any frames.

Thread Thread
 
mavipe profile image
Matthew

Thanks, that's a good idea. And I can confirm that adding a video track removes the error.

I know there is a big difference in pricing between IVS video and audio. Will adding a video track cause the stage time to be billed as video rather than audio?

Thread Thread
 
recursivecodes profile image
Todd Sharp • Edited

I think if you just pass an (empty) video track in the SDP negotiation, you'll be OK. You won't need to send blank video frames, I think the issue only lies in the SDP negotiation.