Video Transcoder
A personal project — a browser-based video transcoding tool that accepts up to three video uploads and returns a single ZIP file containing each video re-encoded at 360p, 720p, and 1080p resolutions, powered by a server-side FFmpeg pipeline exposed over a REST API.
Tech Stack
Responsibilities
- Built the REST API endpoint to accept up to three video file uploads via multipart form-data using Multer
- Implemented the server-side FFmpeg transcoding pipeline to re-encode each uploaded video at 360p, 720p, and 1080p resolutions
- Engineered the ZIP packaging step to bundle all transcoded variants into a single downloadable archive returned to the client
- Handled temp file lifecycle — writing uploads and transcoded outputs to a temp directory and cleaning up after the ZIP response is sent
- Deployed the service to Render with environment-appropriate FFmpeg binary configuration
Case Study
Most video transcoding tools are either heavyweight desktop software or expensive cloud services with subscriptions. This project was built to answer a simpler need: a fast, no-signup tool that takes a raw video upload and hands back all three common streaming resolutions in one step — ready for upload to any platform or CDN.
The API accepts up to three video files in a single multipart request via Multer, writing them to a temporary directory on the server. For each uploaded file, an FFmpeg subprocess is spawned to produce three output variants — 360p, 720p, and 1080p — encoding all resolutions in a single pass over the source file to avoid redundant disk reads and keep peak memory usage bounded on the shared server environment.
Once all transcoding completes, the nine output files (up to three videos × three resolutions) are packaged into a ZIP archive and streamed back as the HTTP response. Returning a single ZIP rather than individual file links keeps the download flow to one user action and bundles all variants in a predictable, portable structure. After the response is sent, the temp directory for that request is cleaned up to prevent disk accumulation across successive uploads.
The service runs on Render with server-side FFmpeg installed in the build environment. Because Render spins down free-tier instances on inactivity, the first request after a cold start carries a startup delay — a known trade-off for a zero-cost personal deployment. For sustained use, the same stack would run without modification on any always-on Node.js host.
Key Decisions
Server-side FFmpeg over client-side transcoding
Browser-based transcoding via WebAssembly is slow and memory-constrained. Offloading to a server-side FFmpeg process keeps the client lightweight and delivers consistent output quality regardless of the user's device.
ZIP delivery over individual file links
Returning nine files (3 videos × 3 resolutions) as individual download links adds friction. A single ZIP keeps the download flow to one click and bundles all variants together in a predictable structure.
Sequential resolution encoding per video
Encoding all resolutions for a single video in one FFmpeg pass avoids re-reading the source file three times and keeps peak memory usage bounded — important on a shared server environment.