{"id":13491492,"url":"https://github.com/waleedahmad/node-stream","last_synced_at":"2025-03-28T08:33:16.425Z","repository":{"id":41268453,"uuid":"151944465","full_name":"waleedahmad/node-stream","owner":"waleedahmad","description":"RTMP server in Nodejs for live streaming. ","archived":false,"fork":false,"pushed_at":"2023-01-07T04:08:12.000Z","size":1959,"stargazers_count":489,"open_issues_count":31,"forks_count":218,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-31T05:34:47.641Z","etag":null,"topics":["ffmpeg","livestream","nodejs","rtmp"],"latest_commit_sha":null,"homepage":"https://quantizd.com/building-live-streaming-app-with-node-js-and-react/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waleedahmad.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-07T13:30:27.000Z","updated_at":"2024-10-01T07:58:14.000Z","dependencies_parsed_at":"2023-02-06T11:15:35.077Z","dependency_job_id":null,"html_url":"https://github.com/waleedahmad/node-stream","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waleedahmad%2Fnode-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waleedahmad%2Fnode-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waleedahmad%2Fnode-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waleedahmad%2Fnode-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waleedahmad","download_url":"https://codeload.github.com/waleedahmad/node-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245996754,"owners_count":20707310,"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":["ffmpeg","livestream","nodejs","rtmp"],"created_at":"2024-07-31T19:00:57.505Z","updated_at":"2025-03-28T08:33:15.876Z","avatar_url":"https://github.com/waleedahmad.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","HarmonyOS","nodejs"],"sub_categories":["Windows Manager"],"readme":"### NodeStream\n\nSee complete tutorial [here](https://quantizd.com/building-live-streaming-app-with-node-js-and-react/).\n\n\n#### Install ffmpeg for RTMP to HLS transcoding \n\n```\n# On Ubuntu 18.04\n\n$ sudo add-apt-repository ppa:jonathonf/ffmpeg-4\n$ sudo apt install ffmpeg\n\n# check version\n$ ffmpeg --version\n\n# You can download Windows builds from ffmpeg site.\n```\n\n### Prerequisites\n \n#### MongoDB\n\n Make sure you have **MongoDB** installed on your system. We use Mongoose for accessing database.\n Check MongoDB docs on how to install MongoDB on your operating system.\n \n [Linux](https://docs.mongodb.com/manual/administration/install-on-linux/) \n \n [Windows](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/)\n \n [Mac](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/)\n\n#### Python 2.7\nMake sure you have python 2.x installed and added to path.\n\n### Configuration\nChange ffmpeg path in node media server configuration to your\nown installed path.\n\nAlso change secret string. It will be used for session encryption.\n\n```\ncd nodeStream \u0026\u0026 nano /server/config/default.js\n\nconst config = {\n    server: {\n        secret: 'kjVkuti2xAyF3JGCzSZTk0YWM5JhI9mgQW4rytXc',\n        port : 3333\n    },\n    rtmp_server: {\n        rtmp: {\n            port: 1935,\n            chunk_size: 60000,\n            gop_cache: true,\n            ping: 60,\n            ping_timeout: 30\n        },\n        http: {\n            port: 8888,\n            mediaroot: './server/media',\n            allow_origin: '*'\n        },\n        trans: {\n            ffmpeg: '/usr/bin/ffmpeg',\n            tasks: [\n                {\n                    app: 'live',\n                    hls: true,\n                    hlsFlags: '[hls_time=2:hls_list_size=3:hls_flags=delete_segments]',\n                    dash: true,\n                    dashFlags: '[f=dash:window_size=3:extra_window_size=5]'\n                }\n            ]\n        }\n    }\n};\n```\n\n#### Install dependencies, build code and run server\n```\n$ npm install\n\n# run webpack and watch for changes\n$ npm run watch \n\n# run node server with supervisor and watch for changes\n$ npm run start\n```\n#### Streaming with OBS\n\nGo to Settings \u003e Stream.  Select Custom service and `rtmp://127.0.0.1:1935/live`\nin server input. Enter your streaming key issued by NodeStream and click Apply.\nClick start streaming to broadcast your stream.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaleedahmad%2Fnode-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaleedahmad%2Fnode-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaleedahmad%2Fnode-stream/lists"}