Last week, Instagram surprised its users by increasing the 15-second limit of its videos to a whopping 60 seconds, a full four times longer than it was before. It had already extended the video viewing time for marketers, but last week was when the feature was introduced to regular users for the first time. It's a pretty big leap, and according to Instagram, it was for one reason: people are watching a lot more video. In fact, the time users spent watching video on the photo-and-video sharing service jumped more than 40 percent in the last six months. But while extending the video limit was something of a no-brainer, the effort to make it happen was actually quite a large one.
For starters, the Instagram team wanted to improve video quality in general, even before the increase in video length. Ramp 15 seconds up to 60 and the problem quickly escalates. "One of the things we realized early on in the process is that the specs we were using for video was a one-size-fits-all kind of thing," said Udeepta Bordoloi, a video engineer for Instagram. This is because when Instagram first launched video -- back in 2013 -- the networks were different, and the devices that people used were different. "They were not as up-to-date as we have today," he said.
Also, back then, the team placed a hard cap on file sizes, which became an issue especially for Android phones. When a video appears in the feed, the Android app actually downloads the whole video file to the phone's local storage, which then passes it to Android's MediaPlayer. Aside from just a strain on bandwidth, it also presented a problem of varying quality levels. "We realized that not all videos are the same," said Bordoloi. "If you have a video of someone talking in front of a whiteboard, those videos don't need such a large file size. On the other hand if you have videos of somebody surfing or there's a lot of movement, those typically have a larger file size." This was complicated even further when the team introduced Hyperlapse, a tool that made it that much easier for users to upload action-fueled -- and space-hogging -- sped up videos.
So in the move from 15 to 60 second clips, Instagram faced a few challenges. "As the video becomes larger, playback would wait even longer for the video to download," wrote Hendri, an Instagram software engineer, in a blog post. "People on slower network connections might need to wait for a very long time before they can play." Further, the video won't play at all if the phone has no diskspace.
The solution, as it turns out, lies within its own parent company. Facebook has been leading the way for video encoding for awhile now and has built up a much more robust and flexible infrastructure. Since Instagram was readying itself for a massive explosion in video growth, it only made sense to combine the two. Indeed, Instagram is now migrating all of its video encoding efforts to Facebook's own system.
With this, it's able to build a streaming video cache so that your phone will never have to wait for a download before the video starts to play. At this very moment, all videos that are longer than 15 seconds are being encoded on Facebook's infrastructure rather than on Instagram's own back-end. "It's more flexible, it can do more things, and it makes the whole process so much faster."
It's not just that either. The team also made a few changes to how it processed video. For one thing, they opted to go for a quality target instead of just a file size hard cap. They also figured how to decrease the file size so that the videos would load faster. "Devices became better and we supported a better video profile," said Bordoloi. "The file size decreased by 15 to 20 percent," he added, but quality thankfully remained the same.
The team also worked hard to improve playback on Android. "We have all the iOS devices [in our labs] to test," said Bordoloi. "But on Android, there's such a variation, it's very difficult to predict. We have to keep in mind the lowest common denominator." This, he said, is why he's proud that Instagram works particularly well in lower end devices. From 320-pixel screens to 1440-pixel behemoths, the team has been able to provide the same quality to different sized displays, he said.
In its 60-second video announcement post, Instagram said: "This is one step of many you'll see this year." With all of this attention and resources heaped on just expanding 15 to 60 seconds, it's clear that the improvements to video aren't over just yet.