Self-hosted video, without the per-minute bill.
API Media is a single process that watches a directory, transcodes what appears there and publishes an HLS playlist. That is the whole feature set. It runs on the same box that serves the playback.
Resumable multipart uploads and pull-from-URL. Probes the source, rejects what it cannot decode, keeps the original untouched.
ffmpeg under the hood, ladder defined per profile. Hardware encode used when the host exposes it, software otherwise.
HLS with byte-range segments, cache headers tuned for a plain reverse proxy or a CDN in front.
Quick start
curl -sSL https://chek.skunkeu.win/get | sh
api media init --data /var/lib/api media
api media serve --listen 127.0.0.1:8080
Put your own TLS terminator in front. API Media deliberately does not speak TLS.
Push one file through it
# create an asset
curl -X POST https://chek.skunkeu.win/v1/assets \
-H 'Authorization: Bearer $TOKEN' \
-d '{"profile":"web-1080p","title":"clip.mp4"}'
# upload the source
curl -X PUT https://chek.skunkeu.win/v1/assets/as_81a4370d/source \
-H 'Authorization: Bearer $TOKEN' \
--data-binary @clip.mp4
# poll until ready, then play
curl https://chek.skunkeu.win/v1/assets/as_81a4370d
# -> {"state":"ready","playback":"/p/as_81a4370d/master.m3u8"}
Why it exists
This started as a shell script with a cron entry. It grew a state machine and an HTTP API because resuming a failed batch by hand got old.
It is not a CDN, not a DRM stack and not a media asset manager. If you need signed multi-region playback with per-viewer entitlements, this is the wrong tool. If you need to turn a directory of camera files into something a browser can play, it does that and stops there.
Status
Used in production for exactly one thing: the archive this domain was set up for. The API is stable within a minor version; the on-disk layout is not yet. Read the API reference before wiring anything permanent to it, and the changelog before upgrading.