Student attempts to fix buffering for streaming
For college students who cannot afford recurring Netflix fees, the joy of finally finding that specific episode of “Game of Thrones” on an illegal website is immediately met with the disappointment of a lagging loading bar.
The delay between the time it takes for an online video to stream — essentially download to your computer — and actually start playing is infamously known as buffering. It is the bane of YouTube addicts around the world.
But while most sit idly by staring at their computer screens in agony, Vivek Seth decided he was going to do something about it.
Seth, a Rutgers Business School sophomore, was inspired to eliminate buffering while watching TV shows over the summer on NovaMov, a video hosting and sharing service similar to the now disbanded megaupload.com.
“While waiting for my show to load, I tried opening the same show in a separate tab,” Seth said. “I realized that the rate each video downloaded [at] was pretty much identical.”
Seth said he then opened up multiple tabs and the result was the same. The reason for buffering was to limit the speed at which any one person could use the service to ensure bandwidth was readily available for other users.
“I realized that I could theoretically reach unlimited download speeds by opening multiple tabs of the same video,” Seth said.
The initial problem, Seth said, was each video began loading by default from the beginning, so he didn’t have an easy way of usefully compiling his stolen bandwidth.
“But I knew that if you were to drag the progress bar halfway through, it would skip downloading the first half of the video, making it much quicker and easier to download the second half,” he said. “So I knew there had to be some protocol that the video player would send to the host to request a file from a specific point only.”
It is well known that YouTube passes the requested time through the URL so the user can manually change the video URL to start downloading from a specific time in the video. Unfortunately for Seth, Novamov was a bit sneakier.
“I had to monitor requests to and from the video player to capture and understand the mechanism used to identify a specific time in the video to begin downloading,” Seth said.
After he discovered the algorithm used, Seth was able to spoof the requests — essentially mimic the internal processes of Novamov — by manually sending his own code to their servers.
This gave him the power to give the video specific and multiple starting points, which would enable him to download multiple parts of a video at the same time, significantly cutting the time it takes to buffer a video.
“I knew it made no sense to break the video into equal segments,” he said. “Instead of starting each download at equal intervals, I put a higher concentration at the beginning of the video, which is where you presumably want to begin watching. This gives more time for the backend to download.”
Seth spent weeks devising an algorithm to optimally place different starting points throughout a video to optimize buffering speeds. His workaround functions in a manner similar to BitTorrent, the ubiquitous peer-to-peer protocol that powers torrent downloads.
“By my calculations, let’s say there’s a video you need to wait five minutes to buffer before playing straight through. You can reduce that time now down to 30 seconds, so the net result is 10 times faster,” he said.
One caveat to Seth’s algorithm is that it will not help those who want to continue a show or movie at the halfway point. He shrugged off the problem.
“Someone else can take care of that,” he said.
For Seth’s “hack” to work, he needed a video player that could play files before they finished downloading. VLC media player, a popular and free open-source program, proved just the trick.
Seth said he would release his unnamed project as a downloadable extension for Google’s Chrome web browser. The plugin would function when the user visits a supported video hosting site, and run the necessary logic to download the requested video file, which the user can watch in real-time using VLC.
He has successfully used his hack to watch videos without annoying lags or buffering, but he said he has no plans to commercialize the project.
“It’s more of a proof of concept,” Seth said. “If I were to publicly release it, it would be free and open-source on Github.”
Github is a social network for sharing open-source programming projects and code.
“I would imagine that it’s easy to block, but if it’s only used by a small group of people, this could theoretically work for years,” he said. “But even if the powers that be stop it, it would be pretty sweet to have that sort of impact.”
Tyler Gold is an intern at The Verge. You can follow him on Twitter @tylergold.
Nis Frome is the co-founder of Hublished.com. You can follow him on Twitter @nisfrome.
If you have a tech-related story, tip us! Email Tyler at email@example.com and Nis at firstname.lastname@example.org.