Facebook optimizes 360-degree videos for VR

The social network doesn't want VR experiences to be a trip to bufferville.

Facebook's preparing for a time when virtual reality headsets are more common, especially since the Oculus Rift will soon be released to the public. In an effort to make VR experiences posted on the website as enjoyable as they can be, the social network has only been streaming whatever part of the video is within your field of vision. Unfortunately, that's still not enough. So, FB's engineers have decided to encode videos using pyramid geometry, which reduces their file sizes by 80 percent.

The technique takes flat frames, turns them spheres and places them inside a pyramid. It puts the highest resolution image at the base of the pyramid, while the sides gradually decrease in quality as you go up. In all, each pyramid contains 30 different views, and Facebook creates five streams in various resolutions for each one. The website then saves all 150 versions of your video on its servers and only streams the ones you're looking at, depending on your internet speed. You can see a sample of an image processed using pyramid geometry above.

When 360-degree videos were first launched, Facebook used cube mapping instead of pyramid for the encoding process. That method reduces file sizes, as well, but only by 25 percent. If you have the tech know-how and would like to apply a custom cube filter to videos on your own, Facebook has released its code on Github.

Finally, the company has replaced its video processing system with Streaming Video Engine (SVE). It splits files into several parts in order to upload and encode them separately all at once, speeding up both the encoding process and the playback by 10 times. Bottom line is, the social network continues to refine its features to entice more people to post and consume videos on the site. Not surprising, considering its putting money in ads, and videos are showing tremendous potential.

[Image credit: USA Today/Facebook]