Service: SVT Encore - EyevinnOSC/community GitHub Wiki

Getting Started

SVT Encore is a scalable video transcoding tool, built on Open Source giants like FFmpeg and Redisson.

Encore was created to scale, and abstract the transcoding power of FFmpeg, and to offer a simple solution for Transcoding - Transcoding-as-a-Service.

Encore is aimed at the advanced technical user that needs a scalable video transcoding tool - for example, as a part of their VOD (Video On Demand) transcoding pipeline.

The version of SVT Encore run in Eyevinn OSC is compiled from sources available at https://github.com/Eyevinn/encore. This version may contain features that have not yet been incorporated in the upstream repository at https://github.com/svt/encore.

This tutorial walks you through how to get started with transcoding using SVT Encore in Eyevinn Open Source Cloud.

Prerequisites

  • If you have not already done so, sign up for an OSC account.
  • A MinIO server instance in Eyevinn Open Source Cloud or an account at a storage cloud provider (Akamai, AWS, etc)

Step 1: Create storage buckets

Create an input and output storage bucket at your storage provider by following their instructions on how to create a bucket.

In this tutorial we have created the two buckets input and output in a MinIO storage instance in Eyevinn Open Source Cloud. We have uploaded an example video to the input bucket using the MinIO client.

% mc alias set encore https://eyevinnlab-encore.minio-minio.auto.prod.osaas.io *** ***
% mc put VINN.mp4 encore/input/
...loads/VINN.mp4: 29.40 MiB / 29.40 MiB  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓  10.79 MiB/s 2s

Step 2: Obtain access keys

Obtain the access keys and endpoint URLs from the cloud storage provider:

Step 3: Create an SVT Encore queue

Navigate to SVT Encore service in Eyevinn Open Source Cloud web console. Press button "Create queue".

Skärmavbild 2025-01-28 kl  11 59 12



Field Name Description Example Value
Name Name for the SVT Encore instance vod
Profiles URL URL pointing to the list of transcoding profiles
S3 Access Key Id Your S3 storage access key ID. In this example, the RootUser you set when creating your MinIO instance {{secrets.objstorekeyid}}
S3 Secret Access Key Your S3 storage secret access key. In this example, the RootPassword you set when creating your MinIO instance {{secrets.objstoresecretkey}}
S3 Session Token If your S3 set up requires a session token, enter it here {{secrets.token}}
S3 Region Region of the S3 bucket se-sto-1
S3 Endpoint Endpoint URL of the S3-compatible object storage https://eyevinn-demo.minio-minio.auto.prod.osaas.io

Step 4: Submit a job

Click on the three dots next to the instance card and menu item "Open API Docs".

Skärmavbild 2025-01-28 kl  12 02 13

Create a job by posting the following JSON.

{
  "externalId": "tutorial",
  "profile": "program",
  "outputFolder": "s3://output/tutorial/",
  "baseName": "tutorial",
  "inputs": [
    {
      "type": "AudioVideo",
      "copyTs": true,
      "uri": "s3://input/VINN.mp4"
    }
  ]
}
Skärmavbild 2025-01-28 kl  12 05 28

Profile program is an example x264 ladder with five rungs, stereo and surround audio, thumbnails and thumbnail map. A set of example profiles you can directly use is available in a GitHub repository.

Step 5: Verify result

When the job is completed you should now have the resulting files in the output bucket.

% mc ls encore/output/tutorial/
[2025-01-28 12:12:26 CET] 519KiB STANDARD tutorial_12x20_160x90_thumbnail_map.jpg
[2025-01-28 12:12:28 CET] 1.7MiB STANDARD tutorial_STEREO.mp4
[2025-01-28 12:12:26 CET]  70KiB STANDARD tutorial_thumb01.jpg
[2025-01-28 12:12:26 CET]  45KiB STANDARD tutorial_thumb02.jpg
[2025-01-28 12:12:27 CET]  47KiB STANDARD tutorial_thumb03.jpg
[2025-01-28 12:12:28 CET]  18MiB STANDARD tutorial_x264_1312.mp4
[2025-01-28 12:12:27 CET]  28MiB STANDARD tutorial_x264_2069.mp4
[2025-01-28 12:12:27 CET]  41MiB STANDARD tutorial_x264_3100.mp4
[2025-01-28 12:12:27 CET] 5.4MiB STANDARD tutorial_x264_324.mp4
[2025-01-28 12:12:26 CET]  12MiB STANDARD tutorial_x264_806.mp4

Code Example

The following code example show we can implement a function that transcodes a file using SVT Encore using the Eyevinn Open Source Cloud Javascript SDK.

import { Context } from '@osaas/client-core';
import { transcode } from '@osaas/client-transcode';

async function main() {
  const ctx = new Context();

  try {
    const job = await transcode(ctx, {
      encoreInstanceName: 'tutorial',
      profile: 'program',
      externalId: 'tutorial',
      outputUrl: new URL('s3://output/tutorial/'),
      inputUrl: new URL('s3://input/VINN.mp4')
    });
    console.log(job);
  } catch (err) {
    console.error(err);
  }
}

More Eyevinn OSC code examples available on GitHub.

Using Custom Profiles

You can provide a URL to a YAML file containing a list of available profiles to choose from. Provide this URL when you create the SVT Encore queue / instance. If this field is left blank it will use a default set of profiles available on GitHub https://raw.githubusercontent.com/Eyevinn/encore-test-profiles/main/profiles.yml.

Skärmavbild 2025-01-29 kl  08 25 48

Additional Documentation

  • To learn how to set up and manage VOD (Video on Demand) transcoding workflows using the Open Source Cloud platform, check out: Solution VOD Transcoding
  • To set up scalable object storage using MinIO on Open Source Cloud, see: Getting started with MinIO
⚠️ **GitHub.com Fallback** ⚠️