VOD¶
media.play.vod
Transport¶
HTTP or HTTPS; playlists and fragments use separate requests over TCP.
Supported codecs¶
Depend on the delivery protocol: HLS and DASH. Sapsan packages existing tracks; check decoding compatibility in the target player.
Sapsan stores files as VOD assets, keeps their catalog in central and serves them on demand. Assets need no live source. Manage uploads, storages, templates and jobs in the central console.
Storage and upload¶
Through central, define a named VOD root in the streamer config — a directory on disk:
vod:
roots:
- name: movies
path: /srv/vod
Root names contain lowercase Latin letters, digits, _ and - and must be unique in the config. The process must have read and write access to the directory. Central receives storage availability and free space in streamer reports.
In VOD, open Uploads, select files and an asset key. Central chooses an available storage with free space and issues an upload grant; bytes go directly to the streamer. Storages shows availability and capacity. Upload tokens gives an external application restricted upload access; revocation prevents further use.
Catalog and files¶
- Key: a mutable name such as
movies/2026/film.mp4; its prefixes form the catalog tree. - Asset id: a permanent identifier preserved when the key is renamed.
- Revision: the version of the file composition; changes when files are added or deleted.
- Files: video and other files belonging to an asset, with size, hash and media information.
Asset files¶
Open an asset in Catalog to inspect files and locations. An available asset has a ready placement on an available storage. A file that cannot be parsed as media is available only for RAW download. Rename key changes metadata while preserving files and Asset id links; an occupied key is rejected.
Playback¶
In the file card, Play opens a player; HLS, DASH and RAW copy a link. Use central links for cluster playback:
| Format | Central URL |
|---|---|
| HLS | /playback/vod/<asset-id>/<file>/index.m3u8 |
| DASH | /playback/vod/<asset-id>/<file>/Manifest.mpd |
| File | /playback/vod/<asset-id>/<file> |
Central selects a ready placement and redirects the client to the streamer. The native streamer URL is /streaming/vod/<root>/<asset-id>/<file>/index.m3u8 (use Manifest.mpd for DASH and no suffix for download). Do not substitute the catalog key for Asset id. Protected playback requires a token granting access to this asset; denied access returns 403, a missing asset or file returns 404. With no available locations, central returns 503 with Retry-After.
Copies and balancing¶
Set Copies on other servers in the asset template. A value of 1 means the origin and one copy on another streamer. A template without renditions copies ready files without transcoding. Run a job from the asset card or assign a template during upload.
Central selects online streamers with an available VOD root, a readable file journal, the Copying role enabled and sufficient free space. An asset has at most one placement per streamer. Required free space is the file size plus the vod_min_free_bytes reserve (1 GiB by default); the freest eligible storage wins. With no candidates, the job waits in the queue.
Copying is a separate job on the target streamer: it downloads files itself over the internal address, verifies size and hash and publishes the copy. Copy jobs do not occupy transcoding slots. Disabling the role prevents new jobs; running jobs continue. Files added later reach existing copies with the next job.
The locations table shows the origin and copies with revision and viewer count. Central directs new views to the ready placement with the fewest sessions; a disconnected streamer is excluded after its liveness expires. The Asset id link stays unchanged. Redirects do not transfer an open connection: players must reconnect after a failure.
Deletion¶
- File: removes one file and increments the revision; deleting the last file deletes the asset.
- Asset: removes the asset and its files from the catalog.
- Folder: deletes assets under the selected key prefix.
The catalog changes immediately. If storage is unavailable, physical deletion waits for connectivity to return. Check job and placement status in central; a catalog entry alone does not guarantee a ready copy.