Skip to content

HTTP thumbnails

media.process.thumbnails_http

Sapsan fetches JPEG snapshots from the camera over HTTP.

Configuration

streams:
  - name: cam1
    inputs:
    - rtsp:
        url: rtsp://admin:password@10.0.0.5/stream0
    thumbnails:
    - http:
        url: http://10.0.0.5/snapshot.jpg
        fetch_interval: 10  # capture period, s (default 10)
        timeout: 5          # request timeout, s (default 5)
      dvr: true             # store frames in the archive (default false)

fetch_interval and timeout must be greater than 0. Responses that are not JPEG or exceed the size limit are discarded; the preview is not updated.

See also: Keyframe thumbnails.

Getting screenshots

What URL
Current stream frame http://server/streaming/live-preview-jpeg/<stream>
Frame of a specific track http://server/streaming/track-preview-jpeg/<stream>/<track>
Frame from the archive http://server/streaming/v/<stream>/image/<track>/<utc_ms>.jpg

Screenshots in the archive

With dvr: true frames are written into the archive as a separate JPEG track with real frame dimensions. In the archive's DASH manifest it is exposed as a standard thumbnail tile AdaptationSet (http://dashif.org/guidelines/thumbnail_tile) — players that support timeline thumbnails pick it up automatically.

Next steps