Service: Ad Normalizer - EyevinnOSC/community GitHub Wiki
The open web service Ad Normalizer acts as middleware between an ad server and a client that needs processed assets for stitching or playback. The ad normalizer accepts VAST requests and returns a list containing the relevant creatives that are immediately available to stream. Creatives that have not been processed are sent to SVT Encore for transcoding.
The normalizer also works as an orchestrator for ad asset processing; it handles encore callbacks, and queues them for packaging when the transcoding is done. An encore packager with callbacks configured will then pick up the job and notify the normalizer when the ad is packaged and ready for streaming.
- OSC account.
- A running ad server.
- A media processing pipeline, including transcoding, packaging, and storage.
If you do not have an ad server, you can use the test ad server available in OSC. Click on the "create test-adserver" button and name your instance (f.ex. demo).
Once it is running, the ad server service is available at https://eyevinnlab-demo.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/vast. We call it $AD_SERVER_VAST.
Setup an SVT Encore video file transcoder and a storage bucket.
-
Open your OSC account and navigate to Settings->API->Personal access token. Copy the token to the clipboard. We call it
$OSC_TOKEN
. -
Create a minio storage instance over OSC. Name it as "guide" and set RootUser/RootPassword as "root"/"abc123456" for example. We call the credentials $USER and $PASSWORD. Once it is running, the minio service is available at https://eyevinnlab-guide.minio-minio.auto.prod.osaas.io. We call it $IO_SERVICE.
-
Create a SVT Encore instance and name it as "blog" for example. Once it is running, the instance is accessible from https://eyevinnlab-blog.encore.prod.osaas.io. We call it $ENCORE.
Step 2: Create an ad-normalizer instance
Click on the "Create normalizer" button.

- Name your instance (f.ex. "demo").
- Set EncoreUrl as $ENCORE, e.g.
https://eyevinnlab-demo.encore.prod.osaas.io
- Set AdServerUrl as $AD_SERVER_VAST, e.g.
https://eyevinnlab-demo.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/vast
- Set PackagingQueueName as the name of the redis queue used for packaging jobs, e.g.
package
- Set OutputBucketUrl as the S3 URL, f.ex.
s3://demoassets
. - Set EncoreProfile to
x264-1080p-medium
or other supported profiles. Any profile that your encore instance knows will work here. - Set RedisUrl to $REDIS but with
redis://
protocol, e.g.redis://172.232.131.169:10507
- Set AssetServerUrl to $IO_SERVICE and the bucket name as path, e.g.
https://eyevinnlab-guide.minio-minio.auto.prod.osaas.io/demoassets
- Set OscAccessToken to $OSC_TOKEN.
Once it is up and running, the service can be accessed from https://eyevinnlab-demo.eyevinn-ad-normalizer.auto.prod.osaas.io. We call it $AD_NORMALIZER.
Create an Encore Packager instance
- Name your instance (f.ex. "vod").
- Set RedisUrl to $REDIS but with
redis://
protocol, e.g.redis://172.232.131.169:10507
- Set RedisQueue to the name of the redis queue used for packaging jobs, e.g.
package
- Set OutputFolder as the S3 URL, f.ex.
s3://demoassets/
. Trailing slash here is important. - Set PersonalAccessToken to $OSC_TOKEN.
- Set AwsAccessKeyId/AwsSecretAccessKey to $USER and $PASSWORD.
- Set S3EndpointUrl to $IO_SERVICE, e.g.
https://eyevinnlab-guide.minio-minio.auto.prod.osaas.io
- Set callback URL to $AD_NORMALIZER
Follow the steps from tutorial to create our bucket.
# Install cli tool
% brew install minio/stable/mc
# Create an alias 'guide' for the storage service by passing it your tenant (e.g., eyevinnlab) and credentials
% mc alias set guide https://<tenant>-guide.minio-minio.auto.prod.osaas.io root abc123456
Added `guide` successfully.
# Add a bucket
mc mb guide/demoassets
# Enable public (anonymous) read-only access
mc anonymous set download guide/demoassets
Once your deployment is up and running, you can verify that it works as intended by requesting to $AD_NORMALIZER with the endpoint /api/v1/vast
.
For example
% curl -v -H 'accept: application/json' "https://eyevinnlab-demo.eyevinn-ad-normalizer.auto.prod.osaas.io/api/v1/vast?dur=30"
If the instance is brand new, and your redis instance is unpopulated, you should get the following response:
{ "ASSETS": [] }
Provided that the processing was successful, the ASSETS
array will be populated with asset-description objects compatible with the HLS interstitial standard.
You can also verify that transcoding jobs were created by checking the logs:
To get a VAST XML instead of an asset-list json you provide this content-type in the accept
HTTP header.
% curl -v -H 'accept: application/xml' "https://eyevinnlab-demo.eyevinn-ad-normalizer.auto.prod.osaas.io/api/v1/vast?dur=30"