YouTube playback can be painfully unbearable to watch over at our apartment, with an annoying propensity for playback of almost any 720-1080p video to stutter and even stop completely mid-video. Little did I know the problem wasn't a slow internet connection or even YouTube servers, but possible behind-the-scene shenanigans from our service provider throttling connections to cached servers...
Mitch Ribar of Mitch's Space made my day with this oh-so-easy solution for the YouTube constipation blues:
Why do these commands create a better streaming experience? TWC (Time Warner Cable) is throttling downloads from servers (CDN) that host cached videos. By rejecting these IP address ranges you will force the video to be served to you directly. This harnesses the full download speed of your internet connection.
So how do you fix the issue? Well according to Mitch, if you're on Mac with OS X, you'll need to dust off the most basic of Terminal skills (this application is found in: Applications > Utilities > Terminal):
OS X: Open up your Terminal and run these commands (you will be prompted for the admin password):
sudo ipfw add reject src-ip 184.108.40.206/24 in
sudo ipfw add reject src-ip 220.127.116.11/16 in
You can check the rules were added by using this command:
sudo ipfw list
Mitch recently followed up this OS X tip with a solution for Windows users:
- Click the Start button, type “cmd”, and right click the icon to ‘Run As Administrator’ (Screenshot 1)
- You will likely see a UAC prompt, hit “Yes” (Screenshot 2)
- The command prompt window will open, this is where you will type in the commands to set your firewall rules (Screenshot 3)
- Enter the following command and hit Enter. If it works, you should see a big “OK”.
netsh advfirewall firewall add rule name="MITCHRIBARYTUBE" dir=in action=block remoteip=18.104.22.168/24,22.214.171.124/16 enable=yes
I tested the OS X solution to great success, trying it out with a myriad of hi-def content which previously gave me the shakes, shutters, and slowdown (what better video than to test it with than this Intel "Turboboost" animation in 720p mode?). After the quick Terminal command rules, YouTube's mojo was back and watching the progress bar returned back to formerly impressive speeds. And if it doesn't work, you can revert everything back easily following direction here (OS X) and here (Windows).