{"id":15685342,"url":"https://github.com/jooola/earhorn","last_synced_at":"2025-05-07T17:01:47.936Z","repository":{"id":36955786,"uuid":"418888820","full_name":"jooola/earhorn","owner":"jooola","description":"Listen, monitor and archive your Icecast streams!","archived":false,"fork":false,"pushed_at":"2025-04-24T15:33:48.000Z","size":1311,"stargazers_count":10,"open_issues_count":11,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T16:47:55.986Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jooola.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2021-10-19T11:10:49.000Z","updated_at":"2025-04-02T03:19:13.000Z","dependencies_parsed_at":"2023-10-03T04:11:57.387Z","dependency_job_id":"30f63993-4b22-4656-b80b-ce5af324071a","html_url":"https://github.com/jooola/earhorn","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jooola%2Fearhorn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jooola%2Fearhorn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jooola%2Fearhorn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jooola%2Fearhorn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jooola","download_url":"https://codeload.github.com/jooola/earhorn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252921989,"owners_count":21825632,"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-10-03T17:24:54.157Z","updated_at":"2025-05-07T17:01:47.762Z","avatar_url":"https://github.com/jooola.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# earhorn\n\nListen, monitor and archive your streams!\n\n[![](https://mermaid.ink/svg/pako:eNqNlD9PwzAQxb_KySNqFySWqCoDMLAw0AEhgiorvhIriV1dnAJCfHcuzj8nzsDmvHv383Muzo_IrEKRiNpJh_dafpCstpfr1AB4CVJxcJIc4AWNg1waVSKlAmTdGsgdB4k73q7eYbvdLwsx7Ey2QpdjU4ekQO06JkiADV0TWZ-O7aI-NlTCbpflVme436-DQnMCj35_V0PbqvCkDSq4jUN3ppU34AutfxZiSuy1BF4xTkwoq_9HHtx95vYxDj3ntr1ZjlnRi1GMVNy1ZSCsLD92ru50Yd9ablvEsUcEl06Wiq4QkhbHsYU_DQ90aGTsbZdwtlX3PoMzLOdT6tqhmY9m1CK3pCzXl7l71Lx7DLuGWhSnznCn58Z0eGqM0eZjGu0A84ioOtCW1X7pZb5rCTx8abe4X2gUIJElcHb10rLh6A1L4lRh8GCIRxC4nux88xepHfDU4YZtmTWqv96frE8Y3zFSPDQ2zJXoMxYbUSFVUiv-d_20DangT6jCVCS85Ashm9KlIjW_bG3OigM-KO0sieQkyxo3QjbOHr5NJhJHDQ6m_hfYu37_AFEs0XE)](https://mermaid.live/edit#pako:eNqNlD9PwzAQxb_KySNqFySWqCoDMLAw0AEhgiorvhIriV1dnAJCfHcuzj8nzsDmvHv383Muzo_IrEKRiNpJh_dafpCstpfr1AB4CVJxcJIc4AWNg1waVSKlAmTdGsgdB4k73q7eYbvdLwsx7Ey2QpdjU4ekQO06JkiADV0TWZ-O7aI-NlTCbpflVme436-DQnMCj35_V0PbqvCkDSq4jUN3ppU34AutfxZiSuy1BF4xTkwoq_9HHtx95vYxDj3ntr1ZjlnRi1GMVNy1ZSCsLD92ru50Yd9ablvEsUcEl06Wiq4QkhbHsYU_DQ90aGTsbZdwtlX3PoMzLOdT6tqhmY9m1CK3pCzXl7l71Lx7DLuGWhSnznCn58Z0eGqM0eZjGu0A84ioOtCW1X7pZb5rCTx8abe4X2gUIJElcHb10rLh6A1L4lRh8GCIRxC4nux88xepHfDU4YZtmTWqv96frE8Y3zFSPDQ2zJXoMxYbUSFVUiv-d_20DangT6jCVCS85Ashm9KlIjW_bG3OigM-KO0sieQkyxo3QjbOHr5NJhJHDQ6m_hfYu37_AFEs0XE)\n\n## Install\n\nIf you need to listen or archive an Icecast stream, you will need `ffmpeg`:\n\n```sh\nsudo apt install ffmpeg\n```\n\nInstall earhorn from pip (install the s3 extra to upload the segment to an s3 bucket):\n\n```sh\npipx install earhorn\npipx install earhorn[s3]\n```\n\nYou can start archiving an Icecast stream by providing a stream url and an archive path:\n\n```sh\nearhorn \\\n  --stream-url https://stream.example.org/live.ogg \\\n  --archive-path=/to/my/archive\n```\n\nYou can also start exporting the Icecast stats as prometheus metrics by providing an Icecast stats url:\n\n```sh\nearhorn \\\n  --stats-url https://stream.example.org/admin/stats.xml \\\n  --stats-user admin \\\n  --stats-password hackme\n```\n\n### Docker\n\n```sh\ndocker pull ghcr.io/jooola/earhorn\n```\n\n## Usage\n\n```\nUsage: earhorn [OPTIONS]\n\n  ENVIRONMENT VARIABLES:\n\n  If a `.env` file is present in the current directory, it will be loaded and can be used to pass environment\n  variables to this tool.\n\n  ARCHIVE STORAGE:\n\n  The storage can be defined using a path to a local directory or an url to an s3 bucket. Segments will be saved on\n  the storage you specified.\n\n  To use an s3 bucket, you need to install the `s3` extras (`pip install earhorn[s3]`), use `s3://bucket-name` as\n  value for the `--archive-path` option and export the s3 bucket credentials listed in the table below:\n\n  | Variable                | Description                               | Example                     |\n  | ----------------------- | ----------------------------------------- | --------------------------- |\n  | AWS_ACCESS_KEY_ID       | The access key for your bucket user       | AKIA568knmklmk              |\n  | AWS_SECRET_ACCESS_KEY   | The secret key for your bucket user       | mi0y84wu498zxsasa           |\n  | AWS_S3_ENDPOINT_URL     | The endpoint to your s3 bucket (optional) | https://s3.nl-ams.scw.cloud |\n  | AWS_S3_REGION_NAME      | Region of your s3 bucket                  | us-east-2                   |\n\n  Example: export AWS_S3_ENPOINT_URL=\"https://s3.nl-ams.scw.cloud\"\n\n  ARCHIVE SEGMENTS:\n\n  To change the segments duration or format, see the ffmpeg documentation for details\n  about the available options:\n  https://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c-ssegment\n\nOptions:\n  --listen-port INTEGER           Listen port for the prometheus metrics endpoint.  [default: 9950]\n  --hook PATH                     Path to a custom script executed to handle stream state `events`.\n  --stats-url TEXT                URL to the icecast admin xml stats page.\n  --stats-user TEXT               Username for the icecast admin xml stats page.  [default: admin]\n  --stats-password TEXT           Password for the icecast admin xml stats page.\n  --stream-url TEXT               URL to the icecast stream.\n  --silence-detect-noise TEXT     Silence detect noise.  [default: -60dB]\n  --silence-detect-duration TEXT  Silence detect duration.  [default: 2]\n  --archive-path PATH             Path or url to the archive storage, supported storage are local filesystem and s3.\n                                  If defined, the stream will be archived in the storage as segments.\n  --archive-segment-filepath TEXT\n                                  Archive segment filepath.  [default:\n                                  {year}/{month}/{day}/{hour}{minute}{second}.{format}]\n  --archive-segment-size INTEGER  Archive segment size in seconds.  [default: 3600]\n  --archive-segment-format TEXT   Archive segment format.  [default: ogg]\n  --archive-segment-format-options TEXT\n                                  Archive segment format options.\n  --archive-copy-stream           Copy the `stream` without transcoding (reduce CPU usage). WARNING: The stream has to\n                                  be in the same format as the `--archive-segment-format`.\n  --help                          Show this message and exit.\n\n```\n\n## Developmement\n\nTo develop this project, start by reading the `Makefile` to have a basic understanding of the possible tasks.\n\nInstall the project and the dependencies in a virtual environment:\n\n```sh\nmake install\nsource .venv/bin/activate\nearhorn --help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjooola%2Fearhorn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjooola%2Fearhorn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjooola%2Fearhorn/lists"}