{"id":37179259,"url":"https://github.com/voc/rtmp-auth","last_synced_at":"2026-01-14T20:52:12.073Z","repository":{"id":56366714,"uuid":"256888039","full_name":"voc/rtmp-auth","owner":"voc","description":"Simple Auth backend for the nginx-rtmp module","archived":false,"fork":false,"pushed_at":"2024-02-06T02:16:48.000Z","size":100,"stargazers_count":14,"open_issues_count":1,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-06-19T05:54:35.960Z","etag":null,"topics":["backend","daemon","nginx-rtmp"],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/voc.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-04-19T01:21:59.000Z","updated_at":"2024-04-12T21:39:28.000Z","dependencies_parsed_at":"2024-06-19T05:23:16.701Z","dependency_job_id":"e402a15e-ca11-47a2-a7e1-a371a2cf9f0d","html_url":"https://github.com/voc/rtmp-auth","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/voc/rtmp-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voc%2Frtmp-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voc%2Frtmp-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voc%2Frtmp-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voc%2Frtmp-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voc","download_url":"https://codeload.github.com/voc/rtmp-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voc%2Frtmp-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["backend","daemon","nginx-rtmp"],"created_at":"2026-01-14T20:52:11.211Z","updated_at":"2026-01-14T20:52:12.011Z","avatar_url":"https://github.com/voc.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rtmp-auth\nSimple stream auth backend for:\n  - nginx-rtmp\n  - srtrelay\n  - srs\n\n## Features\n  * Expiring auth\n  * Single static binary\n  * Persists state to simple file (no database required)\n  * Web-UI with subpath support\n\nIn the future I might also add support for removing active streams when they expire.\n\n## Build Dependencies\n  * protoc with go-support\n  * statik ```go install github.com/rakyll/statik```\n\n## Usage\nBuild the daemon with\n```\nmake\n```\n\nThen start it\n```bash\n./rtmp-auth -app \"myrtmp\" -apiAddr \"localhost:8000\" -frontendAddr \"localhost:8082\"\n```\nIt will now authenticate streams for the rtmp-app \"myrtmp\" (the app is the \"directory\" part of a rtmp url) like ```rtmp://\u003chost\u003e/\u003capp\u003e/\u003cstream\u003e```\n\n### Nginx-RTMP\nAdd on_publish/on_publish_done callbacks to your nginx-rtmp config\n```nginx\napplication myrtmp {\n  live on;\n  meta copy;\n\n  hls off;\n\n  allow publish all;\n  allow play all;\n\n  # add this for authentication\n  on_publish http://127.0.0.1:8080/publish;\n  on_publish_done http://127.0.0.1:8080/unpublish;\n}\n```\n\n### srtrelay\nChange the auth to \"http\" in your srtrelay config and add the api url:\n```toml\n[auth]\ntype = \"http\"\n\n[auth.http]\nurl = \"http://localhost:8080/publish\"\n```\n\nsrtrelay doesn't currently support unpublish.\n\n### SRS\nAdd the http_hooks config inside your srs vhost config:\n```nginx\nvhost __defaultVhost__ {\n    ...\n    http_hooks {\n        enabled         on;\n        on_publish      http://172.17.0.1:8080/publish;\n        on_unpublish    http://172.17.0.1:8080/unpublish;\n    }\n    ...\n}\n```\n\n### WebUI\n**Note: You will need to set the -insecure flag when testing over http.**\n\nAfter reloading your nginx/srs the rtmp publish-requests will be authenticated against the daemon.\nYou can visit http://localhost:8082 to add streams.\n\nFor production usage you will want to deploy the frontend behind a Reverse-Proxy with TLS-support like nginx.\n\n### Publish a stream\nNow that you have set up your software you can start publishing streams\n\n```bash\n# publish without auth\nffmpeg -i test.mp4 -c copy -f flv rtmp://server/app/stream\n\n# publish with auth\nffmpeg -i test.mp4 -c copy -f flv rtmp://server/app/stream?auth=foobar2342\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoc%2Frtmp-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoc%2Frtmp-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoc%2Frtmp-auth/lists"}