A sophisticated real-time video streaming application built with WebRTC, MediaSoup, and HLS transcoding.
- Real-time Video Streaming: Stream your camera/microphone using WebRTC
- Multi-user Support: Multiple users can connect and see each other's streams
- HLS Transcoding: Automatic conversion of WebRTC streams to HLS format
- Modern UI: Clean, responsive interface built with Next.js and Tailwind CSS
- Cross-platform Compatibility: Works on desktop and mobile browsers
- Frontend: Next.js 15 with React 19, TypeScript, and Tailwind CSS
- Backend: Node.js with Express, Socket.IO, and MediaSoup
- Real-time Communication: WebRTC via MediaSoup
- Video Processing: FFmpeg for HLS (HTTP Live Streaming) transcoding
Fermion-assignment/
βββ apps/
β βββ client/ # Next.js frontend application
β β βββ src/app/
β β β βββ page.tsx # Main landing page
β β β βββ stream/page.tsx # Video streaming interface
β β β βββ watch/page.tsx # HLS stream watching interface
β β βββ package.json
β βββ server/ # Node.js backend application
β βββ src/
β β βββ index.ts # Main server entry point
β β βββ mediasoupServer.ts # MediaSoup WebRTC logic
β β βββ ffmpeg.ts # FFmpeg HLS transcoding
β βββ package.json
- Node.js 18+
- FFmpeg (for HLS transcoding)
- Modern browser with WebRTC support
# Install backend dependencies
cd apps/server
npm install
# Install frontend dependencies
cd ../client
npm install
# Start the backend server (in one terminal)
cd apps/server
npm run start
# Start the frontend (in another terminal)
cd apps/client
npm run dev
- Frontend: http://localhost:3000
- Backend: http://localhost:4000
- Open http://localhost:3000 in your browser
- Click the "Stream" button
- Allow camera and microphone access when prompted
- Your video stream will be displayed locally
- Other users can see your stream in real-time
- Open http://localhost:3000/watch in your browser
- Click "Refresh Streams" or "Refresh Page" to see available streams
- Click on any stream in the list to start watching
- The stream will play using HLS.js for optimal compatibility
- Open multiple browser windows or incognito tabs
- Navigate to http://localhost:3000/stream in each
- Allow camera access in each window
- Each user will see their own stream and other users' streams
- Check the watch page to see HLS versions of the streams
This project is part of the Fermion assignment.