Service: SVT Encore - EyevinnOSC/community GitHub Wiki
SVT Encore (serviceId encore) is a scalable video transcoding tool built on FFmpeg and Redisson, offering Transcoding-as-a-Service for advanced technical users, for example as part of a VOD (Video On Demand) transcoding pipeline. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance (in older text called a "queue"). License: EUPL-1.2. The OSC version is compiled from Eyevinn/encore and may contain features not yet in the upstream svt/encore. This page also covers SVT Encore GUI.
- Transcode video files read from and written to S3-compatible storage (MinIO on OSC, Akamai, AWS and others), controlled through a REST API.
- Use reusable YAML transcoding profiles; a profile is selected per job.
- Produce multi-rung ladders, stereo and surround audio, thumbnails and thumbnail maps, depending on the profile.
- Report job progress through HTTP callbacks (see Encore Callback Listener).
Prerequisites: an input and an output bucket on S3-compatible storage with access keys and endpoint, for example a MinIO instance on OSC (the S3 access key id and secret are its RootUser and RootPassword). Create buckets such as input and output and upload a source video. Create MinIO first and confirm it is running.
Store the S3 credentials with create-service-secret (serviceId encore), for example objstorekeyid and objstoresecretkey, then create the instance with create-service-instance using serviceId: "encore". The name must be alphanumeric and at most 20 characters.
{
"name": "vod",
"s3AccessKeyId": "{{secrets.objstorekeyid}}",
"s3SecretAccessKey": "{{secrets.objstoresecretkey}}",
"s3Region": "se-sto-1",
"s3Endpoint": "https://<minio-instance-url>"
}Wait with wait-for-service-ready, then use describe-service-instance for the instance URL.
| Option | Required | Type | Meaning |
|---|---|---|---|
| name | Yes | string | Name of the Encore instance. Letters, digits and underscore only, at most 20 characters. |
| profilesUrl | No | string | URL to a YAML file listing the transcoding profiles to choose from. If empty, a default set from encore-test-profiles is used. |
| s3AccessKeyId | No | string, sensitive | S3 access key id. For MinIO on OSC, its RootUser. |
| s3SecretAccessKey | No | string, sensitive | S3 secret access key. For MinIO on OSC, its RootPassword. |
| s3SessionToken | No | string, sensitive | S3 session token, only if your S3 setup requires one. |
| s3Region | No | string | Region of the S3 bucket, for example eu-north-1 or se-sto-1. Encore defaults to us-east-1 if unset (read from AWS_REGION; cross-region access is enabled). |
| s3Endpoint | No | string | Endpoint URL of the S3-compatible storage, for example a MinIO instance URL. Can be associated with a MinIO instance on OSC. |
The three credential options are sensitive: store them as service secrets and reference them as {{secrets.NAME}}, which only works as the entire field value.
Submit jobs with a POST to https://<encore-url>/encoreJobs; the API reference is at eyevinn.github.io/encore-api-docs. Example job body:
{
"externalId": "tutorial",
"profile": "program",
"outputFolder": "s3://output/tutorial/",
"baseName": "tutorial",
"inputs": [
{ "type": "AudioVideo", "copyTs": true, "uri": "s3://input/VINN.mp4" }
]
}Profile program is an example x264 ladder with five rungs, stereo and surround audio, thumbnails and a thumbnail map. Example profiles are in encore-test-profiles. When the job completes, the output bucket contains files such as tutorial_x264_806.mp4, tutorial_STEREO.mp4, tutorial_thumb01.jpg and tutorial_12x20_160x90_thumbnail_map.jpg (list them with the MinIO client, for example mc ls encore/output/tutorial/).
Using the OSC 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 examples: client-ts-examples.
SVT Encore GUI (serviceId eyevinn-encore-ui, license MIT) is a React web interface for Encore to submit jobs, monitor the queue and inspect job results. Create the Encore instance first. See SVT Encore GUI.
| Option | Required | Type | Meaning |
|---|---|---|---|
| name | Yes | string | Name of the instance. Letters, digits and underscore only, at most 20 characters. |
| EncoreUrl | Yes | string | URL of the Encore instance to manage (can be associated with an encore instance on OSC). |
| OscAccessToken | No | string, sensitive | OSC access token, used if the Encore instance is behind OSC authentication. Pass as {{secrets.NAME}}. |