{"id":19177921,"url":"https://github.com/eyevinn/hls-repeat","last_synced_at":"2025-07-04T07:37:51.099Z","repository":{"id":40724911,"uuid":"251643695","full_name":"Eyevinn/hls-repeat","owner":"Eyevinn","description":"NPM library to repeat an HLS VOD and create a new HLS VOD","archived":false,"fork":false,"pushed_at":"2023-10-19T23:42:55.000Z","size":197,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-07T20:42:40.513Z","etag":null,"topics":["library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eyevinn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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-03-31T15:19:39.000Z","updated_at":"2023-05-03T00:29:50.000Z","dependencies_parsed_at":"2024-06-19T22:50:11.685Z","dependency_job_id":"7d5e8888-fbfe-46ee-80ca-b006f6867199","html_url":"https://github.com/Eyevinn/hls-repeat","commit_stats":{"total_commits":29,"total_committers":3,"mean_commits":9.666666666666666,"dds":0.4137931034482759,"last_synced_commit":"c09e36f7462814db10e9d37266c02fcb49c14723"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fhls-repeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fhls-repeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fhls-repeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fhls-repeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eyevinn","download_url":"https://codeload.github.com/Eyevinn/hls-repeat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954127,"owners_count":21830893,"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":["library"],"created_at":"2024-11-09T10:35:48.272Z","updated_at":"2025-07-04T07:37:51.088Z","avatar_url":"https://github.com/Eyevinn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hls-repeat\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Coverage Status](https://coveralls.io/repos/github/Eyevinn/hls-repeat/badge.svg?branch=master)](https://coveralls.io/github/Eyevinn/hls-repeat?branch=master) [![Slack](http://slack.streamingtech.se/badge.svg)](http://slack.streamingtech.se)\n\nNode library to create an HLS by repeating the content of an HLS VOD. Supports video, audio, and subtitle tracks.\n\n## Installation\n\n```\nnpm install --save @eyevinn/hls-repeat\n```\n\n## Usage\n\nThe code below shows an example on how an HLS VOD of three seconds can be repeated into a new VOD of 9 seconds.\n\n```javascript\nconst hlsVod = new HLSRepeatVod('http://testcontent.eyevinn.technology/slates/ottera/playlist.m3u8', 3);\nhlsVod.load()\n.then(() =\u003e {\n  // Get video manifest\n  const mediaManifest = hlsVod.getMediaManifest(4928000);\n  console.log(mediaManifest);\n  \n  // If the source has audio tracks\n  const audioManifest = hlsVod.getAudioManifest(\"aac\", \"en\");\n  console.log(audioManifest);\n  \n  // If the source has subtitle tracks\n  const subtitleManifest = hlsVod.getSubtitleManifest(\"text\", \"en\");\n  console.log(subtitleManifest);\n});\n```\n\n### Demuxed Content Support\n\nThe library supports demuxed HLS content with separate audio and subtitle tracks:\n\n- **Video**: Main video tracks with different bandwidths\n- **Audio**: Multiple audio tracks with different languages\n- **Subtitles**: Multiple subtitle tracks with different languages\n\nFor each type of track, the library will:\n1. Parse the master manifest to identify all tracks\n2. Load each track's manifest\n3. Repeat the segments according to the specified repetition count\n4. Add discontinuity markers between repetitions\n5. Provide methods to access the repeated manifests\n\n## How It Works\n\nWhat this library does can be illustrated by this simplified example below.\n\nConsider the following:\n\n```\n#EXTM3U\n#EXT-X-TARGETDURATION:3\n#EXT-X-ALLOW-CACHE:YES\n#EXT-X-PLAYLIST-TYPE:VOD\n#EXT-X-VERSION:3\n#EXT-X-INDEPENDENT-SEGMENTS\n#EXT-X-MEDIA-SEQUENCE:1\n#EXTINF:3.000,\nsegment1_0_av.ts\n#EXT-X-ENDLIST\n```\n\nand with this library we can generate a new VOD by repeating this for example three times. This will result in:\n\n```\n#EXTM3U\n#EXT-X-TARGETDURATION:3\n#EXT-X-ALLOW-CACHE:YES\n#EXT-X-PLAYLIST-TYPE:VOD\n#EXT-X-VERSION:3\n#EXT-X-INDEPENDENT-SEGMENTS\n#EXT-X-MEDIA-SEQUENCE:1\n#EXT-X-DISCONTINUITY\n#EXTINF:3.000,\nsegment1_0_av.ts\n#EXT-X-DISCONTINUITY\n#EXTINF:3.000,\nsegment1_0_av.ts\n#EXT-X-DISCONTINUITY\n#EXTINF:3.000,\nsegment1_0_av.ts\n#EXT-X-ENDLIST\n```\n\nThe same process is applied to audio and subtitle tracks, ensuring all tracks are repeated the same number of times with proper discontinuity markers.\n\n# Authors\n\nThis open source project is maintained by Eyevinn Technology.\n\n## Contributors\n\n- Jonas Rydholm Birmé (jonas.birme@eyevinn.se)\n\n## Attributions\n\n\u003cimg src=\"http://ottera.tv/wp-content/uploads/2019/04/Logo-1.png\" width=\"100\" title=\"OTTera logo\"\u003e\n\nA special thanks to [OTTera](http://ottera.tv) for funding the start of this project. OTTera is a US based company that powers OTT and Linear Video services with over 45 million users worldwide.\n\n# [Contributing](CONTRIBUTING.md)\n\nIn addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. \n\n# License (MIT)\n\nCopyright 2020 Eyevinn Technology AB\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n# About Eyevinn Technology\n\nEyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in a way that we are not commercially tied to any platform or technology vendor.\n\nAt Eyevinn, every software developer consultant has a dedicated budget reserved for open source development and contribution to the open source community. This give us room for innovation, team building and personal competence development. And also gives us as a company a way to contribute back to the open source community.\n\nWant to know more about Eyevinn and how it is to work here. Contact us at work@eyevinn.se!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyevinn%2Fhls-repeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyevinn%2Fhls-repeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyevinn%2Fhls-repeat/lists"}