{"id":19703565,"url":"https://github.com/monibuca/plugin-hls","last_synced_at":"2025-09-12T04:31:29.718Z","repository":{"id":39160345,"uuid":"255871857","full_name":"Monibuca/plugin-hls","owner":"Monibuca","description":"HLS协议的实现，提供HLS协议拉流，和HLS的写磁盘功能","archived":false,"fork":false,"pushed_at":"2024-07-09T11:52:42.000Z","size":3477,"stargazers_count":40,"open_issues_count":7,"forks_count":40,"subscribers_count":2,"default_branch":"v4","last_synced_at":"2025-04-12T18:42:14.490Z","etag":null,"topics":["hls"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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.en.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-15T09:44:04.000Z","updated_at":"2024-07-09T11:52:46.000Z","dependencies_parsed_at":"2023-10-23T02:29:41.313Z","dependency_job_id":"18605043-8f46-452c-9d15-a816196d1364","html_url":"https://github.com/Monibuca/plugin-hls","commit_stats":{"total_commits":113,"total_committers":5,"mean_commits":22.6,"dds":0.04424778761061943,"last_synced_commit":"0056f41231fbee6065d20f73d2f668e831f428e9"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/Monibuca/plugin-hls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-hls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-hls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-hls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-hls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Monibuca","download_url":"https://codeload.github.com/Monibuca/plugin-hls/tar.gz/refs/heads/v4","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-hls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274753611,"owners_count":25342825,"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-09-12T02:00:09.324Z","response_time":60,"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":["hls"],"created_at":"2024-11-11T21:18:15.590Z","updated_at":"2025-09-12T04:31:29.036Z","avatar_url":"https://github.com/Monibuca.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HLS plugin\n\n- This plugin can be used to pull m3u8 files on the network and parse them into other protocols after parsing\n- You can directly access `http://localhost:8080/hls/live/user1.m3u8` for playback, where port 8080 is the global HTTP configuration, live/user1 is streamPath, which needs to be modified according to the actual situation\n\n## Plugin address\n\nhttps://github.com/Monibuca/plugin-hls\n\n## Plugin introduction\n\n```go\nimport (\n    _ \"m7s.live/plugin/hls/v4\"\n)\n```\n\n## API\n\u003e The parameters are variable. The following parameters live/hls are used as examples, not fixed\n- `/hls/api/list`\nList all HLS streams, is an SSE, can continue to receive the list data, plus?json=1 can return json data.\n- `/hls/api/save?streamPath=live/hls`\nSave the specified stream (such as live/hls) as an HLS file (m3u8 and ts) when this request is closed, the save ends (this API only works for remote pulling)\n- `/hls/api/pull?streamPath=live/hls\u0026target=http://localhost/abc.m3u8`\nPull the target HLS stream over as a media source in monibuca in the form of `live/hls` stream\n- llhls address form `http://localhost:8080/llhls/live/user1/index.m3u8` for playback, where port 8080 is the global HTTP configuration, live/user1 is streamPath, which needs to be modified according to the actual situation\n## Configuration\n- The configuration information is added to the configuration file as needed, and there is no need to copy all the default configuration information\n- The publish and subscribe configurations will override the global configuration\n```yaml\nhls:\n    publish: # Format reference global configuration\n    subscribe: # Format reference global configuration\n    pull: # Format https://m7s.live/guide/config.html#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE\n    fragment: 10s # TS fragment length\n    window: 2 # The number of TS files included in the real-time stream m3u8 file\n    filter: \"\" # Regular expression used to filter published streams, only streams that match will be written\n    path: \"\" # If the remote stream needs to be saved, the directory where it is stored\n    defaultts: \"\" # The default slice is used for the slice header playback when there is no stream. If it is empty, the system built-in is used\n    defaulttsduration: 3.88s # The length of the default slice\n    relaymode: 0 # Forwarding mode, 0: transfer protocol + no forwarding, 1: no transfer protocol + forwarding, 2: transfer protocol + forwarding\n```\n\n## Relay mode\n\nThe relay mode only works for hls that pulls streams from the remote end.\n\nrelaymode can be configured with different forwarding modes\n\nAmong them, protocol conversion means that HLS can pull streams and convert them to other protocol formats, which requires parsing of HLS data,\n\nForwarding means that the TS files in HLS are cached on the server and can be directly read when pulling streams from the server.\n\nFor example, if you want to only do pure forwarding for HLS and reduce CPU consumption, you can configure\n\n```yaml\nhls:\n  relaymode: 1\n```\n## HLS.js test page\n\nAccess `http://localhost:8080/hls/index.html`\n\nModify the domain name and port according to the actual situation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-hls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonibuca%2Fplugin-hls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-hls/lists"}