Service: Scene Detect Media Function - EyevinnOSC/community GitHub Wiki

Scene Detect Media Function

Scene Detect Media Function (serviceId eyevinn-function-scenes) is an open source serverless media function that detects scene changes in a video file or stream and extracts keyframe thumbnails at each scene boundary. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance with a REST API. Source: Eyevinn/function-scenes.

What it can do

  • Detect scene transitions in a video file from a URL.
  • Extract a keyframe thumbnail at each scene boundary.
  • Process asynchronously: you submit a job, poll its status and then fetch the thumbnails.
  • Typical uses: preview images, chapter navigation, feeding scene metadata into content workflows.

Creating an instance

No dependencies and no configuration beyond a name. Call create-service-instance with serviceId: "eyevinn-function-scenes":

{ "name": "myscenedetect" }

Wait for the instance to be running (wait-for-service-ready) and use describe-service-instance to get the URL.

CLI equivalent:

osc create eyevinn-function-scenes myscenedetect

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

Submit a video by POSTing its URL to /api/v1:

curl -X POST https://<instance-url>/api/v1 \
  -H "Content-Type: application/json" \
  -d '{"medialocator": "https://example.com/myvideo.mp4"}'

The response contains a jobId:

{ "jobId": "abc123" }

Poll the status until the job is complete (the state is running or completed):

curl https://<instance-url>/api/v1/abc123/status

Then fetch the thumbnails, a JSON array of temporary image URLs, one per detected scene boundary:

curl https://<instance-url>/api/v1/abc123/thumbnails
[
  "https://<instance-url>/thumbnails/abc123/0.jpg",
  "https://<instance-url>/thumbnails/abc123/1.jpg",
  "https://<instance-url>/thumbnails/abc123/2.jpg"
]

Limitations

  • The thumbnail links are temporary and the service does not persist the images. Download them promptly.

Resources