Guide: Create video on-demand (VOD) files with Open Source Cloud

Eyevinn Technology
4 min readJul 3, 2024

--

This blog post describes how to get started with creating video on-demand (VOD) files with Open Source Cloud.

Prerequisites

Before we start you need an Open Source Cloud account. If you don’t have one you can create one here. You also need to have at least 4 active services available on your subscription plan (Business or above) to get started. For best performance we recommend the Enterprise plan with some reserved capacity purchased. Contact us at sales@eyevinn.se for more information on this.

The source files needs to be accessible through HTTP for example on an AWS S3 bucket using pre-signed URL for access authentication. In this example the VOD files are distributed via an AWS Cloudfront accelerated S3 bucket.

Install Open Source Cloud CLI

Download and install NodeJS

# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# download and install Node.js (you may need to restart the terminal)
nvm install 20
# verifies the right Node.js version is in the environment
node -v # should print `v20.15.0`
# verifies the right NPM version is in the environment
npm -v # should print `10.7.0`

Download and install the Open Source Cloud command line tool.

# install Open Source Cloud command line tool
npm install -g @osaas/cli

Verify that the command line tool is installed.

% osc --version
0.11.0
% osc help
Usage: osc [options] [command]

Options:
-v, --version Output the current version
--env <environment> Environment to use
-h, --help
...

Setup secrets

Go to the web user interface and in the navigation menu on the left choose Settings. Click on the tab API and copy the Personal access token to the clipboard. Store this token in your terminal’s environment. Replace <personal-access-token> below with your token in the clipboard.

% export OSC_ACCESS_TOKEN=<personal-access-token>

Go back to the web user interface and navigate to the service called Encore Packager. Click on the tab Service Secrets and the button New Secret.

Create a token called osctoken and here you paste the same token that you stored in your terminal. If the token is still in the clipboard you can just paste it in the Secret Value input field.

For access to AWS S3 where the VOD files will be transferred you also need to store the AWS access key id and AWS secret access key as service secrets. Store the AWS Access Key Id in a service secret called awsaccesskeyid and the AWS Secret Access Key in a service secret called awssecretaccesskey .

Start a VOD processing job

Now we are ready to start a VOD processing job. As an example we will use this file available here: https://testcontent.eyevinn.technology/mp4/stswe-tvplus-promo.mp4

In the terminal run and replace <s3-output-bucket> with the name of your bucket where you want to transfer the result. The VOD files will be stored in the subfolder /vod/ in this example.

% osc transcode -b \
https://testcontent.eyevinn.technology/mp4/stswe-tvplus-promo.mp4 \
s3://<s3-output-bucket> \
s3://<s3-output-bucket>/vod/
Streaming packaging delegated to Encore Packager to output to s3://<s3-output-bucket>/vod/

In the background this will create the following Open Source Cloud instances:

You can verify that these are up and running in the web user interface.

You can open the packager log files by clicking on the document icon on the bottom right hand side of the instance card. When the process is completed you will find a log entry similar to this.

In this example the VOD is available at https://testcontent.eyevinn.technology/birme/output/stswe-tvplus-promo/14ef5430-55e2-4f79-a4ea-652ba253d1d3/index.m3u8 and you can open this in an HLS video player. If you want to use the streaming format MPEG-DASH replace index.m3u8 with manifest.mpd

And that’s it! Now you are ready to start processing and creating streamable VOD files for your contact. Join our Slack and the channel #opensourcecloud if you need any help or just want to stay updated with Open Source Cloud.

What is Open Source Cloud

A software as a service based on open source with a unique transparent model where revenue is shared with the open source authors. Open Source Cloud offers media industry companies a quick way to incorporate open source in their solutions and the option to run the same software in-house as the source code is publicly available.

--

--

Eyevinn Technology
Eyevinn Technology

Written by Eyevinn Technology

We are consultants sharing the passion for the technology for a media consumer of the future.

No responses yet