This guide will help you set up and run the streaming app, which includes NGINX-RTMP for video streaming, a backend server, and a client React app. You will also be able to add overlays on the video during the stream.
Before starting, ensure you have the following installed:
- Docker (for NGINX-RTMP server and FFmpeg setup)
- Node.js and npm (for backend and client)
-
First, fork the repository to your GitHub account.
-
Then, clone the forked repository to your local system using the following command:
git clone https://github.com/your-username/your-repo-name.git
-
Open the
nginx-rtmpfolder in your CLI. -
Build the NGINX and RTMP images by running the following command:
docker compose --env-file .env up
Note: Install Docker first if you haven’t done so.
-
Stop the NGINX service after it's built.
-
Add the video file to be streamed inside your
ffmpegfolder. -
Make necessary changes in the
entrypointcode in theDockerfileand save it.
-
Open the
clientfolder. -
Install dependencies by running:
npm i
or
npm install
-
Stop the React app for now (if it's running).
-
Open the
backendfolder. -
Start the backend by running:
npm start
Replace the environment variables in your .env files according to your project configuration.
Now, run the following in the given order:
-
NGINX-RTMP Server: Run the NGINX-RTMP server using:
docker compose --env-file .env up
-
Backend Server: Start the backend server.
-
Client (React App): Start the React app.
npm start
- You can add overlays (e.g., logos, text) on the video while streaming.
Feel free to open an issue or contact us if you face any problems!