Open Source · Self-Hosted · MIT

Media Infrastructure
You Own

Video streaming, image optimization, and CDN delivery. Upload, transcode, transform, stream, and analyze — from your own servers.

$npm install@mediakit-dev/react
// 1. Get presigned URL
const { data } = await fetch('/api/mediakit/uploads/presign', {
  method: 'POST',
  headers: { 'X-API-Key': 'mk_live_...' },
  body: JSON.stringify({
    filename: 'demo.mp4',
    content_type: 'video/mp4',
    file_size: 52428800,
    asset_type: 'video',
    title: 'Product Demo'
  })
}).then(r => r.json());

// 2. Upload directly to R2/S3 (bypasses your server)
await fetch(data.upload_url, {
  method: 'PUT',
  body: videoFile,
  headers: { 'Content-Type': 'video/mp4' }
});

// 3. Confirm → auto-transcodes to HLS
await fetch('/api/mediakit/uploads/complete', {
  method: 'POST',
  headers: { 'X-API-Key': 'mk_live_...' },
  body: JSON.stringify({ asset_id: data.asset_id })
});
javascript

20+

API Endpoints

6

React Components

4

Quality Tiers

Storage (R2/S3)

How it works

01

Upload

Client gets a presigned URL, uploads directly to R2/S3. Zero load on your API.

02

Transcode

FFmpeg creates HLS renditions (360p–1080p), sprites, thumbnails. Background job with progress.

03

Deliver

CDN-cached HLS streaming. Image transforms on-the-fly. Signed URLs for premium content.

04

Analyze

Play events flow to Redis, batch to Postgres. AI generates summaries and chapters.

MediaKit vs. the alternatives

FeatureMediaKitMuxCloudinary
HLS Streaming
Image Transforms
Self-Hostable
Open Source
React SDK
AI ModerationPaidPaid
Sprite PreviewsPaid
Your Data
Zero Egress Fees
One-time Deploy

Own your media infrastructure

Deploy on your server. Connect your R2/S3 storage. Keep your data. Pay nothing per view.