{"id":13766832,"url":"https://github.com/globocom/hlsclient","last_synced_at":"2026-01-11T03:50:58.393Z","repository":{"id":3134067,"uuid":"4162449","full_name":"globocom/hlsclient","owner":"globocom","description":"Python HLS Client","archived":true,"fork":false,"pushed_at":"2016-06-02T19:47:30.000Z","size":1567,"stargazers_count":105,"open_issues_count":11,"forks_count":21,"subscribers_count":105,"default_branch":"master","last_synced_at":"2025-04-06T08:36:37.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/globocom.png","metadata":{"files":{"readme":"README.rst","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":"2012-04-27T20:57:52.000Z","updated_at":"2024-03-25T03:00:37.000Z","dependencies_parsed_at":"2022-09-21T09:44:40.843Z","dependency_job_id":null,"html_url":"https://github.com/globocom/hlsclient","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fhlsclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fhlsclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fhlsclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fhlsclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globocom","download_url":"https://codeload.github.com/globocom/hlsclient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492529,"owners_count":21916959,"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-08-03T16:01:01.550Z","updated_at":"2026-01-11T03:50:58.306Z","avatar_url":"https://github.com/globocom.png","language":"Python","funding_links":[],"categories":["HarmonyOS","Protocols \u0026 Transport"],"sub_categories":["Windows Manager","Adaptive Streaming"],"readme":"hls-client\n==========\n\nThis is a simple Python `HTTP Live Streaming Client`_. It consumes a\nlist of remote playlists, and saves all needed files to serve the\nplaylist locally: the key, segments, and a modified ``m3u8`` with paths\nnormalized.\n\nIt also supports backups, i.e., if the same playlist is available on\nmore than one server, it will track each server status and will switch\nto the backup if needed.\n\nThrough the ``config.ini`` it's possible to customize where the files\nwill be saved and what is the URL that provides servers info via JSON.\n\nThe JSON must be something like:\n\n::\n\n    {\n        \"streams\": [\n            \"nasa\": {\n                \"input-path\": \"/msfc/Edge.m3u8\",\n                servers: [\n                    \"http://liveips.nasa.gov.edgesuite.net\"\n                ]\n            }\n        ]\n    }\n\n\nVariant Playlist Generation\n---------------------------\n\n``hlslcient`` can consume multiple playlists and generate a variant playlists grouping then.\n\nTo do so, include a ``bandwidth`` for each stream and add an action to combine them in the JSON:\n\n::\n\n    {\n        \"streams\": {\n            \"Nasa-low\": {\n                \"input-path\": \"/msfc/Edge.m3u8\",\n                \"servers\": [\"http://liveips.nasa.gov.edgesuite.net\"],\n                \"bandwidth\": 254082\n            },\n            \"Nasa-medium\": {\n                \"input-path\": \"/msfc/3G.m3u8\",\n                \"servers\": [\"http://liveips.nasa.gov.edgesuite.net\"],\n                \"bandwidth\": 460658\n            },\n            \"Nasa-high\": {\n                \"input-path\": \"/msfc/Wifi.m3u8\",\n                \"servers\": [\"http://liveips.nasa.gov.edgesuite.net\"],\n                \"bandwidth\": 1080434\n            }\n        },\n\n        \"actions\": [\n            {\n                \"type\": \"combine\",\n                \"input\": [\"Nasa-low\", \"Nasa-medium\", \"Nasa-high\"],\n                \"output\": \"/msfc/nasa_mbr.m3u8\"\n            }\n        ]\n    }\n\n\nTranscoding\n-----------\n\n``hlsclient`` is also able to create an audio only track from a video stream using FFMPEG.\n\nTo do so, add a ``transcode`` action an include the new stream on a combine action:\n\n::\n\n    \"actions\": [\n        {\n            \"type\": \"combine\",\n            \"input\": [\"Nasa-audio-only\", \"Nasa-low\", \"Nasa-medium\", \"Nasa-high\"],\n            \"output\": \"/msfc/nasa_mbr.m3u8\"\n        },\n        {\n            \"type\": \"transcode\",\n            \"input\": \"Nasa-low\",\n            \"output\": {\n                \"audio\": {\n                    \"Nasa-audio-only\": {\n                        \"path\": \"Nasa-audio-only.m3u8\",\n                        \"audio-bitrate\": 64000,\n                        \"bitrate\": 65000\n                    }\n                }\n            }\n        }\n    ]\n\n\nEncryption\n----------\n\nIf you set ``encryption=true`` in the config file, ``hlsclient`` will\nautomatically encrypt all streams with a random AES-128 cipher.\n\n\nRunning\n-------\n\nTo run the client, simply run:\n\n::\n\n    $ python -m hlsclient\n\nRunning tests\n-------------\n\nYou will need ffmpeg and mediainfo installed.\n\n::\n\n    $ ./runtests\n\n.. _HTTP Live Streaming Client: https://developer.apple.com/resources/http-streaming/\n\n\nFFmpeg Installation\n-------------------\n\nIn order to use the current version of hlsclient with transcoding support,\nyou must have ffmpeg installed with libaac and libx264. Download them and\ncompile FFfmpeg like this:\n\n* `libaac`::\n\n  ./configure \u0026\u0026 make \u0026\u0026 sudo make install\n\n* `libx264`::\n\n  ./configure --enable-shared \u0026\u0026 make \u0026\u0026 sudo make install\n\n* `FFmpeg`::\n\n  ./configure --enable-libx264 --enable-gpl --enable-libfaac --enable-nonfree --enable-shared \u0026\u0026 make \u0026\u0026 sudo make install\n\n\nThe tested versions were:\n\n* `libaac`: faac-1.28\n* `libx264`: x264-snapshot-20121030-2245\n* `FFmpeg`: N-46213-g976175f\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fhlsclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobocom%2Fhlsclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fhlsclient/lists"}