Create, publish and stop a live stream


#1

Hi, everyone! i’m looking for a way to programmatically start and stop a new live stream video through the new API. I saw something about the ingest server but i dont found anything about it on the new twitch API documentation.

Is there a way to do it?


#2

There isn’t currently an ingests endpoint in Helix, so you’ll have to use the v5 endpoint https://dev.twitch.tv/docs/v5/reference/ingests#get-ingest-server-list for the time being.


#3

i can get and pick an endopint through https://stream.twitch.tv/ingests. The question is: there is a way to launch a live stream through the API? i didnt found anything in the documentation )=


#4

Once you’ve selected an ingest server, and added your stream key to it, you’ve got all you need from the API.

Now you simply use RTMP to send your stream to that ingest and you’re live.

If you need to change your title/game you’re playing then that can be done through the API https://dev.twitch.tv/docs/v5/reference/channels#update-channel but as for actually starting the stream once you’ve got an ingest server and your stream key you have everything you need.


#5

Thank you! :smiley:


#6

The language you used, suggests you are familiar with how YouTube does it.

For Twitch, you JUST only need to start sending video data to one of the ingest endpoints from the ingest API.

Where as YouTube you need to make like 4 API requests before sending video.

And to stop you just stop sending video data, (and YouTube is stop sending video and then make a API request iirc)


#7

i’m not used to do apps with live streaming API, so i’m studying how the new Twitch API can be integraded with my react native app.