Getting Started
Encore Callback Listener is an open source HTTP service that bridges SVT Encore transcoding job callbacks to a Redis queue. When Encore finishes a transcoding job, it sends an HTTP callback to this service. The listener posts the completed job ID and output URL to a configured Redis queue so downstream services (such as a packager) can pick up the work. Available as an open web service in Eyevinn Open Source Cloud, it is a key component in automated encode-and-package pipelines built on SVT Encore. This tutorial walks you through the steps to get started.
Prerequisites
- If you have not already done so, sign up for an Eyevinn OSC account
- A running SVT Encore instance on OSC (encore)
- A running Valkey instance on OSC (valkey) — Valkey is a Redis-compatible key-value store used as the message queue
Step 1: Create a Valkey instance
Navigate to the Valkey service. Click Create valkey and enter a name. Note the connection URL shown on the instance card — it will be in the form redis://<IP>:<PORT>.
Step 2: Create an SVT Encore instance
If you do not already have an Encore instance running, navigate to the SVT Encore service and create one. Note the instance URL.
Step 3: Store connection URLs as secrets
Navigate to the Encore Callback Listener service. Go to the Service Secrets tab and create:
redisurl— the Valkey connection URL (e.g.redis://172.x.x.x:6379)encoreurl— the Encore instance URL (e.g.https://<encore-instance-url>)
Step 4: Create the Encore Callback Listener instance
Go to My encore-callback-listeners and click Create encore-callback-listener. Fill in:
- Name: a name for your instance (alphanumeric and underscores only)
- RedisUrl:
{{secrets.redisurl}} - EncoreUrl:
{{secrets.encoreurl}} - RedisQueue (optional): name of the Redis queue to post completed jobs to (default:
packaging-queue)
Click the instance card when the status is green and running.
Step 5: Configure Encore to send callbacks
In your Encore job submissions, set the callback URL to your Encore Callback Listener instance URL:
curl -X POST https://<encore-url>/encoreJobs \
-H "Content-Type: application/json" \
-d '{
"profile": "program",
"outputFolder": "s3://mybucket/output/",
"baseName": "myjob",
"inputs": [{"uri": "s3://mybucket/input/video.mp4", "copyTs": true}],
"progressCallbackUri": "https://<callback-listener-url>/callbacks"
}'
When Encore completes the job, it calls back to your listener, which posts the job result to the configured Redis queue.
Usage example
A downstream packaging service reads from the Redis queue:
import Redis from 'ioredis';
const redis = new Redis('redis://<IP>:<PORT>');
async function processQueue() {
while (true) {
const [, item] = await redis.blpop('packaging-queue', 0);
const job = JSON.parse(item);
console.log('Packaging job:', job.jobId, job.url);
// trigger your packager here
}
}
processQueue();
CLI usage
osc create eyevinn-encore-callback-listener mycallback \
-o RedisUrl="redis://<IP>:<PORT>" \
-o EncoreUrl="https://<encore-url>" \
-o RedisQueue="packaging-queue"