Getting everything ready for you…

Loading courses, problems and your progress. This takes just a moment.

0s

Projects › Advanced

Video Sharing Platform

Upload videos, transcode them to adaptive HLS in the background, and stream them with views, likes and comments.

Level: Advanced · Time: 3–4 weeks · Tech stack: Next.js, Node.js, AWS S3, FFmpeg, Redis queue

Features to build

What you will learn

Step-by-step guide

1. Upload without your server in the middle

Backend returns a pre-signed S3 PUT URL; the browser uploads straight to S3. Your API never handles gigabytes.

2. Queue the processing

After upload, add a job to a queue (BullMQ + Redis). A separate worker process picks it up — your API stays fast.

3. Transcode to HLS

ffmpeg -i input.mp4 -vf scale=-2:720 -c:v h264 -b:v 2800k -c:a aac -hls_time 6 -hls_playlist_type vod 720p.m3u8

Repeat for 360p, write a master playlist, upload the segments to S3, and set the video status to "ready".

4. Stream

Serve S3 through CloudFront (CDN) and play with hls.js — the player switches quality with the network speed.

5. Views and counters

Count views in Redis (INCR) and flush to the database every minute instead of writing on every view.

6. Feed

Start simple: newest + most viewed this week. Cache the home feed for 60 seconds.

Level it up

On your resume

Learn on Codify