Twitter is the place to see what’s happening in the world. On the video team, we strive to make watching and sharing videos seamless, fast and enjoyable for people around the world.
We built Vireo to simplify the processing and delivery of video and today we’re happy to announce that we are open-sourcing it. Vireo is a lightweight and versatile video processing library that powers our video transcoding service, deep learning recognition systems and more.
Vireo is written in C++11 and built with functional programming principles. It also optionally comes with Scala wrappers that enable us to build scalable video processing applications within our backend services. It is built on top of best of class open-source libraries (we did not reinvent the wheel), and defines a unified and modular interface for these libraries to communicate easily and efficiently. Performance was a strong focus, as well as memory consumption: only the strictly required objects are kept in memory at all times, and we pick the fastest code, with negligible overhead. Some operations, such as trimming or remuxing, are blazing fast even on mobile!
Thanks to a unified interface, it is easy to write new modules (e.g. supporting a new codec) or swap out existing ones in favor of others (e.g. proprietary or hardware H.264 decoder).
Here’s an example code snippet that transcodes an input video file in H.264 format and saves it as an MP4 file:
Included are a number of command-line tools built with Vireo for common video processing tasks such as inspecting a video and transcoding.
Vireo caters to both high level engineers who want to focus on building products as well as lower level engineers focused on developing video technology. It is released under the MIT license and aims to make it easy for developers to create both commercial and non-commercial (see Legal Disclaimer for details) applications with ease.
We're excited to continue contributing to the open source community and look forward to your feedback and contribution.