SEI Injection Plugin
features = ["sei"]Useful for embedding timestamps, watermarks, and business metadata in-stream.
SEI is inserted as in-band video NALs (H.264 type 6 / H.265 prefix SEI type 39), so every downstream protocol that remuxes full Annex-B carries it unchanged — including HLS / LL-HLS MPEG-TS segments. Players must parse SEI themselves (e.g. via a WebRTC DataChannel or a custom parser).
Inject API
Section titled “Inject API”POST /sei/api/injectContent-Type: application/json{ "stream_path": "live/test", "payload": "hello", "payload_encoding": "utf8", "uuid": "00112233445566778899aabbccddeeff", "once": true, "target_path": "live/test_sei"}| Field | Required | Description |
|---|---|---|
stream_path | yes | Stream path; matches the SEI transform job’s source or target path |
payload | yes | SEI payload content |
payload_encoding | no | utf8 (default) or base64 |
uuid | no | 16-byte UUID (32 hex chars) for user-data-unregistered SEI; random when omitted |
once | no | true (default): insert once on the next eligible frame; false: repeat on every eligible frame until replaced |
target_path | no | When the stream has no SEI transform job yet, create a source → target job publishing to this path |
SEI is inserted on IDR frames by default; set sei.insert_on_every_frame: true
to insert on every frame.
Responses and errors
Section titled “Responses and errors”200: enqueued; returnsjob_id/target_path/pendingcount400: missingstream_path, empty payload, invalid base64/uuid404: no live publisher forstream_path409: stream exists but has no SEI transform job and notarget_pathwas supplied
HLS interplay
Section titled “HLS interplay”The transform job republishes the injected bitstream to target_path; the
HLS/LL-HLS TS remux of that path preserves SEI NALs as-is. Play the injected
stream via the target_path (e.g. /hls/live/test_sei.m3u8).
Current boundaries
Section titled “Current boundaries”- Inject only — no SEI extraction/parsing API.
- No ID3 timed metadata,
EXT-X-DATERANGE, or CMAFemsg; players relying on hls.js ID3 cues cannot consume SEI and need a custom parser.