{"id":13551383,"url":"https://github.com/GOATS2K/overpass","last_synced_at":"2025-04-03T01:32:30.848Z","repository":{"id":42712036,"uuid":"297049591","full_name":"GOATS2K/overpass","owner":"GOATS2K","description":"A self-hosted live video streaming platform with Discord authentication, auto-recording and more!","archived":true,"fork":false,"pushed_at":"2024-07-05T12:22:45.000Z","size":177,"stargazers_count":347,"open_issues_count":25,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-03T21:35:25.618Z","etag":null,"topics":["discord","flask","nginx-rtmp","self-hosted","streaming","video-streaming"],"latest_commit_sha":null,"homepage":"","language":"Python","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/GOATS2K.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-20T10:13:36.000Z","updated_at":"2024-07-05T12:23:19.000Z","dependencies_parsed_at":"2024-11-03T21:42:33.205Z","dependency_job_id":null,"html_url":"https://github.com/GOATS2K/overpass","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOATS2K%2Foverpass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOATS2K%2Foverpass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOATS2K%2Foverpass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOATS2K%2Foverpass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GOATS2K","download_url":"https://codeload.github.com/GOATS2K/overpass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922242,"owners_count":20855341,"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":["discord","flask","nginx-rtmp","self-hosted","streaming","video-streaming"],"created_at":"2024-08-01T12:01:47.007Z","updated_at":"2025-04-03T01:32:30.502Z","avatar_url":"https://github.com/GOATS2K.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Overpass\n\nOverpass makes it easy to host your own live streaming server with features such as authentication via Discord, stream playback in your web browser, and an easy way to archive your streams for your users to rewatch!\n\nOverpass also lets you run a private instance for a users on a single Discord server. Simply add the server ID of your Discord server to the configuration file and Overpass will take care of the rest.\n\nPowered by nginx-rtmp.\n\n# Notice\nThis project is no longer maintained and I encourage you to find an alternative.\nI had many ideas for Overpass but honestly could never be arsed to work on it again as it was just about good enough when it was in use.\n\n# Dependencies\n- Python 3.8+\n- Nginx with the [nginx-rtmp module](https://github.com/arut/nginx-rtmp-module) installed\n- FFmpeg\n- A Discord app\n\n# Getting Started\n## Creating the Discord app for Overpass\nNavigate to [Discord's Developer Portal](https://discord.com/developers/applications).\n\n- Select \"New Application\" in the top left corner\n- Choose a name for your application\n- Select the \"OAuth2\" tab\n- Find the \"Client Information\" section of the page, and copy your \"Client ID\" and your \"Client Secret\" and save these for use in the configuration file\n- Click \"Add redirect\" and type in a URI like so:\n\n`https://overpass.dev/auth/callback` - replacing `overpass.dev` with your domain name.\n\n**Note:** If you wish to develop on Overpass, you will have to add `http://localhost:5000/auth/callback` to your list of redirect URIs.\n\n# Install\n## Docker Usage\n\nThere is a Docker image for Overpass, which you can either build yourself with the Dockerfile, or [download from the Docker Hub](https://hub.docker.com/r/goats2k/overpass). \n\nThis image is pre-configured to run Overpass in production mode with Gunicorn, so if you wish to develop on Overpass, you may need to change `docker/startup.sh` to execute `flask run`, and modifying the route to Overpass' API in the nginx configuration.\n\n_Continue reading if you wish to run Overpass on bare-metal, otherwise, you can use the [example Docker Compose file](docker-compose.example)._\n\n## Creating a config file\n**Note: If you are using Docker, set these values as environment variables. See the [example Docker Compose file](docker-compose.example). You will _not_ have to create the `.env` file.**\n\n### Generate a secret key\n\nRun `python -c \"import os; print(os.urandom(16))\"` and copy the output **after the byte symbol** into `OVERPASS_SECRET_KEY`\n\n**Create an empty `.env` file, in the projects' root directory** which contains the following:\n\n```\nDISCORD_CLIENT_ID =\nDISCORD_CLIENT_SECRET = \"\"\nDISCORD_REDIRECT_URI = \"\"\nDISCORD_GUILD_ID = (if you want to restrict access to the tool to users from a certain guild ID - set one here)\n\n\nOVERPASS_SECRET_KEY = \"your generated key here\"\n\nHLS_PATH = \"\"\nREC_PATH = \"\"\nRTMP_SERVER = (IP address and port of your RTMP server - as a string)\n```\n\n### Example config\n\n```\nDISCORD_CLIENT_ID = 31040105101013151\nDISCORD_CLIENT_SECRET = \"1251XXXXXXXXXXXXXXXXXXXXX\"\nDISCORD_REDIRECT_URI = \"https://overpass.dev/auth/callback\"\nDISCORD_GUILD_ID = 05105010105619519\n\nOVERPASS_SECRET_KEY = \"#\\x1an\\x1an\\x1an\\x1an\\x1an\"\n\nHLS_PATH = \"/storage/overpass/hls\"\nREC_PATH = \"/storage/overpass/archive\"\n\nRTMP_SERVER = \"overpass.dev:1935/live\"\n```\n\n## Streaming server setup\n\n- Create the directories you defined in `HLS_PATH` and `REC_PATH` and make sure to give `www-data` write permissions to said folder.\n\n*Make sure the user the Overpass is running as also has read and write access to the same folders.*\n\n*Remember to change the `on_publish` and `on_done` URIs, `record_path` and `hls_path` variables to match your environment* \n\nEdit your `nginx.conf` file to contain the following information.\n```nginx\nrtmp {\n    server {\n        listen 1935;\n        on_publish http://127.0.0.1:5000/api/rtmp/connect;\n        on_done http://127.0.0.1:5000/api/rtmp/done;\n\n        application live {\n            deny play all;\n            live on;\n            record all;\n            record_path /storage/overpass/archive;\n            record_append on;\n\n            hls on;\n            hls_path /storage/overpass/hls;\n            hls_fragment 2;\n            hls_playlist_length 10;\n            exec_record_done bash -c \"/usr/bin/ffmpeg -i $path -acodec copy -vcodec copy -movflags +faststart /your/recording/path/$basename.mp4 \u0026\u0026 rm $path\";\n         }\n    }\n}\n\n\n```\n\n# Running the application\n- Run `flask init-db` to initialize the database.\n\n## Development mode\n- Run `flask run`\n\n## Deploying to production\n\nIn the same folder as Overpass, while in a virtual environment, run the following command:\n\n`gunicorn -w 10 app:app --timeout 600 --log-level=debug --access-logformat \"%({X-Real-IP}i)s %(l)s %(t)s %(b)s '%(f)s' '%(a)s'\" --access-logfile '-'`\n\n## NGINX setup\n```nginx\nlocation / {\n    proxy_pass http://127.0.0.1:8000;\n    proxy_set_header Host $host;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Real-IP $remote_addr;\n}\n```\n\n# Screenshots\n\n![Homepage](https://i.imgur.com/3UvgBbh.png)\n![Web Player](https://i.imgur.com/h1yV3r1.png)\n![Archive](https://i.imgur.com/TYbHzkm.png)\n![Profile Page](https://i.imgur.com/KwC9hPt.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGOATS2K%2Foverpass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGOATS2K%2Foverpass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGOATS2K%2Foverpass/lists"}