{"id":26260391,"url":"https://github.com/zbejas/orbiscast","last_synced_at":"2026-04-10T22:35:23.843Z","repository":{"id":282241161,"uuid":"947953045","full_name":"zbejas/orbiscast","owner":"zbejas","description":"Discord bot that streams IPTV","archived":false,"fork":false,"pushed_at":"2025-03-13T14:26:52.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T14:35:56.262Z","etag":null,"topics":["discord","discord-bot","docker","iptv"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zbejas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-13T14:07:26.000Z","updated_at":"2025-03-13T14:26:56.000Z","dependencies_parsed_at":"2025-03-13T14:46:06.061Z","dependency_job_id":null,"html_url":"https://github.com/zbejas/orbiscast","commit_stats":null,"previous_names":["zbejas/orbiscast"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbejas%2Forbiscast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbejas%2Forbiscast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbejas%2Forbiscast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbejas%2Forbiscast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zbejas","download_url":"https://codeload.github.com/zbejas/orbiscast/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495495,"owners_count":20299923,"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":["discord","discord-bot","docker","iptv"],"created_at":"2025-03-13T23:14:47.880Z","updated_at":"2025-12-29T03:30:46.530Z","avatar_url":"https://github.com/zbejas.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# OrbisCast\n\n[![GitHub build status](https://img.shields.io/github/actions/workflow/status/zbejas/orbiscast/main.yml?label=main%20build)](https://github.com/zbejas/orbiscast/actions/workflows/main.yml)\n[![GitHub build status](https://img.shields.io/github/actions/workflow/status/zbejas/orbiscast/dev.yml?label=dev%20build)](https://github.com/zbejas/orbiscast/actions/workflows/dev.yml)\n[![GitHub last commit](https://img.shields.io/github/last-commit/zbejas/orbiscast)](https://github.com/zbejas/orbiscast/commits/main)\n[![GitHub issues](https://img.shields.io/github/issues/zbejas/orbiscast)](https://github.com/zbejas/orbiscast/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/zbejas/orbiscast)](https://github.com/zbejas/orbiscast/pulls)\n[![GitHub license](https://img.shields.io/github/license/zbejas/orbiscast)](https://github.com/zbejas/orbiscast/blob/main/LICENSE.md)\n[![Release](https://img.shields.io/github/v/release/zbejas/orbiscast)](https://github.com/zbejas/orbiscast/releases)\n[![Repo size](https://img.shields.io/github/repo-size/zbejas/orbiscast)](https://github.com/zbejas/orbiscast/)\n[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/zbejas/orbiscast?sort=date)](https://hub.docker.com/r/zbejas/orbiscast)\n[![Docker Pulls](https://img.shields.io/docker/pulls/zbejas/orbiscast)](https://hub.docker.com/r/zbejas/orbiscast)\n[![CodeFactor](https://www.codefactor.io/repository/github/zbejas/orbiscast/badge)](https://www.codefactor.io/repository/github/zbejas/orbiscast)\n\n**OrbisCast** is a Discord bot that streams IPTV channels. It can be controlled by users with [commands](#commands) specified at the end of this document.\n\nThe bot was made to simplify watch parties with friends. It is also useful for testing IPTV channels without the need for a dedicated IPTV player.\n\nThis project is still in development, so expect bugs and missing features. If you find any issues, please report them in the [Issues](https://github.com/zbejas/orbiscast/issues) section.\n\n\u003e [!CAUTION]\n\u003e I am not responsible for any misuse of this tool. Ensure to comply with all applicable copyright laws and obtain necessary permissions for the IPTV content being streamed.\n\u003e\n\u003e _Using self-bots is against [Discord's terms of service](https://discord.com/guidelines) and may result in account termination. Use at your own risk._\n\n## Installation\n\n### Before you start\n\nYou will need to set a few things up before you can run the bot:\n\n- Create a bot on the [Discord Developer Portal](https://discord.com/developers/applications) and get the bot token, and invite the bot to your server.\n  - You can follow the instructions [here](https://discordpy.readthedocs.io/en/stable/discord.html) to create a bot and get the token and invite link. Make sure to give the bot the necessary permissions:\n    - `bot`\n    - `applications.commands`\n    - In the [Developer Portal](https://discord.com/developers/applications), go to your bot's settings and enable the `Message Content Intent`.\n- Get the user token from the Discord web client.\n  - The user token is required to join the voice channel and stream video. It is recommended to use a secondary account for this purpose.\n    - The user has to manually join the server.\n  - You can get the token by checking this [gist](https://gist.github.com/MarvNC/e601f3603df22f36ebd3102c501116c6#file-get-discord-token-from-browser-md) I found, or by using a tool like [Discord Get User Token](https://chromewebstore.google.com/detail/discord-get-user-token/accgjfooejbpdchkfpngkjjdekkcbnfd).\n  - **Note**: Be careful when using any third-party tools to get your user token, as they may be malicious. I recommend using the method in the gist.\n- Create a `.env` file in the project directory and fill in the required environment variables (see below). You can use the provided `.env.example` file as a template.\n\n\u003e [!WARNING]\n\u003e Do not share any of the tokens mentioned above with anyone. If you do, regenerate them immediately by:\n\u003e\n\u003e - Regenerating the bot token in the [Discord Developer Portal](https://discord.com/developers/applications).\n\u003e - Regenerating the user token by logging out and back in to Discord.\n\u003e   - If you used incognito mode to get the token, you can go to Discord Settings \u003e Devices \u003e Log out of all known devices (or just log out of the specific session).\n\n### Docker\n\nIn the repo is a provided `compose.yml` file that can be used to run the bot.\nCopy the file and fill in the required environment variables or create a `.env` file in the same directory as the `compose.yml` file.\n\nThen, run the following command to start the bot:\n\n```bash\ndocker compose up\n```\n\nor to run it in the background:\n\n```bash\ndocker compose up -d\n```\n\n\u003e [!TIP]\n\u003e You can check the logs using:\n\u003e\n\u003e ```bash\n\u003e docker compose logs -f\n\u003e ```\n\u003e\n\u003e _The `-f` flag is optional and is used to follow the logs._\n\nAll of the app data is stored in `/app/data`. The cache is stored in `/app/cache` or RAM, depending on the `RAM_CACHE` and `CACHE_DIR` environment variables.\n\nYou can check the available tags on the [Docker Hub page](https://hub.docker.com/r/zbejas/orbiscast/tags?ordering=name).\n\n### Manual\n\n\u003e [!IMPORTANT]\n\u003e The following instructions are for running the bot manually. If you are using Docker, you can skip this section. [Node.js](https://nodejs.org/) v22 or higher is required.\n\nThe project can also be run manually. To do so, first download the project and install the dependencies:\n\n```bash\ngit clone https://github.com/zbejas/orbiscast\ncd orbiscast\nnpm install\n```\n\nFor development with auto-reload:\n\n```bash\nnpm run dev\n```\n\nFor production, build and run:\n\n```bash\nnpm run build\nnpm run start:prod\n```\n\nOr run directly with TypeScript:\n\n```bash\nnpm start\n```\n\n## Environment Variables\n\nThe application uses the following environment variables, which should be defined in a `.env` file (see `.env.example`):\n\n### System and IPTV Configuration\n\n| Variable           | Description                                      | Example/Default                          | Required |\n|--------------------|--------------------------------------------------|------------------------------------------|----------|\n| `PLAYLIST`         | URL to the M3U playlist.                         | `http://example.com/m3u/playlist.m3u`    | ✔        |\n| `XMLTV`            | URL to the XMLTV guide.                   | `http://example.com/xmltv/guide.xml`     | ✘        |\n| `REFRESH_IPTV`     | Interval in minutes to refresh the IPTV data.    | `1440`                                   | ✘        |\n| `RAM_CACHE`        | Whether to use RAM for caching.                  | `true`                                  | ✘        |\n| `CACHE_DIR`        | Directory for cache storage.                     | `../cache`                               | ✘        |\n| `DEBUG`            | Enable debug mode.                               | `false`                                  | ✘        |\n| `DEFAULT_STREAM_TIMEOUT` | Default stream timeout (when alone in channel) in minutes.            | `10`                                     | ✘        |\n| `TZ`               | Timezone for the container. Example: `Europe/Ljubljana`                      | `UTC`                                    | ✘        |\n| `MINIMIZE_LATENCY` | Minimize latency for the stream.                 | `true`                                   | ✘        |\n| `BITRATE_VIDEO`    | Video bitrate in Kbps.                           | `5000`                                   | ✘        |\n| `BITRATE_VIDEO_MAX`| Maximum video bitrate in Kbps.                   | `7500`                                   | ✘        |\n\n\u003e [!TIP]\n\u003e There is a bunch of IPTV providers online. I recommend using a tool like [Threadfin](https://github.com/Threadfin/Threadfin) or [Dispatcharr](https://github.com/Dispatcharr/Dispatcharr) to sort out your IPTV channels. You can find public M3U playlists [here](https://github.com/iptv-org/iptv). More info on IPTV can be found [here](https://github.com/iptv-org/awesome-iptv).\n\n### Discord Configuration\n\nThe reason we have a `bot` and a `user` token is because the current Discord API does not allow bots to stream video. The bot is used to control the user, which is the one that actually streams the video.\n\n| Variable              | Description                                      | Example/Default                          | Required |\n|-----------------------|--------------------------------------------------|------------------------------------------|----------|\n| `DISCORD_BOT_TOKEN`           | Token for the Discord bot.                       | `YOUR_BOT_TOKEN_HERE`                    | ✔        |\n| `DISCORD_USER_TOKEN`  | Token for the Discord user.                      | `YOUR_USER_TOKEN_HERE`                   | ✔        |\n| `GUILD`               | Discord guild (server) ID.                       | `000000000000000000`                     | ✔        |\n\n## Commands\n\nThe bot can be controlled using the following commands:\n\n| Command | Description |\n|---------|-------------|\n| `/stream \u003cchanne\u003e` | Start streaming the specified channel. |\n| `/programme \u003cchannel\u003e` | Show the current programme for the specified channel. |\n| `/channels \u003cpage\u003e` | List all available channels. Page is optional. |\n| `/stop` | Stop the current stream. |\n| `/refresh \u003ctype\u003e` | Refresh the specified data. Type can be \"all\", \"channels\", or \"programme\". |\n\n\u003e [!TIP]\n\u003e Both `/channels` and `/programme` commands support autocompletion for channel names. However, Discord limits the number of options shown at once to 25. Use the `/channels` or `/programme` command to see all available channels. The bot will show the first 25 channels, and you can use the `page` argument to see more.\n\n## Troubleshooting\n\nIf you encounter any issues, here are some common problems and their solutions:\n\n- **Stream freezes or hangs**: If the stream source gets disconnected or the stream is killed from the source side, the bot may hang indefinitely. Currently, there's no automatic detection for this issue, so you'll need to restart the bot.\n\n- **Stream quality issues**: If you're experiencing quality problems, try adjusting the `BITRATE_VIDEO` and `BITRATE_VIDEO_MAX` environment variables to values that work better with your network conditions.\n\n- **High latency**: Enable the `MINIMIZE_LATENCY` option in your environment variables to reduce streaming delay.\n\n- **Missing channels**: Make sure your M3U playlist URL is correct and accessible. You can use the `/refresh channels` command to reload the channel list.\n\n- **Authorization errors**: If the bot can't join voice channels or execute commands, verify that both the bot and user tokens are correct and have the necessary permissions.\n\nIf you encounter issues not listed here, please open a new [issue](https://github.com/zbejas/orbiscast/issues) with details about your problem.\n  \n\u003e [!NOTE]\n\u003e In my testing, I've been using tools mentioned in the [System and IPTV Configuration](#system-and-iptv-configuration) tip to sort out the channels. It should work with any M3U or HDHR playlist, but I cannot guarantee it. This tool was not built or tested with a large number of channels, so it may not work as expected if you overload it with data. For any issues, please open a new [issue](https://github.com/zbejas/orbiscast/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbejas%2Forbiscast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzbejas%2Forbiscast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbejas%2Forbiscast/lists"}