- marked as minor
Twitch Streaming
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)
-
reporter -
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.
-
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.
-
This requires the following steps:
- Getting a player's twitch key
- 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
- Rendering everything twice - once to the screen and a second time to an off-screen buffer
- Encoding the off-screen buffer to an flv stream with somet suitable flv library
- Sending that data over rtmp to the twitch server with something like librtmp
- 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.
-
ffmpeg appears to support rtmp streaming including the flv encoding required; there is little documentation on it from the point of view of using it from the library, but an example exists in https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c
-
- changed milestone to Gold
-
- removed milestone
Removing milestone: Gold (automated comment)
- Log in to comment