Create ABR bundle with Open Source Cloud
We have described in a blog post how to create a VOD streaming file using SVT Encore and Shaka Packager in Open Source Cloud. For use cases where the packaging step is done by another software component you may be interested in only the transcoding part of the pipeline. In this blog post we will describe how you can setup such pipeline in Open Source Cloud and run a file through it.
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. See pricing details here.
The transcoded files (ABR bundle) will be placed on an AWS S3 bucket in this example.
Verify that you have version 0.12.0 or higher of the OSC command line tool installed.
% osc --version
0.12.0Setup processing pipeline
First thing we will do is to setup this video transcoding pipeline in your Open Source Cloud tenant.
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>Encore Transfer
Go back to the web user interface and navigate to the service called Encore Transfer. Click on the tab Service Secrets and the button New Secret.
Create a secret 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.
Retransfer
Navigate to the service called Retransfer in the web user interface. Click on the tab Service Secrets and create two secrets for the AWS credentials and access to the S3 bucket where to place the transcoded files.
awsaccesskeyid=<aws-access-key-id>awssecretaccesskey=<aws-secret-access-key>
Create pipeline
Use the command line tool to create a pipeline. Replace <s3-output-bucket>with the name of your S3 bucket where you want to transfer the result. The VOD files will be stored in the subfolder /abr/ in this example.
% osc encore create blog s3://<s3-output-bucket>/abr/When the pipeline is created you should have the following running. You can verify in the web user interface.
- Valkey store called transfer.
- Encore instance called blog.
- Encore callback listener called blog.
- Encore transfer called blog.
Create a transcode job
To process a media file, for example https://testcontent.eyevinn.technology/mp4/stswe-tvplus-promo.mp4, you start the process with the following command.
% osc encore transcode blog \
https://testcontent.eyevinn.technology/mp4/stswe-tvplus-promo.mp4The result will end up at s3://<s3-output-bucket>/abr/ which you specified when the pipeline was created. You don't have to wait for this process to be completed before you start the process for a new file.
Remove pipeline
When you are done with the transcoding you can remove the pipeline with this command.
% osc encore teardown blogWhat 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.
Documentation References
- VOD transcoding in Open Source Cloud
- API and CLI documentation: https://api.osaas.io
- Javascript Client Library reference documentation: https://js.docs.osaas.io/
