@byxiaoxie3年前

11/3
17:56
Home

owncast 搭建自己的直播间(带聊天功能)

// 准备工作
系统 [Ubuntu 20.04] (其他系统自行测试)
GitHub:https://github.com/owncast/owncast
教程地址:https://owncast.online/docs/quickstart/
需要:FFmpeg版本4.2以上的版本 必须要支持:[x264/var_stream_map] 手动编译安装教程:https://www.byxiaoxie.com/?p=525
//安装 FFmpeg (Ubuntu20.04 ffmpeg版本4.2.4)

apt update

apt install ffmpeg
//下载[owncast] (GitHub上的发布版)

mkdir -p /opt/owncast && cd /opt/owncast  //创建文件夹并进入文件夹

wget https://github.com/owncast/owncast/releases/download/v0.0.2/owncast-0.0.2-linux-64bit.zip  //下载发布版

unzip owncast-0.0.2-linux-64bit.zip  // 解压
//编辑配置文件[config.yaml]

vim config.yaml

修改自己的串流秘钥和信息,我自己的文件内容如下:
# See https://owncast.online/docs/configuration/ for more details

instanceDetails:
  name: Gary   //名称
  title: Live Game Test  //网站标题

  logo:
    small: /img/logo128.png
    large: /img/logo256.png

  tags:
    - music
    - software
    - streaming

  # https://owncast.online/docs/configuration/#external-links
  # for full list of supported social links.  All optional.
  socialHandles:
    - platform: github
      url: http://github.com/owncast/owncast
    - platform: mastodon
      url: http://mastodon.something/owncast

videoSettings:
  # Change this value and keep it secure.  Treat it like a password to your live stream.
  streamingKey: xiaoxie   //串流秘钥
//启动 [owncast]

./owncast  //启动指令

启动后查看日志文件 [transcoder.log] 如果没有报错着运行成功,如报错无法正常串流播放

//使用后台运行  [owncast]

screen -S live  //创建新的命令行

cd cd /opt/owncast  //进入目录

./owncast  //执行脚本
服务器需要开放端口[1935,8080]
设置OBS串流

服务器 [rtmp://127.0.0.1/live]
串流秘钥 [xiaoxie] (名称自行修改)

播放器地址

播放地址 [http://127.0.0.1:8080]

阅读全文 →

owncast 搭建自己的直播间(带聊天功能)

加载中……