The Media Pipeline

AppKask’s media pipeline processes every upload through a type-specific processing chain — all behind a single unified upload endpoint.

Video Processing

When you upload a video with HLS transcoding enabled, it goes through an 8-stage pipeline:

  1. Validation — File type, size, codec compatibility
  2. Metadata — FFprobe extracts resolution, duration, codec info
  3. Transcoding — FFmpeg creates multi-quality HLS variants (1080p, 720p, 480p, 360p)
  4. Thumbnail — First frame extracted and converted to WebP
  5. Poster — High-res poster image for video players
  6. Database — Media item registered with metadata
  7. Cleanup — Temporary files removed
  8. Completion — Progress tracker updated, WebSocket notified

Quality selection is automatic: if your source is 720p, AppKask only creates 720p, 480p, and 360p variants. No upscaling.

Image Processing

Images are auto-converted to WebP format (~30% smaller than JPEG). Originals can be preserved on request. SVGs are stored as-is with Content Security Policy headers to prevent embedded script attacks.

Document Processing

PDFs get first-page thumbnails via Ghostscript. Markdown files are editable in-browser with live preview. BPMN diagrams open in an interactive modeler.

Real-Time Progress

During transcoding, the frontend connects via WebSocket to /api/media/{slug}/progress/ws. The backend reports stage, percentage, ETA, and current quality level every 500ms.

Published