Service: HLS VOD Stitcher - EyevinnOSC/community GitHub Wiki
Getting started
The open source project HLS VOD stitcher provides a proxy that can stitch in another HLS VOD in a HLS VOD on-the-fly. This tutorial walks you through how to setup and use this proxy in Open Source Cloud.
Prerequisites
- If you have not already done so, sign up for an OSC account.
Step 1: Create a stitcher proxy
Click on the button "Create stitcher" in the web user interface.
Give the stitcher a name, in this case we name it guide
Step 2: Generate a payload
To insert an ad in the beginning (pre-roll) generate a payload with the following curl command. Replace eyevinn
with your tenant id:
curl -v -X POST -H "Content-Type: application/json" -d '{
"uri": "https://maitv-vod.lab.eyevinn.technology/VINN.mp4/master.m3u8",
"breaks": [
{ "pos": 0, "duration": 15000, "url": "https://maitv-vod.lab.eyevinn.technology/ads/apotea-15s.mp4/master.m3u8" }
]
}' https://eyevinn-guide.eyevinn-lambda-stitch.auto.prod.osaas.io/stitch/
In response you then get the following JSON object:
{"uri":"/stitch/master.m3u8?payload=eyJ1cmkiOiJodHRwczovL21haXR2LXZvZC5sYWIuZXlldmlubi50ZWNobm9sb2d5L1ZJTk4ubXA0L21hc3Rlci5tM3U4IiwiYnJlYWtzIjpbeyJwb3MiOjAsImR1cmF0aW9uIjoxNTAwMCwidXJsIjoiaHR0cHM6Ly9tYWl0di12b2QubGFiLmV5ZXZpbm4udGVjaG5vbG9neS9hZHMvYXBvdGVhLTE1cy5tcDQvbWFzdGVyLm0zdTgifV19"}
basically what you get is a base64 encoded version of the JSON that you posted above.
Step 3: Provide payload to stitcher
To playback the stitched version enter the provided payload as a query parameter to the stitcher, e.g (where eyevinn
is replaced with your tenant id):
https://eyevinn-guide.eyevinn-lambda-stitch.auto.prod.osaas.io/stitch/master.m3u8?payload=eyJ1cmkiOiJodHRwczovL21haXR2LXZvZC5sYWIuZXlldmlubi50ZWNobm9sb2d5L1ZJTk4ubXA0L21hc3Rlci5tM3U4IiwiYnJlYWtzIjpbeyJwb3MiOjAsImR1cmF0aW9uIjoxNTAwMCwidXJsIjoiaHR0cHM6Ly9tYWl0di12b2QubGFiLmV5ZXZpbm4udGVjaG5vbG9neS9hZHMvYXBvdGVhLTE1cy5tcDQvbWFzdGVyLm0zdTgifV19
Provide the URL to the video player