This project sets up a web server using Bun and Hono that allows users to upload single or multiple video files, which are then processed and converted into HLS (HTTP Live Streaming) format. The server supports CORS and serves static files from a specified uploads directory.
- Hndle routes using
Hono
. - Basic CORS support for cross-origin requests.
- Serve static files from a specified uploads directory.
- Upload single or multiple video files in various formats using
Bun
. - Convert uploaded videos to HLS format using
ffmpeg
. - Error handling for file uploads and conversions.
- Bun - A JavaScript runtime like Node.js.
- Hono - A lightweight web framework for Bun.
- ffmpeg - A command-line tool for video and audio processing.
-
Clone the repository:
git clone https://github.com/rockerrishabh/bun-hls-video-processor.git cd bun-hls-video-processor
-
To install dependencies:
bun install
-
To run:
bun run index.ts
This project was created using bun init
in bun v1.1.33. Bun is a fast all-in-one JavaScript runtime.