Keyframe thumbnails¶
media.process.thumbnails_keyframe
Sapsan creates JPEG thumbnails from keyframes of the stream’s video track.
Configuration¶
streams:
- name: cam1
inputs:
- rtsp:
url: rtsp://admin:password@10.0.0.5/stream0
thumbnails:
- keyframe:
track: v1 # source video track
width: 320 # default 320 if no size is set, minimum 32
height: 180
every: 3gop # capture every 3rd GOP (default: every GOP)
dvr: true
every must be greater than 0. Frame dimensions must be at least 32.
See also: HTTP 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¶
Archive frame previews¶
- A JPEG frame from the screenshot track:
http://server/streaming/v/<stream>/image/<track>/<utc_ms>.jpg - An MP4 fragment of an archive moment:
http://server/streaming/dvr-preview-mp4/<stream>/<utc_ms>— a short fragment from a keyframe; the server picks the lowest-resolution track for the preview itself.