{"id":15033711,"url":"https://github.com/grvydev/project-lightspeed","last_synced_at":"2025-05-15T01:04:20.743Z","repository":{"id":37585725,"uuid":"326547939","full_name":"GRVYDEV/Project-Lightspeed","owner":"GRVYDEV","description":"A self contained OBS -\u003e FTL -\u003e WebRTC live streaming server. Comprised of 3 parts once configured anyone can achieve sub-second OBS to the browser livestreaming","archived":false,"fork":false,"pushed_at":"2023-04-03T16:49:03.000Z","size":969,"stargazers_count":3640,"open_issues_count":43,"forks_count":140,"subscribers_count":66,"default_branch":"main","last_synced_at":"2025-04-06T17:09:37.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/GRVYDEV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["GRVYDEV"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-01-04T02:26:47.000Z","updated_at":"2025-04-02T12:42:54.000Z","dependencies_parsed_at":"2022-08-08T21:00:37.103Z","dependency_job_id":"88b5041e-63cd-4cd3-8878-983791f6babe","html_url":"https://github.com/GRVYDEV/Project-Lightspeed","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/GRVYDEV%2FProject-Lightspeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GRVYDEV%2FProject-Lightspeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GRVYDEV%2FProject-Lightspeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GRVYDEV%2FProject-Lightspeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GRVYDEV","download_url":"https://codeload.github.com/GRVYDEV/Project-Lightspeed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248784867,"owners_count":21161188,"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":[],"created_at":"2024-09-24T20:22:27.214Z","updated_at":"2025-04-13T21:28:48.807Z","avatar_url":"https://github.com/GRVYDEV.png","language":"Rust","funding_links":["https://github.com/sponsors/GRVYDEV"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca  href=\"https://github.com/GRVYDEV/Project-Lightspeed\"\u003e\n    \u003cimg src=\"images/lightspeedlogo.svg\" alt=\"Logo\" width=\"150\" height=\"150\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n  \u003ch1 align=\"center\"\u003eProject Lightspeed\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/GRVYDEV/Project-Lightspeed\" alt=\"Stars Badge\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed/network/members\"\u003e\u003cimg src=\"https://img.shields.io/github/forks/GRVYDEV/Project-Lightspeed\" alt=\"Forks Badge\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed/pulls\"\u003e\u003cimg src=\"https://img.shields.io/github/issues-pr/GRVYDEV/Project-Lightspeed\" alt=\"Pull Requests Badge\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/GRVYDEV/Project-Lightspeed\" alt=\"Issues Badge\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed/graphs/contributors\"\u003e\u003cimg alt=\"GitHub contributors\" src=\"https://img.shields.io/github/contributors/GRVYDEV/Project-Lightspeed?color=2b9348\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/GRVYDEV/Project-Lightspeed?color=2b9348\" alt=\"License Badge\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n    A self contained OBS -\u003e FTL -\u003e WebRTC live streaming server. Comprised of 3 parts once configured anyone can achieve sub-second OBS to the browser livestreaming \n    \u003c!-- \u003cbr /\u003e --\u003e\n    \u003c!-- \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e --\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://youtu.be/Dzin4_A8RDs\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed/issues\"\u003eReport a Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GRVYDEV/Project-Lightspeed/issues\"\u003eRequest Features\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003e\u003ch2 style=\"display: inline-block\"\u003eTable of Contents\u003c/h2\u003e\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003cul\u003e\n          \u003cli\u003e\u003ca href=\"#how-it-works\"\u003eHow It Works\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"#diagram\"\u003eDiagram\u003c/a\u003c/li\u003e\n        \u003c/ul\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#components\"\u003eComponents\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#discord\"\u003eDiscord\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n            \u003cul\u003e\n                \u003cli\u003e\u003ca href=\"#lightspeed-ingest\"\u003eLightspeed Ingest\u003c/a\u003e\u003c/li\u003e\n                \u003cli\u003e\u003ca href=\"#lightspeed-webrtc\"\u003eLightspeed WebRTC\u003c/a\u003e\u003c/li\u003e\n                \u003cli\u003e\u003ca href=\"#lightspeed-react\"\u003eLightspeed React\u003c/a\u003e\u003c/li\u003e\n            \u003c/ul\u003e\n        \u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#docker\"\u003eDocker / Compose\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#community-installation\"\u003eCommunity Installation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#streaming-from-obs\"\u003eStreaming From OBS\u003c/a\u003e\n        \u003cul\u003e\n            \u003cli\u003e\u003ca href=\"#stream-key\"\u003eStream Key\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n    \u003c/li\u003e  \n    \u003cli\u003e\u003ca href=\"#help\"\u003eHelp\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#bugs\"\u003eBugs\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgements\"\u003eAcknowledgements\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\n\u003c!-- [![Product Name Screen Shot][product-screenshot]](https://example.com) --\u003e\n\nProject Lightspeed is a fully self-contained live streaming server. With Lightspeed you will be able to deploy your \nown sub-second latency live streaming platform. The Lightspeed repository contains the instructions for installing \nand deploying the entire application. So far, Lightspeed includes an ingest service, broadcast service via webRTC \nand a web application for viewing. Lightspeed is however completely modular. What this means is that you can write \nyour own web app, ingest server or broadcast server. \n\n### How It Works\n\nLightspeed Ingest listens on port 8084 which is the port used by the FTL protocol. Upon receiving a connection it completes the FTL handshake and negotiates a port (this is currently bugged however and defaults to 65535). Once the negotiation is done Lightspeed WebRTC listens on the negotiated port (in the future Lightspeed WebRTC will listen on the loopback interface so the ingest has more control on what packets we accept) and relays the incoming RTP packets over WebRTC. Lightspeed React communicates via websocket with Lightspeed WebRTC to exchange ICE Candidates and once a connection is established the video can be viewed.\n\n### Diagram\nHere is a diagram that outlines the current implementation and the future implementation that I would like to achieve. The reason I want the packets relayed from Ingest to WebRTC on the loopback interface is so that we have more control over who can send packets. Meaning that when a DISCONNECT command is recieved we can terminate the UDP listener so that someone could not start sending packets that we do not want\n\n\u003cimg src=\"images/Lightspeed-Diagram.jpeg\" alt=\"Lightspeed Diagram\"\u003e\n\n### Built With\n\n- Rust\n- Golang\n- React\n\n### Components\n\n- [Lightspeed Ingest](https://github.com/GRVYDEV/Lightspeed-ingest)\n- [Lightspeed WebRTC](https://github.com/GRVYDEV/Lightspeed-webrtc)\n- [Lightspeed React](https://github.com/GRVYDEV/Lightspeed-react)\n\n## Discord\nWe now have a [Discord](https://discord.gg/UpQZANPYmZ) server! This is a great way to stay up to date with the project and join in on the conversation! Come stop by!\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\nIn order to get a copy running you will need to install all 3 repositories. There are installation instructions in \neach repo however I will include them here for the sake of simplicity.\n\n### Prerequisites\n\nIn order to run Lightspeed, [Golang](https://golang.org/doc/install), [Rust](https://www.rust-lang.org/tools/install), and [npm](https://www.npmjs.com/get-npm) are required. Additionally the Rust repo requires a C compiler. If you get a `linker cc not found` error then you need to install a C compiler.\n\n### Installation\n\n#### Clone Repository\n\n```sh\ngit clone https://github.com/GRVYDEV/Project-Lightspeed\n```\n\n#### Build Ingest Server\n\n```sh\ncd ingest\ncargo build\n```\n\n#### Build WebRTC Server\n\nUsing go get\n\n**Warning: Deprecated method (relies on outdated repository)**\n\n```sh\nexport GO111MODULE=on\ngo get github.com/GRVYDEV/lightspeed-webrtc\n```\n\nUsing git\n\n```sh\ncd webrtc\nexport GO111MODULE=on\ngo build\n```\n\n#### Frontend (Based on React.JS)\n\n```sh\ncd frontend\nnpm install\n```\n\n### Community Installation (**Warning: Outdated. Uses deprecated repositories**)\nSome of our awesome community members have written their own installers for Lightspeed. Here are links to those!\n\n**Note**: If you want to make a custom installer do so in the `/contrib` folder and submit a PR. Please make sure to include a README on how to use it!\n\n- [Ubuntu Installer](https://github.com/GRVYDEV/Project-Lightspeed/tree/main/contrib/ubuntu_installer)\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\n#### Lightspeed Ingest\n\n```sh\ncd ingest\ncargo run --release\n```\n\n#### Lightspeed WebRTC\n\nUsing go get\n\n**Warning: Deprecated method (relies on outdated repository)**\n\n```sh\nlightspeed-webrtc --addr=XXX.XXX.XXX.XXX\n```\n\nUsing git\n\n```sh\ncd webrtc\ngo build\n./lightspeed-webrtc --addr=XXX.XXX.XXX.XXX\n```\n\n##### Arguments\n\n|  Argument | Supported Values | Defaults | Notes             |\n| :-------- | :--------------- | :------- | :---------------- |\n| `--addr`   | A valid IP address | `localhost` | This is the local Ip address of your machine. It defaults to localhost but should be set to your local IP. For example 10.17.0.5 This is where the server will listen for UDP packets and where it will host the websocket endpoint for SDP negotiation|\n|  `--ip`    | A valid IP address | `none` | Sets the public IP address for WebRTC to use. This is especially useful in the context of Docker|\n| `--ports`  | A valid UDP port range | `20000-20500` | This sets the UDP ports that WebRTC will use to connect with the client |\n| `--ws-port` | A valid port number | `8080` | This is the port on which the websocket will be hosted. If you change this value make sure that is reflected in the URL used by the react client |\n| `--rtp-port` | A valid port number | `65535` | This is the port on which the WebRTC service will listen for RTP packets. Ensure this is the same port that Lightspeed Ingest is negotiating with the client |\n| `--ice-servers` | A comma separated list of hosts | `none` | List of ICE / STUN servers used by WebRTC for setting up the network connection with the clients |\n\n#### Lightspeed React\n\nYou should then configure the websocket URL in `config.json` in the `build` directory. If you are using an IP then it will be the \npublic IP of your machine if you have DNS then it will be your hostname.\n\n**Note**: The websocket port is hardcoded meaning that Lightspeed-webrtc will always serve it on port 8080 (this may change in the future) \nso for the websocket config it needs to be `ws://IP_or_Hostname:8080/websocket`\n\nYou can host the static site locally using `serve` which can be found [here](https://www.npmjs.com/package/serve)\n\n**Note**: your version of `serve` may require the `-p` flag instead of `-l` for the port\n```sh\ncd frontend\nnpm run build\nserve -s build -l 80\n```\n\nThe above will serve the build folder on port 80.\n\nView Lightspeed in your web browser by visiting http://hostname or http://your.ip.address.here\n\n\n---\n\n\u003c!-- DOCKER --\u003e\n## Docker\n\nInstall [Docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/).\n\nSee the `.env` file to configure per your needs. At minimum, you need to set `WEBSOCKET_HOST`. The stream key will be \ngenerated automatically on boot, and change each restart, unless you set a static one.\n\n### Development\n\nUse `docker-compose up` to start all containers at once and monitor the logs. When you are happy it is working you can \nmove to running detached.\n\n### Run Detached (background)\n\nUse `docker-compose up -d` to start all containers detached to have them run in the background. \n\nUse `docker ps` to verify uptime, port forwarding, etc. \n\nYou can also use `docker-compose logs -f` to follow the logs of all the containers, and press `CTRL` + `C` to stop \nfollowing but leave the containers running.\n\n### Build Images manually\n\nFor development purposes you can choose to build the containers locally instead of Docker Hub. Uncomment the `build:` and `context:` directives\nin the docker-compose.yml\n\n```\ngit clone https://github.com/GRVYDEV/Project-Lightspeed\n---\n./Project-Lightspeed  # Monorepo Root\n   frontend/\n   ingest/\n   webrtc/\n```\n\nRun `docker-compose build` to build the local container images. If you change the source code you will need to run again.\nYou can run rebuild an individual container via `docker-compose build lightspeed-webrtc`.\n\n---\n\n## Streaming From OBS\n\nBy default, since we are using the FTL protocol, you cannot just use a Custom server. You will need to edit \nyour `services.json` file. It can be found at:\n- Windows: `%AppData%\\obs-studio\\plugin_config\\rtmp-services\\services.json` \n- OSX: `/Users/YOURUSERNAME/Library/Application\\ Support/obs-studio/plugin_config/rtmp-services/services.json`\n\n**Note**: Not all versions of Linux have access to OBS with the FTL SDK built in. If you are on Linux and you cannot stream to Lightspeed this may be the issue.\n\nPaste the below into the services array and change the url to either the IP or the hostname of your Project Lightspeed server\n\n**Note**: for the url it is not prefaced by anything. For example, given an IP of 10.0.0.2 you would put `\"url\": \"10.0.0.2\"` You do not need to indicate a port since the FTL protocol always uses 8084\n```json\n{\n    \"name\": \"Project Lightspeed\",\n    \"common\": false,\n    \"servers\": [\n        {\n            \"name\": \"SERVER TITLE HERE\",\n            \"url\": \"your.lightspeed.hostname\"\n        }\n    ],\n    \"recommended\": {\n        \"keyint\": 2,\n        \"output\": \"ftl_output\",\n        \"max audio bitrate\": 160,\n        \"max video bitrate\": 8000,\n        \"profile\": \"main\",\n        \"bframes\": 0\n    }\n},\n```\n\nNOTE: You do not need to specify a port.\n\nAfter restarting OBS you should be able to see your service in the OBS settings Stream pane.\n(Special Thanks to [Glimesh](https://github.com/Glimesh) for these instructions)\n\n---\n\n### Stream Key\n\nWe are no longer using a default streamkey! If you are still using one please pull from master on the Lightspeed-ingest \nrepository. Now, by default on first time startup a new streamkey will be generated and output to the terminal for you. \nIn order to regenerate this key simply delete the file it generates called `hash`. In a Docker context we will work to \nmake the key reset process as easy as possible. Simply copy the key output in the terminal to OBS and you are all set! \nThis key WILL NOT change unless the `hash` file is deleted.\n\n\u003cimg src=\"images/streamkey-example.png\" alt=\"Streamkey example\"\u003e\n\n## Help\nThis project is still very much a work in progress and a lot of improvements will be made to the deployment process. \nIf something is unclear or you are stuck there are two main ways you can get help.\n\n1. [Discord](https://discord.gg/UpQZANPYmZ) - this is the quickest and easiest way I will be able to help you through some deployment issues.\n2. [Create an Issue](https://github.com/GRVYDEV/Project-Lightspeed/issues) - this is another way you can bring attention to something that you want fixed. \n\n\u003c!-- ROADMAP --\u003e\n\n## Roadmap\n\nI will be fleshing out the roadmap in the coming days. As of right now I want to get this to a point where it is \nas close to other live streaming services as possible. If there are any features that you want to see then feel \nfree to suggest them!\n\nSee the [open issues](https://github.com/GRVYDEV/Project-Lightspeed/issues) for a list of proposed features \n(and known issues).\n\n## Bugs\n\nI am very from perfect and there are bound to be bugs and things I've overlooked in the installation process. \nPlease, add issues and feel free to reach out if anything is unclear. Also, we have a Discord.\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. \nAny contributions you make are **greatly appreciated**. \n\n1. Fork the Project\n2. Create your Feature Branch: ``git checkout -b feature/AmazingFeature``\n3. Commit your Changes: ``git commit -m 'Add some AmazingFeature'``\n4. Push to the Branch: ``git push origin feature/AmazingFeature``\n5. Open a Pull Request\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nGarrett Graves - [@grvydev](https://twitter.com/grvydev)\n\nProject Link: [https://github.com/GRVYDEV/Project-Lightspeed](https://github.com/GRVYDEV/Project-Lightspeed)\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n\n## Acknowledgements\n\n- [Sean Dubois](https://github.com/Sean-Der)\n- [Hayden McAfee](https://github.com/haydenmc)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrvydev%2Fproject-lightspeed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrvydev%2Fproject-lightspeed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrvydev%2Fproject-lightspeed/lists"}