How Facebook made streaming virtual reality video possible
Facebook has a huge focus on video these days, encouraging everyone to upload more video and rewarding them in kind with wider views, engagement and shares.
It’s also focused on making video better, especially in the realm of virtual reality, where file sizes can get big and scary, fast. To optimize 360-degree and VR video, Facebook has changed the layout of its videos from equirectangular to a cube map.
Facebook says it transforms “the top 25 percent of the video to one cube face and the bottom 25 percent to another, dividing the middle 50 percent into the four remaining cube faces, and then later aligning them in two rows.” If that sounded incredibly confusing, you’re not alone.
Video transformed into pyramid layout
Basically, by changing the shape it uses to stores those videos, it was able to drop the file size by 25% and reduce distortion 360-degree videos. The company open-sourced the code so that developers can also build it into their own applications.
Even more interesting, Facebook says the challenges for VR are harder — most video needs to be streamed in 6K at 60 frames-per-second to look acceptable, which is too much for many connections.
To address this, the company developed ‘view-dependent streaming’ which only streams the piece of video you’re actually looking at.
A new encoding format, called pyramid-based encoding, is used to achieve this and can reduce the file size of even VR video by up to 80 percent. Facebook says it makes more than 150 versions of each video when they’re uploaded, at multiple resolutions and encoding to enable this.
You can read more on the technical implementation in Facebook’s post, which is impressive. The amount of engineering effort into getting VR video to work over current connections shows just how much the company is betting the technology will go big.