KPlayer文档

其实就看这个教程就可以了:

KPlayer文档

  1. 启动阿里云或者腾讯云的服务器进行这个步骤


  1. 打开终端, 在命令行中输入
curl -fsSL get.kplayer.net | bash
  1. 打开 Transmit进行连接服务器
  2. 找到kplayer文件夹,编辑 config.json.example
  3. 把 config.json.example 替换成 config.json , 然后把内容换成以下的内容, 但是有两个地方需要注意,
  4. lists 中的地址, 换成自己想要播放的视频的地址,
  5. path 中的路径, 换成自己的推流链接
  6. 推流链接的获取地址如下, 例如b站 : https://link.bilibili.com/p/center/index#/my-room/start-live
  7. 找到推流入口文件, 然后替换 config.js 中的 path
{
    "version": "2.0.0",
    "resource": {
        "lists": [
            "/root/mp4/test.mp4"
        ]
    },
    "play": {
        "play_model": "loop"
    },
    "output": {
        "lists": [
            {
                "path": "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_523335868_46050390&key=e86118ba89998c283c9354079d66487c&schedule=rtmp&pflag=1"
            }
        ]
    }
}

启动命令

./kplayer play start --daemon

关闭命令

pkill -f kplayer

打开b站直播间网址:https://link.bilibili.com/p/center/index#/my-room/start-live

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6