HLS streaming
Source files are transcoded to adaptive HLS segments and
served as .m3u8, .ts, .m4s or .mp4 — playable in any
modern browser or player.
Floxflix is a self-hosted video streaming API written in Go. Upload source files, let FFmpeg transcode them to HLS in the background, and stream to your own users — with authenticated profiles and zero third-party cloud.
# clone the repo git clone https://github.com/floxflix/flixflox cd flixflox # set the required secret export JWT_SECRET_KEY=$(openssl rand -base64 48) # start API + MongoDB docker compose up --build ✔ API listening on http://localhost:7777
A focused API for hosting your own library. Upload, transcode, authenticate and stream — without a bloated stack.
Source files are transcoded to adaptive HLS segments and
served as .m3u8, .ts, .m4s or .mp4 — playable in any
modern browser or player.
Access and refresh tokens delivered as HTTP-only cookies, with bearer-token support for non-browser clients. Passwords hashed, sessions revocable.
Netflix-style multi-profile support. Each account can create its own viewers, so everyone gets their own space under one login.
Multipart uploads for mp4, mkv,
mov, avi, webm and more. FFmpeg converts every file automatically —
no manual encoding.
Transcoding runs in a worker queue with status, start and cleanup endpoints. Uploads return immediately while jobs process in the background.
A complete openapi.yml and Postman
collection ship with the project. Point Swagger, Redoc or your own client generator at it.
Three moving parts. No media server daemon to babysit, no proprietary format.
POST a video file with its title, year, genre and cast. Movies and TV episodes are organized on disk automatically.
The background queue converts the source into HLS segments and a playlist, then marks the job complete.
Authenticated clients hit the streaming endpoint and play the HLS output — browser, mobile app or TV client.
Everything is JSON, errors have one consistent shape, and
the routes are grouped by concern. Health checks live at /healthz for your orchestrator.
# get a token (cookies also set) curl -X POST http://localhost:7777/v1/api/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "you@example.com", "password": "••••••••" }' # → { "access_token": "...", "refresh_token": "..." }
# upload a movie, kick off conversion curl -X POST http://localhost:7777/v1/api/videos/upload \ -H "Authorization: Bearer $TOKEN" \ -F "file=@movie.mkv" \ -F "type=movie" \ -F 'values={"title":"Arrival","release_year":2016}' # 202 Accepted → queued for FFmpeg
# inspect the conversion queue curl http://localhost:7777/v1/api/videos/queue/info \ -H "Authorization: Bearer $TOKEN" # start the worker / clean finished jobs curl -X POST http://localhost:7777/v1/api/videos/queue/start \ -H "Authorization: Bearer $TOKEN"
One docker compose up gives you
the API and a MongoDB instance. Bring your own TLS, storage and clients — keep full control of your media.