Skip to content

LiveRelay is an open-source project that enables seamless streaming relay between platforms like YouTube, Twitch, and others. LiveRelay 是一个开源项目,能够在 YouTube、Twitch 等平台之间实现无缝的直播流转推。

License

Notifications You must be signed in to change notification settings

LyferLu/LiveRelay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[English] [简体中文]

简介

一个直播源转推脚本,基于强大的Streamlink,能够在 YouTube、Twitch 等平台之间实现无缝的直播流转推。

已支持平台

  • Youtube
  • Twitch

使用

源码运行

# 克隆源码
git clone https://github.com/LyferLu/LiveRelay.git
cd LiveRelay
# 创建虚拟环境
python -m venv .venv
source .venv/bin/activate
# 安装依赖
pip install -r requirements.txt
# 源码运行
python main.py

配置

配置文件存储于config.json,该文件位于可执行程序相同目录

修改示例配置文件config.sample.json后务必重命名为config.json

文件内容要求严格按照json语法,请前往在线json格式化网站校验后再修改

转推地址

按照示例修改RTMPServer字段

直播流配置

按照示例修改streams列表,注意逗号、引号和缩进

字段 含义 可填内容 是否必填 备注
platform 直播平台 直播平台的英文名 必填 大小写不敏感
id 直播用户id 直播平台的房间号或用户名 必填 参考config文件示例格式
一般在直播网址即可找到
name 自定义主播名 任意字符 非必填
index 索引优先级 int整形数字 必填 索引越小优先级越高

YouTube的频道ID

YouTube的频道ID一般是由UC开头的一段字符,由于YouTube可以自定义标识名,打开YouTube频道时网址会优先显示标识名而非频道ID

获取YouTube的频道ID可以使用以下网站:

https://seostudio.tools/zh/youtube-channel-id

https://ytgear.com/youtube-channel-id

鸣谢

https://github.com/auqhjjqdo/LiveRecorder

https://github.com/gav-X/RepushStream

About

LiveRelay is an open-source project that enables seamless streaming relay between platforms like YouTube, Twitch, and others. LiveRelay 是一个开源项目,能够在 YouTube、Twitch 等平台之间实现无缝的直播流转推。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages