R1CH Profile Blog Joined May 2007 Netherlands 10026 Posts Last Edited: 2013-11-18 17:50:11 #1 This experiment is over!

I don't recommend using this any more since it will cause Chrome to crash.



+ Show Spoiler +



This program will intercept RTMP connections and handle the networking separately from Flash player using an event based system for maximum performance. If Flash player is unable to read the data fast enough, it will be buffered (up to 4MB). Additionally, a larger initial receive window is attempted.



Fortunately / unfortunately my own connection rarely lags, so I have limited data to see if this has any effect, but from my sample size of kollin, it appears to improve things a little so why not give it a try!



Requirements:

Visual Studio 2010 Runtimes

Google Chrome

Pepper Flash (Chrome's internal flash player, unless you change it this is the default)

Windows 7



Download:

http://www.teamliquid.net/staff/R1CH/TwitchProxy.zip



Put both files in a folder somewhere and run Chrome, then run TwitchProxy. You can tell if it works by watching the console, when a stream is open you should see it spamming away about buffers. If it breaks and you can't browse anything, just restart Chrome - all changes are applied in-memory only. If you restart Chrome completely, you will also need to restart the proxy for it to apply to the new Chrome process.



Note that this program is pretty much an experiment so treat it as such. So there's been a lot of complaints about twitch's poor performance recently. While they are to blame for some of it (lack of European data centers and other POPs), I suspect a lot of the problems stem from Flash player and poor TCP/IP tuning. I wrote a program to analyze how fast Flash player is able to receive the data and it did appear to stall from time to time, which may affect how TCP RWIN tuning over higher BDP connections (ie, Europe to US) works, potentially causing too small of a window size.This program will intercept RTMP connections and handle the networking separately from Flash player using an event based system for maximum performance. If Flash player is unable to read the data fast enough, it will be buffered (up to 4MB). Additionally, a larger initial receive window is attempted.Fortunately / unfortunately my own connection rarely lags, so I have limited data to see if this has any effect, but from my sample size of kollin, it appears to improve things a little so why not give it a try!Requirements:Google ChromePepper Flash (Chrome's internal flash player, unless you change it this is the default)Windows 7Download:Put both files in a folder somewhere and run Chrome, then run TwitchProxy. You can tell if it works by watching the console, when a stream is open you should see it spamming away about buffers. If it breaks and you can't browse anything, just restart Chrome - all changes are applied in-memory only. If you restart Chrome completely, you will also need to restart the proxy for it to apply to the new Chrome process.Note that this program is pretty much an experiment so treat it as such. I don't recommend using this any more since it will cause Chrome to crash.



Administrator Twitter: @R1CH_TL

Immaterial Profile Blog Joined September 2010 Canada 483 Posts #2 Truly a wizard. Thank you for this~! It is the mark of an educated mind to be able to entertain a thought without accepting it.

prodiG Profile Blog Joined January 2010 Canada 2015 Posts #3 Rich, I am nominating you for CTO of eSports. This is awesome. ESV Mapmaking Team || http://twitter.com/prodiGsc || Real talk, I don't have time to sugar-coat it for you sir

Grettin Profile Joined April 2010 32020 Posts #4 Interesting. I will use it when experiencing problems. Thank you! "If I had force-fields in Brood War, I'd never lose." -Bisu

R1CH Profile Blog Joined May 2007 Netherlands 10026 Posts #5 . Please let me know if it actually helps you or not, I'm curious as to whether it actually does anything Administrator Twitter: @R1CH_TL

NB Profile Blog Joined February 2010 Netherlands 8110 Posts #6



Thanks a lot R1ch But the question is, does the NSA read my twitch chat?Thanks a lot R1ch Im daed. Follow me @TL_NB

Heyoka Profile Blog Joined March 2008 Temple of EE-Sama 22504 Posts #7 I downloaded this and now my computer is full of viruses you won't get away with it this time mister wizard!!!! @RealHeyoka | DreamHack StarCrafty Man

Wintex Profile Blog Joined July 2011 Norway 14485 Posts #8 Thank you r1ch, i love you. The Bomber boy | EG, PPD | Remember "KTViolet" Woo Jung Ho and "INTERNETHULK" Dennis Hawelka.

Jacmert Profile Blog Joined October 2011 Canada 1605 Posts #9 You're a wizard, Harry :D I don't think I experience too much Twitch lag, but even so, this sounds like quite a nice project you started/completed! Plat Support Main #believe

kollin Profile Blog Joined March 2011 United Kingdom 7179 Posts #10 This works pretty well for me, a nice solution for EU people with problems ^^

felisconcolori Profile Blog Joined October 2011 United States 6166 Posts #11



More seriously, this doesn't impact ad serving and the like right? I wouldn't want it to run afoul of Twitch or impact their ability to serve such things.



+ Show Spoiler + Can't we kill Flash for video already? HTML5 or sommat like that? But I use firefox!More seriously, this doesn't impact ad serving and the like right? I wouldn't want it to run afoul of Twitch or impact their ability to serve such things. Yes, I email sponsors... to thank them. Don't post drunk, kids. My king, what has become of you?

Butterednuts Profile Blog Joined September 2010 United States 851 Posts #12 Heya R1CH, I'll give this a go when I get home! Chameleons Cast No Shadows

Excalibur_Z Profile Joined October 2002 United States 11881 Posts #13 On July 09 2013 04:42 Heyoka wrote:

I downloaded this and now my computer is full of viruses you won't get away with it this time mister wizard!!!!



Those go away if you sign up for all of the mail order bride offers and new car sweepstakes. Those go away if you sign up for all of the mail order bride offers and new car sweepstakes. Moderator

R1CH Profile Blog Joined May 2007 Netherlands 10026 Posts #14 On July 09 2013 04:44 felisconcolori wrote:

But I use firefox!



More seriously, this doesn't impact ad serving and the like right? I wouldn't want it to run afoul of Twitch or impact their ability to serve such things.



+ Show Spoiler + Can't we kill Flash for video already? HTML5 or sommat like that? But I use firefox!More seriously, this doesn't impact ad serving and the like right? I wouldn't want it to run afoul of Twitch or impact their ability to serve such things.

Firefox unfortunately spawns an external process and connects before my program can hook it which is why it isn't supported. This affects nothing other than RTMP (the video) connection, everything else should go through your browser, and even if it didn't, it should make no difference. Firefox unfortunately spawns an external process and connects before my program can hook it which is why it isn't supported. This affects nothing other than RTMP (the video) connection, everything else should go through your browser, and even if it didn't, it should make no difference. Administrator Twitter: @R1CH_TL

Gemini_19 Profile Joined June 2010 United States 1161 Posts #15 All that happens is a black script box appears on my screen O_o Is that supposed to happen? @GGemini19 GM Protoss | http://www.twitch.tv/geminisc2 | I <333 HerO & Trap | Check out my Build of the Week series on /r/allthingsprotoss, TL, or Spawning Tool

Grettin Profile Joined April 2010 32020 Posts Last Edited: 2013-07-08 19:46:49 #16 On July 09 2013 04:41 R1CH wrote:

Please let me know if it actually helps you or not, I'm curious as to whether it actually does anything . Please let me know if it actually helps you or not, I'm curious as to whether it actually does anything



Will do. By the way, is there a correct way to close this or does it matter? Can i just straight up close the console or is it 'better' to close the stream(s) first and then the proxy? Asking, if that would mess up something with the proxy itself. Will do. By the way, is there a correct way to close this or does it matter? Can i just straight up close the console or is it 'better' to close the stream(s) first and then the proxy? Asking, if that would mess up something with the proxy itself. "If I had force-fields in Brood War, I'd never lose." -Bisu

Sinistro Profile Joined February 2012 Brazil 677 Posts #17 I logged from my work risking to get fired just to thank you for this!



since it "fix" the problem handling the RTMP stream, watching it in VLC can solve the problem too?

XilDarkz Profile Blog Joined April 2010 United States 302 Posts #18 I'm going to watch streams for a bit, when I experience lag switch to this, and hopefully give you valuable feedback.



In the mean time, thanks for the investigation! aka Mathies! twitch.tv/Mathies if you want to watch me fail. esfiworld.com/author/mathies/

R1CH Profile Blog Joined May 2007 Netherlands 10026 Posts #19 On July 09 2013 04:45 Grettin wrote:

Show nested quote +

On July 09 2013 04:41 R1CH wrote:

Please let me know if it actually helps you or not, I'm curious as to whether it actually does anything . Please let me know if it actually helps you or not, I'm curious as to whether it actually does anything



Will do. By the way, is there a correct way to close this or does it matter? Can i just straight up close the console or is it 'better' to close the stream(s) first and then the proxy? Asking, if that would mess up something with the proxy itself. Will do. By the way, is there a correct way to close this or does it matter? Can i just straight up close the console or is it 'better' to close the stream(s) first and then the proxy? Asking, if that would mess up something with the proxy itself.

Closing the program will interrupt any active streams, but the browser hook should notice the program isn't running after a refresh and fall back to a direct connection. Closing the program will interrupt any active streams, but the browser hook should notice the program isn't running after a refresh and fall back to a direct connection. Administrator Twitter: @R1CH_TL

R1CH Profile Blog Joined May 2007 Netherlands 10026 Posts #20 On July 09 2013 04:45 Gemini_19 wrote:

All that happens is a black script box appears on my screen O_o Is that supposed to happen?

No, when you watch streams the box is supposed to fill with text. If it doesn't, there was probably a problem hooking Chrome. No, when you watch streams the box is supposed to fill with text. If it doesn't, there was probably a problem hooking Chrome. Administrator Twitter: @R1CH_TL

1 2 3 4 5 12 13 14 Next All