{"id":19703576,"url":"https://github.com/monibuca/plugin-rtmp","last_synced_at":"2025-10-05T20:57:01.060Z","repository":{"id":41154811,"uuid":"254985328","full_name":"Monibuca/plugin-rtmp","owner":"Monibuca","description":"RTMP协议插件，提供RTMP协议的server功能：接收rtmp推流和rtmp的播放功能","archived":false,"fork":false,"pushed_at":"2024-07-09T11:58:54.000Z","size":236,"stargazers_count":96,"open_issues_count":9,"forks_count":52,"subscribers_count":5,"default_branch":"v4","last_synced_at":"2025-04-30T04:47:49.647Z","etag":null,"topics":["rtmp"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Monibuca.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-12T01:13:15.000Z","updated_at":"2025-04-11T09:02:44.000Z","dependencies_parsed_at":"2024-01-19T08:51:26.182Z","dependency_job_id":"899bcfec-ae45-49bf-bc2b-e11537aaa4cd","html_url":"https://github.com/Monibuca/plugin-rtmp","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/Monibuca/plugin-rtmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-rtmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-rtmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-rtmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-rtmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Monibuca","download_url":"https://codeload.github.com/Monibuca/plugin-rtmp/tar.gz/refs/heads/v4","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-rtmp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278518899,"owners_count":26000177,"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-10-05T02:00:06.059Z","response_time":54,"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":["rtmp"],"created_at":"2024-11-11T21:18:20.532Z","updated_at":"2025-10-05T20:57:01.045Z","avatar_url":"https://github.com/Monibuca.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RTMP插件\nrtmp插件提供rtmp协议的推拉流能力，以及向远程服务器推拉rtmp协议的能力。\n\n## 仓库地址\n\nhttps://github.com/Monibuca/plugin-rtmp\n\n## 引入\n```go\nimport _ \"m7s.live/plugin/rtmp/v4\"\n```\n\n## 推拉地址形式\n```\nrtmp://localhost/live/test\n```\n- `localhost`是m7s的服务器域名或者IP地址，默认端口`1935`可以不写，否则需要写\n- `live`代表`appName`\n- `test`代表`streamName`\n- m7s中`live/test`将作为`streamPath`为流的唯一标识\n\n\n例如通过ffmpeg向m7s进行推流\n\n```bash\nffmpeg -i [视频源] -c:v h264 -c:a aac -f flv rtmp://localhost/live/test\n```\n\n会在m7s内部形成一个名为live/test的流\n\n\n如果m7s中已经存在live/test流的话就可以用rtmp协议进行播放\n```bash\nffplay -i rtmp://localhost/live/test\n```\n\n\n## 配置\n\n```yaml\nrtmp:\n    publish: # 参考全局配置格式\n    subscribe: # 参考全局配置格式\n    tcp:\n        listenaddr: :1935\n        listenaddrtls: \"\"  # 用于RTMPS协议\n        certfile: \"\"\n        keyfile: \"\"\n        listennum: 0\n        nodelay: false\n    pull: # 格式参考文档 https://m7s.live/guide/config.html#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE\n    push: # 格式参考文档 https://m7s.live/guide/config.html#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE\n    chunksize: 65536 # rtmp chunk size\n    keepalive: false #保持rtmp连接，默认随着stream的close而主动断开\n```\n:::tip 配置覆盖\npublish\nsubscribe\n两项中未配置部分将使用全局配置\n:::\n\n## API\n### `rtmp/api/list`\n获取所有rtmp流\n\n### `rtmp/api/pull?target=[RTMP地址]\u0026streamPath=[流标识]\u0026save=[0|1|2]`\n从远程拉取rtmp到m7s中\n- save含义：0、不保存；1、保存到pullonstart；2、保存到pullonsub\n- RTMP地址需要进行urlencode 防止其中的特殊字符影响解析\n### `rtmp/api/push?target=[RTMP地址]\u0026streamPath=[流标识]`\n将本地的流推送到远端","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-rtmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonibuca%2Fplugin-rtmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-rtmp/lists"}