If you’re building a large-scale in-house VOD encoder, your job just got easier as SVT open-sources Encore, their VOD encoder.
One of the most fundamental decisions all streaming publishers must make is whether to purchase a commercial encoder, use a commercial cloud encoder, or build their own, the classic make vs. buy. One of the most startling findings from the 2020 Bitmovin 2020 Video Developer Report, at least for me, was that 41% of respondents opted for the former.
Figure 1. Commercial vs. Open-Source Encoder.
I considered the make vs. buy issue in a lesson in my course Streaming Media 101 and reached the conclusion that there are two classes of publishers that should consider open source. Specifically:
- Those whose needs are so simple that they can easily build an encoding and packaging workflow with tools like FFmpeg and Bento4, Shaka Packager, or MP4Box. Say, a relatively small company publishing a few videos a week without DRM, captions, or advertising insertion.
- Those whose ability to efficiently process video is fundamental to their core business and provides a competitive advantage. Think Netflix, YouTube, and a host of similar businesses.
In my view, most other companies were better off seeking a commercial solution, whether cloud or on-premise.
Contents
Meet SVT Encore – The Open-Source Encoder
Well, if you’re in the second category, your job just got easier, as Sveriges Television (SVT), the Swedish public service television company, recently built and then open-sourced their own VOD transcoding solution, called SVT Encore, based upon FFmpeg and other open-source tools. According to the blog on Medium,
“Encore has the ability to import virtually any media file, regardless of inherent stream layout, and transcode it into almost any format we want. Encore is also able to analyse the streams of a given media file and adaptively apply filter operations, such as deinterlacing, graphics, captions / subtitles, conversions of pixel formats and scaling, as needed. Similarly Encore has been designed to handle a wide array of audio stream setups, and cleverly rearrange or down-mix the various variations into formats better suited for our VoD streaming. While some of these features already exist inherently within FFmpeg, we are also able to add our own filters and analysing without much hassle.”
It’s clear that at least part of the motivation for building their own tool was to enable features that may not have been available on commercial tools. As the article explains, “the ability to write our own subtitle filter that is able to decode, render and encode subtitles…allows us to make proper use of our custom captions format…This would be very hard to achieve with a commercial transcoding solution for many reasons, the most obvious one being the fact that no other company would have any idea of how our custom subtitle format works.”
Here’s an overview of the workflow from the Medium article.
Figure 2. The SVT Encore workflow overview.
As installed at SVT, Encore runs in stateless Docker containers on the broadcaster’s in-house cloud which is based on commercially available servers primarily configured with the Intel Xeon 6154 CPU. Here’s a link to Encore at GitHub.
Before you download Encore and start coding, there are some facts and alternatives that you should consider.
Cloud Encoding Market Realities
First, SVT started building Encore in 2018. Since then, pricing in the cloud-encoding market has dropped considerably, with different pricing models that are much more affordable than per-minute or per-GB pricing. For example, Hybrik charges a flat fee depending upon the number of machines in your encoding farm, while encoding.com’s Reserved Cloud instances let you encode 24/7 on a cloud machine for a monthly price.
Second, cloud deployment options have also expanded, with both Bitmovin and encoding.com allowing you to deploy their encoding software on your own private cloud, which dramatically decreases processing costs. Third, many cloud vendors are starting to focus on supporting custom workflows in addition to pure encoding and packaging. This includes Telestream whose Vantage Cloud Port enables Vantage workflows previously available only on-premise in the cloud for redundancy and burst capacity. So cloud encoding has changed considerably in pricing, availability, and feature set since SVT made its implementation decision.
The bottom line is that any decision to open source is part financial and part philosophical. As the SVT blog states, “a public organisation working for the public’s best, have an obligation to strive for transparency in their work and efforts. It is an important democratic issue, and it is a trust issue. From the technical level, Open Source is a way to provide this.”
The philosophical component is very real, whether you’re a public organization or private. Still, it’s important to run the numbers and consider both investments in up-front engineering time and continuing maintenance, as well as time-to-market. It took SVT about one year to create Encore (though SVT waited an additional 2 years to open source – see note below); while using SVT Encore as a starting point will reduce your implementation time, it still will likely be longer than it would take to deploy a commercial encoder, whether in-house or cloud SaaS.
Building it Yourself
What about companies at the other end of the spectrum, with simple encoding requirements? A great place to start is the article, An FFmpeg Script to Render and Package a Complete HLS Presentation, which teaches pretty much what the title describes. A step beyond this is Bash Scripting with Wildcards for FFmpeg on Ubuntu and Mac, which teaches you how to create and run bash scripts that use wildcards on Ubuntu and the Mac.
Or, to add watch folder functionality, you can check out How to Automate FFmpeg and Bento4 With Bash Scripts, which teaches you how to write Bash scripts that run on Ubuntu and encode and package multiple files to HLS/DASH output using open-source tools FFmpeg and Bento4. This article also covers how to run the scripts directly on folders of content and to set up a watch folder operation.
If you’re new to FFmpeg, check out my book, Learn to Produce Video with FFmpeg in 30 Minutes or Less: 2018 Edition, or my online course, Produce Videos with FFmpeg: The Beginner’s Course.
Hi Jan,
Good writeup! I would just like to add one small, but important, clarification to your text. You wrote that:
” It took SVT about three years to create Encore; while using SVT Encore as a starting point will reduce your implementation time… ”
This could very well leave the impression that we developed Encore for three years and then started using it, in reality we put Encore in production within the first year and we have kept on developing it since then. It did however take us three years to release it as Open Source.
All the best
// Olof