{"id":13431239,"url":"https://github.com/limitcool/bilistream","last_synced_at":"2025-04-09T07:05:40.572Z","repository":{"id":41391322,"uuid":"509315971","full_name":"limitcool/bilistream","owner":"limitcool","description":"bilistream是一个支持无人值守自动转播Twitch和Youtube（包括预告类型直播）的B站直播自动转播工具。","archived":false,"fork":false,"pushed_at":"2025-02-17T02:49:14.000Z","size":188,"stargazers_count":146,"open_issues_count":0,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T06:18:28.982Z","etag":null,"topics":["bilibili","bilibili-live","live","m3u8","twitch","youtube"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/limitcool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-07-01T04:08:00.000Z","updated_at":"2025-03-24T12:23:02.000Z","dependencies_parsed_at":"2024-02-26T19:47:31.098Z","dependency_job_id":"33c65a8b-6613-4627-b07e-6cd71c01ae91","html_url":"https://github.com/limitcool/bilistream","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitcool%2Fbilistream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitcool%2Fbilistream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitcool%2Fbilistream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitcool%2Fbilistream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/limitcool","download_url":"https://codeload.github.com/limitcool/bilistream/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994119,"owners_count":21030050,"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":["bilibili","bilibili-live","live","m3u8","twitch","youtube"],"created_at":"2024-07-31T02:01:01.580Z","updated_at":"2025-04-09T07:05:40.549Z","avatar_url":"https://github.com/limitcool.png","language":"Rust","funding_links":[],"categories":["直播相关工具"],"sub_categories":["直播脚本"],"readme":"```\n| |__ (_) (_)___| |_ _ __ ___  __ _ _ __ ___\n| '_ \\| | | / __| __| '__/ _ \\/ _` | '_ ` _ \\\n| |_) | | | \\__ \\ |_| | |  __/ (_| | | | | | |\n|_.__/|_|_|_|___/\\__|_|  \\___|\\__,_|_| |_| |_|\n```\n\n\n\n# bilistream\n\nbilistream是一个支持无人值守自动转播Twitch和Youtube（包括预告类型直播）的B站直播自动转播工具。\n\n### QQ群: 715748617\n\n## 使用指南\n\n### Docker 部署（推荐）\n\n推荐使用 Docker 来部署 bilistream，这是最简单和稳定的方式：\n\n1. 安装 Docker 和 Docker Compose：\n   - Windows/Mac: 安装 [Docker Desktop](https://www.docker.com/products/docker-desktop)\n   - Linux: 参考 [Docker 安装指南](https://docs.docker.com/engine/install/)\n\n2. 创建 docker-compose.yaml 文件：\n```yaml\nservices:\n  bilistream:\n    image: ghcr.io/limitcool/bilistream:latest\n    container_name: bilistream\n    volumes:\n      - ./config.yaml:/app/config.yaml:ro  # 挂载配置文件（只读）\n      - ./cookies.txt:/app/cookies.txt:ro   # 可选：挂载 cookies 文件（只读）\n    restart: unless-stopped\n    environment:\n      - TZ=Asia/Shanghai    # 设置时区\n```\n\n3. 创建配置文件：\n```bash\n# 创建配置文件\ntouch config.yaml\n```\n\n4. 编辑 config.yaml 文件（配置示例见下文）\n\n5. 启动服务：\n```bash\ndocker-compose up -d\n```\n\n6. 查看运行状态：\n```bash\n# 查看日志\ndocker-compose logs -f\n\n# 查看容器状态\ndocker-compose ps\n```\n\n7. 停止服务：\n```bash\ndocker-compose down\n```\n\n注意事项：\n- 确保配置文件中的路径使用容器内的路径（如 cookies 文件路径应该是 `/app/cookies.txt`）\n- 如果需要使用代理，在 docker-compose.yaml 中添加：\n```yaml\n    network_mode: \"host\"  # 如果使用本地代理\n    environment:\n      - http_proxy=http://host.docker.internal:7890\n      - https_proxy=http://host.docker.internal:7890\n```\n\n### 二进制部署\n\n如果您不想使用 Docker，也可以直接下载二进制文件运行。首先需要安装以下依赖：\n\n```bash\n# Debian/Ubuntu\napt update\napt install ffmpeg python3-pip -y\n\n# CentOS\nyum install ffmpeg -y\n\n# 安装 yt-dlp\npip3 install -U yt-dlp\n```\n\n## 使用指南\n\n### 下载和安装\n\n根据您的系统选择对应的版本：\n\n#### Windows\n- x64系统: 下载 `bilistream-v{版本号}-x86_64-pc-windows-msvc.zip`\n- ARM64系统: 下载 `bilistream-v{版本号}-aarch64-pc-windows-msvc.zip`\n\n下载后解压，直接运行 `bilistream.exe` 即可。\n\n#### Linux\n- x64系统: 下载 `bilistream-v{版本号}-x86_64-unknown-linux-musl.tar.gz`\n- ARM64系统: 下载 `bilistream-v{版本号}-aarch64-unknown-linux-gnu.tar.gz`\n\n```bash\n# 解压\ntar -xzf bilistream-v{版本号}-{架构}.tar.gz\ncd bilistream-v{版本号}-{架构}\n# 运行\n./bilistream\n```\n\n#### macOS\n- Intel芯片: 下载 `bilistream-v{版本号}-x86_64-apple-darwin.tar.gz`\n- M系列芯片: 下载 `bilistream-v{版本号}-aarch64-apple-darwin.tar.gz`\n\n```bash\n# 解压\ntar -xzf bilistream-v{版本号}-{架构}.tar.gz\ncd bilistream-v{版本号}-{架构}\n# 运行\n./bilistream\n```\n\n### 验证下载\n\n每个发布包都附带了 SHA256 校验和文件（.sha256 后缀），您可以使用它来验证下载的完整性：\n\n```bash\n# Windows (PowerShell)\nGet-FileHash bilistream-v{版本号}-{架构}.zip -Algorithm SHA256\n\n# Linux/macOS\nshasum -a 256 bilistream-v{版本号}-{架构}.tar.gz\n```\n\n将输出的哈希值与对应的 .sha256 文件中的内容进行比对。\n\n### 配置\n\n在程序所在目录新建 `config.yaml` 文件：\n\n```\ntouch config.yaml\n```\n\n将以下内容填写至 `config.yaml` 文件内：\n\n\n``` yaml\n# 检测直播间隔\nInterval: 60\n# 需要转播的平台 Twitch || Youtube || YoutubePreviewLive\nPlatform: Twitch\n# B站推流账号Cookie\nBiliLive:\n  SESSDATA:\n  bili_jct:\n  DedeUserID: 2235894\n  DedeUserID__ckMd5:\n  Room: 660428\n  BiliRtmpUrl: rtmp://live-push.bilivideo.com/live-bvc/\n  # BiliRtmpUrl: B站开播设置页面的服务器地址\n  BiliRtmpKey: \"?streamname=live_0000000_0000000\u0026key=xxxxxxxxxxb8289c6acc97xxxxxxxxx\u0026schedule=rtmp\u0026pflag=1\"\n  # BiliRtmpKey: B站开播设置页面的串流密钥,需注意,由于是?号开头的,本行需要对内容加双引号\n# Twitch 直播间Id\nTwitch:\n  # Room: maximilian_dood\n  Room:\n# youtube 需要使用Youtube API AK以及Yt-dlp\nYoutube:\n  Room: UC1zFJrfEKvCixhsjNSb1toQ\n  AccessToken:\n# youtube 预告类型直播转播请填写以下内容\nYoutubePreviewLive:\n  ChannelId: UC1zFJrfEKvCixhsjNSb1toQ\nFfmpegProxy: http://127.0.0.1:7890\n# Ffmpeg代理地址,无需代理可以不填此项或者留空\n\n### Gotify推送配置 (可选)\n\n# 如果您想使用Gotify进行推送通知,请在`config.yaml`中添加以下配置:\n\nGotify:\n  url: \"https://example.com/gotify\"\n  token: \"your_gotify_token_here\"\n\n### Cookies配置 (可选)\n# 如果需要转播会员限定或需要登录的内容，可以配置cookies\nCookies: \"/path/to/cookies.txt\"  # cookies文件路径，支持YouTube和Twitch\n```\n\n## Youtube API申请地址\n\nhttps://developers.google.com/youtube/v3\n\n## 常见问题FAQ\n\n- Q: 转播时出现 Input/output error\n  - A: 可能是BiliRtmpUrl及BiliRtmpKey填写错误或使用海外机器进行推流。B站不支持海外机器推流，建议使用国内服务器+代理推流。\n- Q: 转播Youtube时出现Connection to tcp://manifest.googlevideo.com:443 failed: Error number -138 occurred\n  - A: 可能是Ffmpeg拉流未通过代理，请在配置项填写 FfmpegProxy: [http://127.0.0.1:7890。](http://127.0.0.1:7890。/)\n- Q: 如何获取cookies文件？\n  - A: 可以使用浏览器扩展（如Get cookies.txt）导出Netscape格式的cookies文件。对于YouTube和Twitch，需要先在浏览器中登录账号，然后导出cookies。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimitcool%2Fbilistream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimitcool%2Fbilistream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimitcool%2Fbilistream/lists"}