Reducing Delay b/w Chat Input and Stream Output


#1

Hi everyone!

We are developing a stream game with a couple of friends for fun. For now we are working on the proof of concept prototype. We are software engineers but not experienced in streaming. Like in many streaming games, in this game viewers vote for a certain decision/move. We are fetching the votes by reading the IRC channel.

We are aiming to bring a (relatively) fast paced action like game, so viewers wont get bored while waiting for the next move. However I am not sure about the length of delay between moment an action occurred in the game and the moment viewers see it. I think I am talking about the “stream delay” in here. When I tested it by watching the game from the streaming PC I noted the following delays:

~13.45 secs when streaming with 800 kbps
~9.90 secs when streaming with 250 kbps

I have a few questions about this issue:

  • Why encoding bitrate effects the delay?

  • How can we reduce the delay apart from reducing the bitrate?

  • Does people in different locations have different delay lengths (i.e. delay in Amsterdam vs. delay in LA)? The answer is probably yes but what is the scale?

  • Do you recommend a voting interval duration (i.e. spare 1 min for collecting votes)?

  • If we finalize our game, can Twitch support our game (like hosting our game in a server, help us to reduce the delay etc.)?

  • We are not utilizing the twitch’s API, just reading from the IRC channel. How can we benefit from the API for our game?

Best,

  • Lab.

#2

Hi Labrador,

Why encoding bitrate effects the delay?

In lieu of our video team answering I can offer my insights:
Handwave latency (video delay) is primarily a function of the connection between the viewer and our edge servers. There is latency introduced in the broadcast (OBS), transcode (RTMP->HLS, quality options, etc), replication (moving data between POPs), and playback steps. The bitrate matters most in the replication and playback steps, as those steps incur larger latency network connections between regions and between our edge and a viewer.

The difference you are seeing here is likely due to the amount of time it takes to buffer several chunks of data before playback. I’m guessing you did not reach statistical sample sizes with this. You’d to test several times to be see how much it affects it on average. Keep in mind, this latency depends very much upon an individual’s connections, time of day (depends on traffic congestion for ISPS), and lots of other small things.

How can we reduce the delay apart from reducing the bitrate?
You can enable low latency mode at www.twitch.tv/settings/channel

Does people in different locations have different delay lengths (i.e. delay in Amsterdam vs. delay in LA)? The answer is probably yes but what is the scale?

The latency difference between regions does not vary much between regions, and difference is on the order of a few seconds, mostly dependent I believe on the connection of the viewers in those regions.

Do you recommend a voting interval duration (i.e. spare 1 min for collecting votes)?

Yes, this allows everyone to be on the same page, and for votes to not cross the time barrier between questions.

If we finalize our game, can Twitch support our game (like hosting our game in a server, help us to reduce the delay etc.)?

Most of our marketing content is curated content (not upon request from developers, etc) and our marketing teams decide based on community, etc. We mostly focus on organic viewership, and try not to show favoritism. If you’re building a tightly Twitch integrated game, I encourage you to reach out to help.twitch.tv to get in contact with our marketing teams.

We are not utilizing the twitch’s API, just reading from the IRC channel. How can we benefit from the API for our game?

I don’t know, you tell us! Having players able to sign in with our API is very nice, and reduces the barrier to our users using your game. Maybe you have a history of players doing things in game, or a NPC doing things based on chat votes. You’re probably more creative than me, so toy around with ideas.

Cheers,

Xangold


#3

Also, @Labrador, we have an initiative called stream first that could help you find some of these answers. You can submit an inquiry to that team telling them about the game.


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.