Despite its vast archives of video, YouTube has been dogged by an Achilles heel: those spinning wheels that tell you to wait while the video of Justin Bieber or the cute kittens loads ever so slowly. Frustration with the slow downloads extended beyond viewers to include YouTube’s employees, particularly Andy Berkheimer, the company’s engineering manager.
Early last year, in the Kendall Square office of YouTube’s corporate owner, Google Inc., Berkheimer faced a seemingly impossible question: “How do you get rid of that spinning wheel?”
That led to a quest to build a better YouTube player that would load high-quality videos faster and adapt better to the myriad devices — from laptops on broadband to old desktop computers using dial-up— that some 800 million viewers a month use to access the service.
After hundreds of hours of scribbling algorithms on whiteboards, burning through boxes of markers, and marathon coding sessions with engineers in Cambridge and at YouTube’s headquarters in San Bruno, Calif., Berkheimer and his team, with a few keystrokes, debuted the new player in late April.
“That day was a big day,” said Berkheimer, a 32-year-old Massachusetts Institute of Technology graduate who recently relocated to California.
Berkheimer’s new player reduced buffering, or the time it takes to download videos, by an average of 20 percent, and effectively sped up the launching of a video by a few seconds. That might not seem like a huge deal. But when spread across YouTube’s massive digital library, that translates into millions of additional hours of videos being served up.
The technology upgrade probably went unnoticed by the vast majority of YouTube users, who watch about 4 billion hours of video every month. But inside YouTube it was the biggest technology overhaul in the company’s seven-year history.
Building an adaptable video player that can handle the demands of today’s Internet is a huge engineering undertaking, said Mark Claypool, the director of Worcester Polytechnic Institute’s Interactive Media and Game Design department. The under-the-hood mechanics are complex, and a key component is having adaptive technology that can adjust the video launch based on the viewers’ connection speeds and their specific devices.
“Video is elastic. You can scale it,” said Claypool, meaning that the same video can be played in high definition on one device and in much lower quality on another. “The trick is to get the best fit.”
The volume of video on the Web has exploded over the past few years. Do-it-yourself filmmakers and Hollywood studios alike are uploading their creations to services like YouTube, Hulu, and Vimeo.
And online audiences have become impatient.
“You better have your stream start in two seconds or you are going to have this problem of people starting to abandon your video,” said Ramesh Sitaraman, a computer science professor at the University of Massachusetts Amherst and a research fellow at Akamai Technologies Inc., which helps customers such as Fox Broadcasting Co. and Major League Baseball deliver video faster over the Web.
This month, Sitaraman completed a study that examined 23 million online streams to determine the point at which viewers abandon slow-loading videos. He found that viewers start closing out if there’s even a two-second delay. Every one-second delay after that results in a 5.8 percent increase in the number of people who give up. A 40-second wait costs a video nearly a third of its audience.
That’s a big concern for online video providers, said Sitaraman, who will present the findings of his study at an Association for Computing Machinery conference in Boston in November.
“Video performance is so important because it’s fundamental to monetizing your video business,” he said.
YouTube makes most of its money from the advertisements that companies place on its site. Google, which bought YouTube for $1.65 billion in 2006, does not report revenues for its divisions, but earlier this year, Citigroup Inc. analyst Mark Mahaney said he expected YouTube to top $3.6 billion in gross revenue in 2012.
Sitaraman points out that better video quality translates into more advertising dollars because fewer viewers will flee the site.
“If someone watches 5 percent less, that’s 5 percent less opportunity to play ads,” he said. “At the end of the day, most people who have video content want to reduce viewer abandonment, increase viewer engagement, increase loyalty, and get people coming back.”
YouTube’s massive growth has been driven in a large part by overseas audiences. In July, about 500 million viewers outside the United States logged onto YouTube, compared with 150 million stateside during the same period, according to the Web analytics company comScore Inc.
That foreign viewership was another major driver behind Berkheimer’s new video player.
“One of the things we’ve been focused on is providing a better experience for people overseas that don’t have broadband connections,” he said.
Some of Berkheimer’s innovations have been applied to YouTube’s mobile player for smartphone users. Overall mobile traffic for YouTube tripled in 2011. In South Korea, for instance, more than 50 percent of YouTube traffic comes from mobile devices.
The debut of Berkheimer’s player wasn’t without glitches. After the rollout, engineers examined the service quality country by country and found that, in some cases, they had made the service slower, not faster.
Spinning wheels are far from dead on YouTube. Action videos tend to have the most problems. But Berkheimer, an avid skier who tested his new player by watching hundreds of hours of extreme-skiing videos, sees a lot fewer of those rotating orbs smack in the middle of the high-flying flips.Michael B. Farrell can be reached at firstname.lastname@example.org.