Drop files into video/, run ./run.sh, and get a
streaming package in hls/. A master playlist, one folder per
quality tier, and segments that all cut at the same timestamps.
Hosted video platforms transcode, store, and bill per minute. This tool
does the transcoding. The output is a folder of playlists and segments.
Push it to S3, R2, B2, Spaces, or nginx and serve it like any other static
file.
Ladder
Tiers that line up
Built-in heights run from 240p through 2160p. The default cap is 1080p
and the floor is 360p. A tier taller than the source is skipped, so a
720p file never becomes a blurry 1080p. The keyframe interval is the
frame rate times the segment length, 6 seconds unless you change
HLS_TIME, on every rendition.
Encoders
Hardware when you have it
H.264, HEVC, and AV1. HWACCEL=auto tries NVENC, Intel QSV,
VAAPI, then VideoToolbox, and falls back to software. H.264 with AAC is
packed as MPEG-TS. HEVC, AV1, or Opus uses fMP4, because MPEG-TS cannot
carry them. CODECS in the master playlist is read back from
each rendition.
Publish
A folder you can move
Packages are built in a scratch directory and swapped into
hls/ in one step. Paths inside a package are relative.
Finished renditions are reused if you stop the run. Failures stay in
video/. Successes move to video-done/, along
with any name.lang.vtt subtitle sidecars.
Limits
Own the files, keep the gaps in view
If you need live streaming, DRM, or turnkey analytics, a hosted platform
still fits. This encoder is for a library of finished videos.
Hosted platformThis encoder
Transcoding
Managed
This repository
Storage and delivery
Theirs, metered
Any S3-compatible store or your own server
Cost
Per minute stored and delivered
Storage and bandwidth you already pay for
Per-viewer analytics
Built in
You add it
Captions
Built in
Bring your own .vtt
DRM and a license server
Built in
Not included
Live streaming
Built in
VOD only
Thumbnails
Built in
Not included
Global CDN
Built in
Put one in front of the bucket
Signed cookies, or a short-lived token in front of the bucket, can cover a
whole package path. A viewer who wants the files can still save the
segments. Widevine, PlayReady, and FairPlay need a license server, and
this encoder does not include one.
Run it
Clone the repository and encode a file
ffmpeg, ffprobe, python3, and bash are the whole dependency list. A GPU
is optional.