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
- Direct-to-S3 uploads with pre-signed URLs
- Background transcoding to 360p/720p HLS
- Adaptive streaming player
- Thumbnails, views, likes, comments, subscriptions
- Search and a home feed
What you will learn
- Object storage and CDNs
- Background job queues
- Video processing with FFmpeg
- Scalable architecture
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
- Recommendations from watch history
- Live streaming with RTMP
- Captions with speech-to-text
On your resume
- Built a video platform with pre-signed S3 uploads, a BullMQ/Redis transcoding pipeline (FFmpeg → HLS), CloudFront streaming and Redis-buffered view counts.