https://github.com/foyzulkarim/mern-video-streaming
MERN Video Streaming is a cutting-edge, open-source platform for video streaming, offering a comprehensive, full-stack solution utilizing the latest MERN stack technologies.
https://github.com/foyzulkarim/mern-video-streaming
bullmq ffmpeg hls mern messaging react redis stream streaming video vidigenie
Last synced: about 1 month ago
JSON representation
MERN Video Streaming is a cutting-edge, open-source platform for video streaming, offering a comprehensive, full-stack solution utilizing the latest MERN stack technologies.
- Host: GitHub
- URL: https://github.com/foyzulkarim/mern-video-streaming
- Owner: foyzulkarim
- License: mit
- Created: 2023-01-27T04:23:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-17T04:45:08.000Z (about 1 year ago)
- Last Synced: 2025-03-31T14:13:54.296Z (about 1 month ago)
- Topics: bullmq, ffmpeg, hls, mern, messaging, react, redis, stream, streaming, video, vidigenie
- Language: JavaScript
- Homepage:
- Size: 6.01 MB
- Stars: 189
- Watchers: 11
- Forks: 70
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# MERN Video Streaming Project
> I am writing a full in-depth explanation in my medium.com page. Please visit
> [Build a MERN based video hosting and sharing system](https://medium.com/@foyzulkarim/mern-based-video-hosting-and-sharing-system-part-0-setup-server-and-client-project-skeleton-948622f869da)
> to understand the whole architecture and step by step instructions.## Overview
MERN Video Streaming is a cutting-edge, open-source platform for video
streaming, offering a comprehensive, full-stack solution utilizing the latest
MERN stack technologies. With MERN Video Streaming, users can easily upload,
manage, and stream videos on demand, providing a seamless experience. This
project features a video processing capability that provides real-time
notifications upon completion.The backend is comprised of three services, utilizing Redis messaging for
communication. These include an API server, a video conversion service, and an
HTTP server serving HLS video files. On the client side, the project uses
create-react-app and MUI library, along with socket.io-client and React Context.## Architecture

### Backend Services
#### API Server
The API server is an Expressjs app that uses Joi, Multer, BullMQ, Socket.io, and
MongoDB driver. The server communicates with Redis to process and store data,
and uses MongoDB as the primary database. The database and Redis are spun up via
the docker-compose command.#### Video Conversion Service
The video conversion service is a node process that is responsible for
converting videos and communicating with Redis via the BullMQ library. The
service is not exposed to any HTTP port.#### HTTP Server
The HTTP server is a plain and simple server that serves HLS video files.
### Frontend app
The client app is based on create-react-app and MUI library. It uses
socket.io-client and React Context to communicate with the API server and
display the video content.## Prerequisites
To get started with MERN Video Streaming, you will need to have the following
software installed on your local machine:- [Node.js](https://nodejs.org/en/)
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)### Built with Open-Source Technologies
MERN Video Streaming has been built with the following open-source technologies:
- [MongoDB](https://www.mongodb.com/) - A document-based database used to store
user and video data
- [Express](https://expressjs.com/) - A Node.js web application framework used
for the server-side of the application
- [React](https://reactjs.org/) - A JavaScript library for building user
interfaces used for the client-side of the application
- [Node.js](https://nodejs.org/en/) - A JavaScript runtime environment used to
run the server-side code## Installation
To run the project locally, follow these steps:
### 1. Clone the repository
```bash
git clone [email protected]:foyzulkarim/mern-video-streaming.git
```### 2. Run project locally using docker-compose
#### 2.1 Run the `server` app
From project directory run bellow commands```bash
cd server
npm run start
```#### 2.2 Run the `client` app
From project directory run bellow commands```bash
cd client
yarn install
yarn start
```### 3. Usage
You can now access the application at http://localhost:3000.
## Special note: Video folder structures
To upload the videos and serve them from server's folder we need to have below folder structure.
## Contributing to MERN Video Streaming
MERN Video Streaming is an open-source project and we welcome contributions from
the community. If you would like to contribute to the project, please refer to
the `CONTRIBUTING.md` file for guidelines.## License
MERN Video Streaming is licensed under the MIT License. Please see the `LICENSE`
file for more information.## Note
Before running the above commands, make sure that you have Docker and Node.js
installed on your machine.This readme file is not finished yet. I will update it as I go along with the
project. Thanks.