{"id":26962245,"url":"https://github.com/markcalendario/echo","last_synced_at":"2026-05-10T16:03:42.670Z","repository":{"id":284127846,"uuid":"953907839","full_name":"markcalendario/echo","owner":"markcalendario","description":"A basic Twitch clone for practice aimed to explore live streaming technologies using NGINX, RTMP, and HLS.","archived":false,"fork":false,"pushed_at":"2025-03-25T19:18:11.000Z","size":863,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T05:20:04.046Z","etag":null,"topics":["hls","hls-live-streaming","nginx","rtmp","rtmp-stream"],"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/markcalendario.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}},"created_at":"2025-03-24T09:16:05.000Z","updated_at":"2025-03-25T19:18:15.000Z","dependencies_parsed_at":"2025-03-24T10:43:02.422Z","dependency_job_id":null,"html_url":"https://github.com/markcalendario/echo","commit_stats":null,"previous_names":["markcalendario/echo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markcalendario/echo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcalendario%2Fecho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcalendario%2Fecho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcalendario%2Fecho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcalendario%2Fecho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markcalendario","download_url":"https://codeload.github.com/markcalendario/echo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcalendario%2Fecho/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268927302,"owners_count":24330251,"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","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hls","hls-live-streaming","nginx","rtmp","rtmp-stream"],"created_at":"2025-04-03T05:19:32.615Z","updated_at":"2026-05-10T16:03:37.636Z","avatar_url":"https://github.com/markcalendario.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **echo.tv**\n\nA simple Twitch clone for exploring live streaming with **NGINX, RTMP, and HLS**. Users can stream via OBS or other software and watch other streams.\n\n## **Features**\n\n- Low-latency streaming\n- Stream \u0026 user authentication\n- Watch other users' live streams\n\n---\n\n## **Setup Guide**\n\n### **1. Client (Frontend)**\n\n```bash\ncd client\nnpm install\nnpm run dev  # Starts the frontend at http://localhost:5173\n```\n\n### **2. Server (Backend)**\n\n```bash\ncd ../server\nnpm install\nnpm run dev  # Starts the backend at http://localhost:5174\n```\n\n### **3. Database (MySQL + Prisma)**\n\n```bash\nnpm run prisma:migrate:dev  # Creates schema to MySQL\nnpm run prisma:generate:dev  # Generates Prisma client (for intellisense)\n```\n\n### **4. NGINX for RTMP \u0026 HLS**\n\n**Install NGINX with RTMP Module**\n\n```bash\nsudo apt install nginx libnginx-mod-rtmp -y\n```\n\n**Configure NGINX Server**\n\nAppend the RTMP block from `/configs/nginx/nginx.conf` to `nginx.conf`\n\n```bash\nsudo nano /etc/nginx/nginx.conf  # Add RTMP settings\n```\n\nCreate an HTTP configuration for HLS and STAT\n\n```bash\ncp configs/nginx/echo.conf /etc/nginx/sites-available/echo.conf\n```\n\nApply changes\n\n```bash\nsystemctl restart nginx\n```\n\n---\n\n## **How Streaming Works**\n\n1. **RTMP (Real-Time Messaging Protocol)**\n   - Used by streaming software (e.g., OBS) to send live video to a media server.\n   - Ensures a stable and low-latency connection between the broadcaster and the server.\n2. **HLS (HTTP Live Streaming)**\n   - Converts the RTMP stream into smaller video segments (.ts files).\n   - Creates a playlist (.m3u8) that allows adaptive playback on web browsers and mobile devices.\n\nTogether, **RTMP handles video ingestion**, while **HLS makes it playable for viewers**.\n\n---\n\n## **What is STAT in RTMP?**\n\n**STAT** is an **RTMP status report** that provides real-time information about active streams on the RTMP server. It helps monitor stream activity, including:\n\n- **Current live streams**\n- **Bitrate and bandwidth usage**\n- **Connected viewers**\n- **Stream key details**\n\n📌 In our setup, it was used to track stream heartbeats. These heartbeats help detect streams that appear LIVE but are no longer active, ensuring they are correctly marked as OFFLINE. To check the RTMP status:\n\n```bash\ncurl http://172.23.238.4:5175/stat\n```\n\n📌 This is useful for debugging and monitoring stream performance.\n\n---\n\n## **Connecting OBS to RTMP Server**\n\n1. **RTMP URL:** `rtmp://172.23.238.4:1935/live`\n2. **OBS Settings:**\n   - Go to **Settings \u003e Stream**\n   - Set **Service: Custom**\n   - Enter **RTMP URL** + **`Your Stream Key`**\n3. **Start Streaming**\n\n📌 **Watch via HLS:** `http://172.23.238.4:5175/hls/Your Stream Key/index.m3u8`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcalendario%2Fecho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkcalendario%2Fecho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcalendario%2Fecho/lists"}