harbor run -t LiteCoder/hls-streaming-serverharbor download LiteCoder/hls-streaming-serverBuild an HTTP Live Streaming (HLS) server that transcodes video into multiple bitrates and serves content through Nginx with a Node.js management backend.
/app/input.mp4/app/hls/ directory/app/nginx.conf/app/server.js/app/player.htmlCreate a transcoding script that processes /app/input.mp4 into three quality variants:
Each variant must generate:
.ts files (6-second segments).m3u8 playlist fileGenerate /app/hls/master.m3u8 that references all three quality variants with proper bandwidth and resolution attributes.
Create /app/nginx.conf with:
/app.m3u8 (application/vnd.apple.mpegurl) and .ts (video/mp2t)Access-Control-Allow-Origin: */hls/ serving HLS contentImplement /app/server.js with:
/upload accepting video file uploads (multipart/form-data)/app/uploads/ directory/status/:filename returning transcoding status as JSONCreate /app/player.html with:
http://localhost:8080/hls/master.m3u8The /app/hls/ directory structure:
hls/
├── master.m3u8
├── 360p/
│ ├── playlist.m3u8
│ └── segment*.ts
├── 720p/
│ ├── playlist.m3u8
│ └── segment*.ts
└── 1080p/
├── playlist.m3u8
└── segment*.ts
Master playlist format must include BANDWIDTH and RESOLUTION attributes for each variant.
The system must:
/app/input.mp4 into all three quality levels