Service: HLS Preview Generator - EyevinnOSC/community GitHub Wiki

HLS Preview Generator

HLS Preview Generator (serviceId eyevinn-preview-hls-service) is a stateless REST API service that generates a preview video (mp4) or an image (png) from an HLS stream. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance. License: MIT.

What it can do

  • Generate preview images or preview videos from an HLS manifest URL.
  • Provide still images for video seekbar previews, content thumbnails and editorial review workflows.
  • Run without any video processing infrastructure of your own; the service fetches the stream and renders on demand.

Creating an instance

Find the id with list-available-services, then call create-service-instance with serviceId: "eyevinn-preview-hls-service". The instance name must be alphanumeric and at most 20 characters. The service has no dependencies on other OSC services.

{ "name": "mypreviews" }

Verify with wait-for-service-ready or get-instance-status, and read the instance URL with describe-service-instance.

Options

Option Required Type Meaning
name Yes string Name of the instance. Alphanumeric, at most 20 characters.

The service has no other options.

Using the instance

You need an HLS stream URL that is reachable from the internet (public or served from an OSC-hosted streaming service). Send a request with the HLS manifest URL as a query parameter:

curl "https://<instance-url>/preview?url=https://example.com/stream/index.m3u8"

The service fetches the stream, captures frames at regular intervals and returns the preview images or a manifest pointing to them. See the repository for the API reference.

CLI:

osc create eyevinn-preview-hls-service mypreviews

Resources