{"id":26495975,"url":"https://github.com/runabol/streamabol","last_synced_at":"2025-03-20T11:20:04.611Z","repository":{"id":282756229,"uuid":"949220117","full_name":"runabol/streamabol","owner":"runabol","description":"Convert video files to HLS streams on the fly","archived":false,"fork":false,"pushed_at":"2025-03-16T19:35:38.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T19:36:07.314Z","etag":null,"topics":["ffmpeg","golang","hls","real-time-video-streaming","video-processing","video-streaming"],"latest_commit_sha":null,"homepage":"","language":"Go","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/runabol.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-16T00:04:38.000Z","updated_at":"2025-03-16T19:35:41.000Z","dependencies_parsed_at":"2025-03-16T19:36:14.130Z","dependency_job_id":"3b993b65-b413-4d0e-ba31-b10271ad3745","html_url":"https://github.com/runabol/streamabol","commit_stats":null,"previous_names":["runabol/streamabol"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runabol%2Fstreamabol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runabol%2Fstreamabol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runabol%2Fstreamabol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runabol%2Fstreamabol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runabol","download_url":"https://codeload.github.com/runabol/streamabol/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244600725,"owners_count":20479307,"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","golang","hls","real-time-video-streaming","video-processing","video-streaming"],"created_at":"2025-03-20T11:20:03.974Z","updated_at":"2025-03-20T11:20:04.582Z","avatar_url":"https://github.com/runabol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streamabol\n\nStreamabol is a lightweight Golang application that converts video files into HLS (HTTP Live Streaming) streams on the fly. It takes a video URL as input and generates an HLS-compliant manifest (`.m3u8`) along with segmented video streams, making it ideal for real-time video streaming applications.\n\n![Player](screenshot_v2.jpg)\n\n## Features\n- Converts video files to HLS streams dynamically\n- Supports remote video URLs as input\n- Simple HTTP API for generating HLS manifests\n- Lightweight and efficient, built with Go\n- Signed URLs to prevent tampering\n\n## Quickstart\n\nTo quickly get started with Streamabol, you can use the prebuilt Docker image:\n\n```bash\ndocker run -it --rm --name=streamabol -p 8080:8080 runabol/streamabol\n```\n\nPlay a sample HLS stream: \n\n```bash\nhttps://hls-player-demo.vercel.app?src=http://localhost:8080/manifest.m3u8?src=http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4\n```\n\n## URL Signing (Optional)\n\nYou can sign Streamabol URLs to secure your video streams, prevent unauthorized access, and ensure URL integrity by preventing tampering. This feature ensures that only clients with valid signed URLs can access the HLS manifests and video segments. When enabled, all incoming requests must include a valid `hmac` query parameter to be processed.\n\n### Enabling HMAC Verification\nTo enable HMAC verification, set the `SECRET_KEY` environment variable to your desired secret key. If `SECRET_KEY` is not set, HMAC verification will be disabled.\n\n```bash\n# Enable HMAC verification with a specific key\nexport SECRET_KEY=\"1234\"\n```\n\n### Signing URLs\nWhen HMAC verification is enabled, you must sign your URLs by generating an HMAC-SHA256 signature and appending it as an `hmac` query parameter. The signature should be calculated using:\n- The secret key (same as `SECRET_KEY`)\n- The URL path and query parameters (excluding the `hmac` parameter)\n- URL-encoded parameters where applicable\n\n#### Signing Example\nHere's how to sign a URL using `openssl` and `xxd`:\n\n```bash\n# Example URL path with encoded parameter\necho -n \"/manifest.m3u8?src=http%3A%2F%2Fcommondatastorage.googleapis.com%2Fgtv-videos-bucket%2Fsample%2FElephantsDream.mp4\" | openssl dgst -sha256 -hmac \"1234\" -binary | xxd -p -c 256\n# Output: e1c8b8f7e2a3d4c5b6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9\n\n# Resulting signed URL:\n# /manifest.m3u8?src=http%3A%2F%2Fcommondatastorage.googleapis.com%2Fgtv-videos-bucket%2Fsample%2FElephantsDream.mp4\u0026hmac=e1c8b8f7e2a3d4c5b6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9\n```\n\nNotes:\n- Use `echo -n` to prevent adding a newline\n- The input should be the exact path and query string (URL-encoded)\n- The full request URL would include your domain (e.g., `http://localhost:8080` + signed path)\n\n### Generating a Random Secret Key\nFor security, you should use a strong, random secret key. Here's how to generate one:\n\n```bash\n# Generate a 32-byte random key (hex encoded)\nopenssl rand -hex 32\n# Example output: 7f9c2ba4e8b9d3f0c1e5a7b6d8f9e0c2a3b4c5d6e7f8a9b0c1d2e3f4a5b6d7e8\n\n# Set it as the environment variable\nexport SECRET_KEY=\"7f9c2ba4e8b9d3f0c1e5a7b6d8f9e0c2a3b4c5d6e7f8a9b0c1d2e3f4a5b6d7e8\"\n```\n\n## Prerequisites\n- [FFmpeg](https://ffmpeg.org/download.html) installed on your system (used for video processing)\n\n## Build from source\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/runabol/streamabol.git\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd streamabol\n   ```\n3. Install dependencies:\n   ```bash\n   go mod tidy\n   ```\n4. Build the application:\n   ```bash\n   go build -o streamabol\n   ```\n\n## Environment Variables\n\n| Variable      | Description                                 | Default Value |\n|---------------|---------------------------------------------|---------------|\n| `BASE_DIR`    | The base directory where streams are stored | `os.TempDir()`  |\n| `LOG_FORMAT`  | Possible values are `pretty` and `json`     | `pretty` |\n| `LOG_LEVEL`   | Possible values are `debug`, `info`, `warn`, `error`, and `fatal`. | `debug`\n| `SECRET_KEY`  | Secret key used for HMAC verification       | None          |\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunabol%2Fstreamabol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunabol%2Fstreamabol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunabol%2Fstreamabol/lists"}