{"id":19703555,"url":"https://github.com/monibuca/plugin-record","last_synced_at":"2025-04-06T03:07:46.796Z","repository":{"id":37705171,"uuid":"256197842","full_name":"Monibuca/plugin-record","owner":"Monibuca","description":"提供直播流录制以及回放功能。目前支持录制成flv格式","archived":false,"fork":false,"pushed_at":"2024-12-13T09:09:41.000Z","size":283,"stargazers_count":42,"open_issues_count":11,"forks_count":37,"subscribers_count":2,"default_branch":"v4","last_synced_at":"2025-03-30T02:05:36.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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-16T11:42:15.000Z","updated_at":"2024-11-11T06:16:35.000Z","dependencies_parsed_at":"2023-02-18T04:35:16.643Z","dependency_job_id":"b1bea2a2-4e2b-4ead-87ac-126a0040e294","html_url":"https://github.com/Monibuca/plugin-record","commit_stats":null,"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-record","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-record/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-record/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-record/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Monibuca","download_url":"https://codeload.github.com/Monibuca/plugin-record/tar.gz/refs/heads/v4","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937201,"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-11-11T21:18:13.951Z","updated_at":"2025-04-06T03:07:46.779Z","avatar_url":"https://github.com/Monibuca.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RECORD插件\n\n对流进行录制的功能插件，提供Flv、fmp4、hls、裸流格式的录制功能。\n\n## 插件地址\n\nhttps://github.com/Monibuca/plugin-record\n\n## 插件引入\n```go\nimport (\n    _ \"m7s.live/plugin/record/v4\"\n)\n```\n## 配置\n\n- 配置中的path 表示要保存的文件的根路径，可以使用相对路径或者绝对路径\n- filter 代表要过滤的StreamPath正则表达式，如果不匹配，则表示不录制。为空代表不进行过滤\n- fragment表示分片大小（20s代表20秒，1m代表1分钟，可以组合），0代表不分片\n\n```yaml\nrecord:\n  subscribe: # 参考全局配置格式\n  flv:\n      ext: .flv\n      path: record/flv\n      autorecord: false\n      filter: \"\"\n      fragment: 0\n  mp4:\n      ext: .mp4\n      path: record/mp4\n      autorecord: false\n      filter: \"\"\n      fragment: 0\n  hls:\n      ext: .m3u8\n      path: record/hls\n      autorecord: false\n      filter: \"\"\n      fragment: 0\n  raw:\n      ext: .\n      path: record/raw\n      autorecord: false\n      filter: \"\"\n      fragment: 0\n```\n\n## API\n\n- `/record/api/list/recording` 罗列所有正在录制中的流的信息\n- `/record/api/list?type=[flv|mp4|hls|raw]` 罗列所有录制的flv|mp4|m3u8|raw文件\n- `/record/api/start?type=flv\u0026streamPath=live/rtc\u0026fileName=xxx\u0026fragment=10s` 开始录制某个流,返回一个字符串用于停止录制用的id(fileName是可选的，且只用于非切片情况,fragment用于覆盖配置中的切片时间，是可选的，如果fileName和fragment都存在，则忽略fileName)\n- `/record/api/stop?id=xxx` 停止录制某个流\n\n## 点播功能\n\n访问格式：\n [http/https]://[host]:[port]/record/[streamPath].[flv|mp4|m3u8|h264|h265]\n\n例如：\n- `http://localhost:8080/record/live/test.flv` 将会读取对应的flv文件\n- `http://localhost:8080/record/live/test.mp4` 将会读取对应的fmp4文件\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-record","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonibuca%2Fplugin-record","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-record/lists"}