@blindcast/uploader encrypts HLS video segments in the browser and uploads them to S3 via presigned URLs. One function call — no crypto primitives, no transport configuration.
What it does
The uploader handles the entire upload pipeline:- Fetches the content encryption key from your key server
- Encrypts each segment with AES-128-CBC
- Gets presigned upload URLs from your server
- Uploads encrypted bytes directly to S3
- Rewrites the manifest with
EXT-X-KEYtags - Uploads the rewritten manifest
What it does NOT do
The uploader encrypts and uploads pre-segmented HLS content (.ts files + .m3u8 manifest). It does not convert raw video files to HLS. If your users upload raw video (e.g., .mp4), you need a transcoding step first.
Options for HLS segmentation:
- Server-side: Transcode with FFmpeg, AWS MediaConvert, Mux, or Cloudflare Stream, then pass segments to the uploader
- FFmpeg one-liner:
ffmpeg -i input.mp4 -codec: copy -hls_time 6 -hls_list_size 0 -f hls segments/manifest.m3u8
Install
Quick example
Prerequisites
To use the uploader, you need:- A key server running — the uploader fetches the content key from it. See Key Server docs.
- A presign endpoint — the uploader gets presigned S3 URLs from your server. The Docker key server bundles one, or you can build your own.
- HLS segments — pre-segmented
.tsfiles and a.m3u8manifest.
Next steps
- Basic Usage — full example with playback verification
- Progress & Abort — track progress and cancel uploads
- API Reference — full types and error codes