{"id":28075173,"url":"https://github.com/pansalasamarth/rtmp-live-streaming-platform","last_synced_at":"2026-05-10T02:05:33.704Z","repository":{"id":292779155,"uuid":"981899370","full_name":"pansalasamarth/RTMP-Live-Streaming-Platform","owner":"pansalasamarth","description":"A lightweight, scalable live-streaming solution enabling real-time video/audio broadcasting through WebRTC and Dockerized TURN servers, deployed on AWS for high availability and secure communication.","archived":false,"fork":false,"pushed_at":"2025-05-12T04:42:55.000Z","size":156,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T00:55:00.689Z","etag":null,"topics":["aws-ec2","cloud","docker","livestream","stun-server","turn-server","webrtc","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pansalasamarth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-12T04:31:17.000Z","updated_at":"2025-05-12T04:46:01.000Z","dependencies_parsed_at":"2025-05-12T05:31:45.716Z","dependency_job_id":"7c283fa2-8bbf-4da2-8654-b141c77baf99","html_url":"https://github.com/pansalasamarth/RTMP-Live-Streaming-Platform","commit_stats":null,"previous_names":["pansalasamarth/rtmp-live-streaming-platform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pansalasamarth%2FRTMP-Live-Streaming-Platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pansalasamarth%2FRTMP-Live-Streaming-Platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pansalasamarth%2FRTMP-Live-Streaming-Platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pansalasamarth%2FRTMP-Live-Streaming-Platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pansalasamarth","download_url":"https://codeload.github.com/pansalasamarth/RTMP-Live-Streaming-Platform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850891,"owners_count":21973672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-ec2","cloud","docker","livestream","stun-server","turn-server","webrtc","websocket"],"created_at":"2025-05-13T00:55:07.716Z","updated_at":"2026-05-10T02:05:29.410Z","avatar_url":"https://github.com/pansalasamarth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RTMP Live Streaming Platform with Cloud Integration\n\n---\n\n## Table of Contents\n\n1. [Project Overview](#project-overview)\n2. [Features](#features)\n3. [Technology Stack](#technology-stack)\n4. [Architecture](#architecture)\n5. [Project Structure](#project-structure)\n6. [Getting Started](#getting-started)\n\n   * [Prerequisites](#prerequisites)\n   * [Installation](#installation)\n   * [Configuration](#configuration)\n7. [Usage](#usage)\n\n   * [Running Locally](#running-locally)\n   * [AWS Cloud Deployment](#aws-cloud-deployment)\n8. [Contributing](#contributing)\n9. [License](#license)\n10. [Acknowledgements](#acknowledgements)\n\n---\n\n## Project Overview\n\nThis cloud-based SaaS live streaming platform enables real-time video/audio broadcasting between publishers and viewers. It features a React frontend, a Node.js/Express backend, Docker-managed TURN servers for NAT traversal, and seamless WebRTC/WebSocket communication - all deployed on AWS EC2 for scalability and high availability.\n\n---\n\n## Features\n\n* **Live Streaming with WebRTC**:\n\n  * Multi-publisher support with unique Publisher IDs\n  * Viewer dashboard with active streams list and search\n  * Real-time status logs of connected peers\n* **Secure Signaling \u0026 Media**:\n\n  * HTTPS Express server with SSL/TLS certificates\n  * WebSocket-based signaling (offer/answer/ICE)\n  * REST endpoints:\n\n    * `GET /streams` – list active streams\n    * `GET /ice-config` – STUN/TURN configuration\n* **Scalable Cloud Architecture**:\n\n  * Dockerized Coturn TURN server for reliable relay\n  * AWS EC2 deployment for flexible resource scaling\n  * Pay-as-you-go cost model with high availability\n\n---\n\n## Technology Stack\n\n* **Frontend**\n\n  * React (Vite), JavaScript, HTML/CSS\n  * WebRTC APIs for media capture \u0026 playback\n* **Backend**\n\n  * Node.js, Express.js\n  * WebSocket (ws) for signaling\n  * Docker (Coturn)\n* **Cloud \u0026 DevOps**\n\n  * AWS EC2, S3, CloudFront, Lambda, Systems Manager\n  * SSL/TLS certificates (stored in `/backend/certs`)\n  * Environment variables (`.env`) for dynamic config\n* **Utilities**\n\n  * `start-script.sh` – automated build \u0026 deploy script\n  * Systemd service for auto-start on boot\n\n---\n\n## Architecture\n\n1. **Client Layer**\n\n   * **Publisher**: captures local media, establishes peer connections\n   * **Viewer**: connects to publisher, renders live stream\n2. **Signaling Layer**\n\n   * WebSocket server attached to HTTPS server\n   * Handles offer/answer/ICE candidate exchange\n3. **Media Relay**\n\n   * STUN/TURN servers (Coturn) in Docker for NAT traversal\n4. **Cloud Layer**\n\n   * Deployed on AWS EC2 (`https://\u003cEC2_PUBLIC_IP\u003e:8443`)\n   * Scalable, with monitoring via systemd logs \u0026 CloudWatch integration\n\n---\n\n## Project Structure\n\n```text\n├── .vscode/              # VS Code settings\n├── backend/\n│   ├── certs/            # SSL/TLS certificates\n│   ├── Dockerfile        # Docker image for backend + TURN\n│   ├── .env              # Backend env variables\n│   ├── server.js         # Express + WebSocket server\n│   └── package*.json     # Node.js dependencies\n├── frontend/\n│   ├── public/\n│   ├── src/              # React components \u0026 assets\n│   ├── .env              # Frontend env variables\n│   ├── index.html\n│   └── vite.config.js\n├── start-script.sh       # Builds, configures, and starts services\n├── .gitignore\n└── README.md             # This file\n```\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n* Node.js (via NVM recommended)\n* Docker \u0026 Docker Compose\n* Git\n\n### Installation\n\n1. **Clone the repo**\n\n   ```bash\n   git clone https://github.com/your-username/rtmp-live-streaming.git\n   cd rtmp-live-streaming\n   ```\n2. **Install dependencies**\n\n   ```bash\n   # Frontend\n   cd frontend \u0026\u0026 npm install\n   # Backend\n   cd ../backend \u0026\u0026 npm install\n   ```\n\n### Configuration\n\n1. **Create **\\`\\`** files**\n\n   * Copy `.env.example` to `.env` in both `frontend/` and `backend/`\n   * Set `REACT_APP_SIGNALING_URL`, `PORT`, `STUN_SERVERS`, `TURN_SERVERS`, etc.\n2. **Place SSL certs** in `backend/certs/` as `key.pem` \u0026 `cert.pem`.\n\n---\n\n## Usage\n\n### Running Locally\n\n```bash\n# From project root\nchmod +x start-script.sh\n./start-script.sh\n```\n\n* Frontend served on `https://localhost:3000`\n* Backend (HTTPS + WebSocket) on `https://localhost:8443`\n\n### AWS Cloud Deployment\n\n1. **Launch EC2 Instance** (Ubuntu 22.04 LTS)\n2. **Open Security Group**\n\n   * TCP 8443 (HTTPS/WSS)\n   * TCP 3478 (TURN)\n3. **SSH \u0026 Prepare**\n\n   ```bash\n   # Install NVM, Node.js v22, Git\n   curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash\n   source ~/.bashrc\n   nvm install 22\n   sudo apt-get update \u0026\u0026 sudo apt-get install -y git docker.io\n   ```\n4. **Clone \u0026 Deploy**\n\n   ```bash\n   git clone https://github.com/your-username/rtmp-live-streaming.git\n   cd rtmp-live-streaming\n   chmod +x start-script.sh\n   sudo ./start-script.sh\n   ```\n5. **(Optional) Systemd Service**\n   Create `/etc/systemd/system/rtmp.service` with:\n\n   ```ini\n   [Unit]\n   Description=RTMP Live Streaming Service\n   After=network.target\n\n   [Service]\n   Type=simple\n   User=ubuntu\n   WorkingDirectory=/home/ubuntu/rtmp-live-streaming\n   ExecStart=/home/ubuntu/rtmp-live-streaming/start-script.sh\n   Restart=on-failure\n   Environment=\"PATH=/home/ubuntu/.nvm/versions/node/v22.*/bin:/usr/bin\"\n\n   [Install]\n   WantedBy=multi-user.target\n   ```\n\n   ```bash\n   sudo systemctl daemon-reload\n   sudo systemctl enable rtmp\n   sudo systemctl start rtmp\n   sudo journalctl -u rtmp -f\n   ```\n\n---\n\n## Contributing\n\n1. Fork this repository\n2. Create a feature branch (`git checkout -b feature/YourFeature`)\n3. Commit changes (`git commit -m \"Add YourFeature\"`)\n4. Push branch and open a Pull Request\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n\n---\n\n## Acknowledgements\n\n* WebRTC and WebSocket documentation\n* Docker Coturn official image\n* AWS EC2 user guide\n\n---\n\n\u003e *“Streaming is the new frontier; build it secure, build it scalable.”*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpansalasamarth%2Frtmp-live-streaming-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpansalasamarth%2Frtmp-live-streaming-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpansalasamarth%2Frtmp-live-streaming-platform/lists"}