Video Stream Data Flow

Video Stream Data Flow A data-flow diagram generated by Archify. 01 / Import 02 / Drive + ingest 03 / Storage 04 / Serve API 05 / Player Admin import · POST /video-imports · 01 / Import · ADMIN Admin import POST /video-imports ADMIN Video URL · source site · 01 / Import Video URL source site Import worker · yt-dlp → Drive · 01 / Import · OAuth Import worker yt-dlp → Drive OAuth Google Drive · shared folder · 02 / Drive + ingest Google Drive shared folder Drive sync · scheduler + downloader · 02 / Drive + ingest · cron Drive sync scheduler + downloader cron HLS worker · ffmpeg -c copy · 02 / Drive + ingest · 1 job HLS worker ffmpeg -c copy 1 job Chunk cache · Guava, in-memory · 03 / Storage · LRU Chunk cache Guava, in-memory LRU video-cache/ · {fileId}.full · 03 / Storage · disk video-cache/ {fileId}.full disk PostgreSQL · video_sources · 03 / Storage PostgreSQL video_sources video-cache/hls/ · .m3u8 + .ts · 03 / Storage · disk video-cache/hls/ .m3u8 + .ts disk Range stream · /stream/{fileId} · 04 / Serve API · 206 Range stream /stream/{fileId} 206 Feed API · /video-stream/list · 04 / Serve API Feed API /video-stream/list HLS endpoints · /hls/{fileId}/… · 04 / Serve API HLS endpoints /hls/{fileId}/… VideoPlayer · React <video> · 05 / Player VideoPlayer React <video> import job yt-dlp MP4 upload 8MB chunks MP4 download .full (atomic) video_sources row read .full 6s .ts + .m3u8 hls_status READY chunk 0, 5+ hits cache hit RAF range ≤1MB published rows READY + visible .m3u8 + .ts src + hlsUrl HLS playback 206 video/mp4 Legend primary data policy / PII async batch data store data flow