Getting Started

Create a streaming package from an ABR bundle with Shaka Packager running as a job in Eyevinn Open Source Cloud. An open web service to prepare your videos for online distribution (streaming) without having to host your own infrastructure for it.

Prerequisites

Step 1: Create an ABR bundle

Create an ABR bundle by following the SVT Encore tutorial. Once completed this guide, you should now have an ABR bundle in your output bucket with the following files:

% export AWS_ACCESS_KEY_ID=<minio-username>
% export AWS_SECRET_ACCESS_KEY=<minio-password>
% aws s3 --endpoint-url=<minio-endpoint-url> ls s3://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

Step 2: Use Shaka Packager to create a streaming package

We will use this Shaka Packager service to create a streaming package that can be placed on a CDN origin for streaming delivery. Create a job in Open Source Cloud using the CLI. You obtain the <personal-access-token> on Settings/API in the Open Source Cloud web console.

As it is recommended to store the username and password to the Minio storage as service secrets we have stored the username in a secret called accesskeyid and the password in a secret called secretkey. Read section How to work with secrets for more information on how to create a secret for a service.

% export OSC_ACCESS_TOKEN=<personal-access-token>
% npx -y @osaas/cli create eyevinn-shaka-packager-s3 guide \
  -o cmdLineArgs="-s s3://output/tutorial -d s3://output/tutorial/vod/ -i a:audio=tutorial_STEREO.mp4 -i v:324=tutorial_x264_324.mp4 -i v:806=tutorial_x264_806.mp4 -i v:1312=tutorial_x264_1312.mp4 -i v:2069=tutorial_x264_2069.mp4 -i v:3100=tutorial_x264_3100.mp4" \
  -o awsAccessKeyId="{{secrets.accesskeyid}}" \
  -o awsSecretAccessKey="{{secrets.secretkey}}" \
  -o s3EndpointUrl="<minio-endpoint-url>"
Instance created:
{
  name: 'guide',
  status: 'Running',
  cmdLineArgs: '-s s3://output/tutorial -d s3://output/tutorial/vod/ -i a:audio=tutorial_STEREO.mp4 -i v:324=tutorial_x264_324.mp4 -i v:806=tutorial_x264_806.mp4 -i v:1312=tutorial_x264_1312.mp4 -i v:2069=tutorial_x264_2069.mp4 -i v:3100=tutorial_x264_3100.mp4',
  awsAccessKeyId: '{{secrets.accesskeyid}}',
  awsSecretAccessKey: '{{secrets.secretkey}}',
  s3EndpointUrl: 'https://eyevinnlab-birme.minio-minio.auto.prod.osaas.io'
}

The cmdLineArgs provided to the Shaka Packager job in this example are:

  • -s: Source folder URL
  • -d: Destination folder URL
  • -i: Input options on the format: [a|v|t]:<key>=<filename>[:hlsName]

For a complete list of options see the Shaka Packager S3 repository

You can now go to the Shaka Packager service in Eyevinn Open Source Cloud web console to verify the job has been created.

Skärmavbild 2025-06-07 kl  20 26 37

We can also check that the streaming package has been created.

% aws s3 --endpoint-url=<minio-endpoint-url> ls s3://output/tutorial/vod/
                           PRE audio/
                           PRE video-1312/
                           PRE video-2069/
                           PRE video-3100/
                           PRE video-324/
                           PRE video-806/
2025-06-07 20:33:19        711 audio.m3u8
2025-06-07 20:33:20       1234 index.m3u8
2025-06-07 20:33:20       6621 manifest.mpd
2025-06-07 20:33:20        806 video-1312.m3u8
2025-06-07 20:33:20        806 video-2069.m3u8
2025-06-07 20:33:20        806 video-3100.m3u8
2025-06-07 20:33:21        787 video-324.m3u8
2025-06-07 20:33:21        787 video-806.m3u8

Step 3: Play the video

To verify that the streaming package is correct we can provide it to a streaming video player. Before we do that we need to give public access to the folder called VOD on the output bucket. We also need to configure CORS so it can be accessed from a video player served from another origin.

% mc anonymous set download encore/output/tutorial/vod/
Access permission for `encore/output/tutorial/vod/` is set to `download`
% mc admin config set encore/output api cors_allow_origin="*"
Successfully applied new settings.

Now you can provide the URL <minio-endpoint-url>/output/tutorial/vod/index.m3u8 to the video player.

Skärmavbild 2025-06-07 kl  20 50 23

Troubleshooting

  • If you get 403 forbidden when trying to access the streaming package check that you have allowed public access to the folder where you placed the package.

Support

Join our Slack workspace for real-time support and to connect with other users.