Twitch Streaming

Issue #23 new
Evan Markowitz created an issue

https://github.com/justintv/Twitch-API/wiki/Broadcasting-API

Allow for RTMP streaming ingame, specifically through twitch.tv

(this would require either for players to get a stream key and add it in OR link their twitch account to the game somehow)

Comments (7)

  1. Norgg

    What's the value of this over just using a third party application? I think getting the encoding settings and networking right for it would be pretty tricky.

  2. Evan Markowitz reporter

    For one, the ingame integration would potentially drive more people to stream the game at all (and the more people who stream, the more potential publicity is gained). Plus, it is a convenience thing... people could get a third-party tool (I use OBS myself for gaming), but now you don't HAVE to if you're a novice and just want to show some friends.

  3. Riot

    This requires the following steps:

    1. Getting a player's twitch key
    2. Polling https://api.twitch.tv/kraken/ingests and offering the list to the player, to allow them to selcet a twitch server geographically close to them
    3. Rendering everything twice - once to the screen and a second time to an off-screen buffer
    4. Encoding the off-screen buffer to an flv stream with somet suitable flv library
    5. Sending that data over rtmp to the twitch server with something like librtmp
    6. Pausing the stream and so on when the game is paused

    Rendering the second time and smoothly encoding the flv stream will probably be the most expensive part and also the most fussy to develop - it'll need a separate encoding thread with appropriate mutexes and locks to prevent issues while rendering from the first thread. It's doable, though.

  4. Log in to comment