{"id":13610529,"url":"https://github.com/gitfu/manifesto","last_synced_at":"2025-04-12T22:34:09.678Z","repository":{"id":57606219,"uuid":"107332978","full_name":"gitfu/manifesto","owner":"gitfu","description":"Manifesto is an HLS tool for creating multiple variants, a master.m3u8 file, and converting 608 captions to segmented webvtt subtitles via ffmpeg.","archived":false,"fork":false,"pushed_at":"2018-01-01T18:15:09.000Z","size":75,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-07T16:43:58.712Z","etag":null,"topics":["ffmpeg","hls","m3u","multiple-variants","segmented-webvtt-subtitles","variants","video","webvtt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitfu.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}},"created_at":"2017-10-17T22:58:54.000Z","updated_at":"2024-06-16T09:32:35.000Z","dependencies_parsed_at":"2022-08-26T17:12:59.384Z","dependency_job_id":null,"html_url":"https://github.com/gitfu/manifesto","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfu%2Fmanifesto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfu%2Fmanifesto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfu%2Fmanifesto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfu%2Fmanifesto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitfu","download_url":"https://codeload.github.com/gitfu/manifesto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248642248,"owners_count":21138350,"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":["ffmpeg","hls","m3u","multiple-variants","segmented-webvtt-subtitles","variants","video","webvtt"],"created_at":"2024-08-01T19:01:45.592Z","updated_at":"2025-04-12T22:34:09.438Z","avatar_url":"https://github.com/gitfu.png","language":"Go","funding_links":[],"categories":["Go","HarmonyOS","Adaptive Streaming \u0026 Manifest Tools"],"sub_categories":["Windows Manager","HLS Tools"],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/gitfu/manifesto)](https://goreportcard.com/report/github.com/gitfu/manifesto)\n\n# Manifesto\nManifesto is an HLS tool for creating multiple variants, a master.m3u8 file, and converting 608 captions to segmented webvtt subtitles via ffmpeg.\n\n## ``` Setup ```\n\n#### ```Required``` \n* Go \n* Ffmpeg\n\n#### ```Install go```\n      https://golang.org/doc/install\n\n#### ```Set your Environment```\n```\nmkdir  ~/go\nexport GOPATH=~/go\n```\n#### ``` Add one library ```\n```\ngo get -u github.com/logrusorgru/aurora\n```\n\n#### ```Install ffmpeg with libx264 support```\n\n\n#### ```Git clone the repo ```\n```\ngit clone https://github.com/gitfu/manifesto\ncd manifesto\ngo build manifesto.go\n```\n\n## ``` How It Works ```\n\nManifesto transcodes and segments video into multiple variants and creates the master.m3u8 file. \n608 Closed captions are extracted and converted to webvtt segment files.\n\n\n## ``` Quick Start```\n\n* ``` cd ~/manifesto ```\n* ``` ./manifesto -i vid.ts ```\n\nThis will create the following directory structure and files \n\n```\nvid:\nhd720  low640  master.m3u8  med960  subs\n\nvid/med960:\nindex0.ts  index1.ts  index2.ts  index3.ts  index4.ts  index.m3u8\n\nvid/hd720:\nindex0.ts   index1.ts   index2.ts   index3.ts   index4.ts   index.m3u8\n\nvid/low640:\nindex0.ts   index1.ts   index2.ts   index3.ts   index4.ts   index.m3u8\n\nvid/subs:\nindex0.vtt  index1.vtt  index2.vtt  index3.vtt  index4.vtt  index_vtt.m3u8\n```\n\n* The default toplevel directory name is the video file name without the file extention.\n* The variants are read from the hls.json file, variants can be added or removed as needed. \n* The command used to traanscode is specified in the cmd.template file, it can be modified. \n\n### ```Command line switches```\n```\n\n  -d string\n    \toverride top level directory for hls files (optional)\n  -i string\n    \tVideo file to segment (either -i or -b is required)\n  -j string\n    \tJSON file of variants (optional) (default \"./hls.json\")\n  -s string\n    \tsubtitle file to segment (optional)\n  -t string\n    \tcommand template file (optional) (default \"./cmd.template\")\n  -u string\n    \turl prefix to add to index.m3u8 path in master.m3u8 (optional)\n\n```\n\n## ``` Usage ```\n\n```\n./manifesto -i vid.mp4\n```\n\n* This is single mode a master.m3u8 and variants will be created in a new directory named vid. It will also attempt to extract 608 captions and convert them to segmented webvtt subtitles. \n\n###\n\n\n```\n./manifesto -i vid.mp4 -s sub.srt\n```\n* As above but instead of extracting 608 captions, sub.srt will be converted to a webvtt file and then segmented.\n\n###\n\n```\n./manifesto -i vid.mp4 -s sub.srt -u http://example.com\n```\n* As above and also adds the url prefix to each variant listed in the m3u8 file. \n\n\n\n# How to Modify\n\n* manifesto  works right of the box.I wanted it to be easy to use with minimal configuation needed. \nIf you do feel the need to tune it a bit. \n\n\n##  ```Variants``` \n\n\n* Variant data is stored in the hls.json file. \n* Add or edit or remove as desired.\n\n```\n[\n{\"name\": \"med960\", \"aspect\": \"960x540\", \"framerate\":\"29.97\",\"vbitrate\": \"2000\",\"bufsize\":\"4000\",\"abitrate\": \"96k\"}\n,{\"name\": \"low640\", \"aspect\": \"640x360\", \"framerate\":\"29.97\",\"vbitrate\": \"730\",\"bufsize\":\"1460\",\"abitrate\": \"64k\"}\n,{\"name\":\"hd720\",\"aspect\": \"1280x720\", \"framerate\" :\"29.97\",\"vbitrate\": \"4500\",\"bufsize\":\"9000\",\"abitrate\": \"128k\"}\n]\n```\n\n## ```Modifying The Ffmpeg Command```\n\n\n* cmd.template is the default ffmeg command template \n* NAME,ASPECT,FRAMERATE,VBITRATE,BUFSIZE,ABITRATE will be replaced with variant's values from hls.json.\n* Newlines are stripped. \n\n \n ## ```Values in the master.m3u8 file```\n \nThe values used in the master.m3u8 file are read an /or calculated for each variant \nas follows.\n\n* Bandwidth ( bit_rate is parsed the mpegts container ) \n* Resolution ( width and height for the video resolution are parsed from the video stream) \n* Level     ( video level is parsed from the video stream )\n* Profile  (video profile is parsed from the video stream, audio profile from the audio stream)\n* Codecs  (Calculated as described here  https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/FrequentlyAskedQuestions/FrequentlyAskedQuestions.html )\n```\n#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=%v,RESOLUTION=%s,CODECS=\\\"avc1.%v00%x%v\\\"\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitfu%2Fmanifesto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitfu%2Fmanifesto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitfu%2Fmanifesto/lists"}