A live streaming tool more suitable for non-graphical servers

Related tags

Video kplayer
Overview

KPlayer

KPlayer可以帮助你快速的在服务器上进行视频资源的循环直播推流。本仓库为libkplayer的golang封装版本

查看帮助文档:https://kplayer.net/p/1

kplayer是什么

kplayer为你提供最小化成本搭建视频推流功能的工具,最优的推流方案OBS或其他软件依赖与xWindow或图形化界面的需要,不适合在服务端与云服务器上进行部署。KPlayer无需依赖图形化界面,您可以使用任意一款你喜欢的发行版本即可实现多视频资源无缝推流的方案。

只需要定义您的配置文件,针对定制化的修改。即可达成想要的结果。并且可以24小时无人值守的方式运行它。

有什么特性

  1. 多视频资源无缝推流 媒体资源推流,通常是单个资源文件连续推流。如果你有这方面的经验,那么肯定使用过ffmpeg或者obs的方案来进行推流直播。
  • 与ffmpeg相比。想要实现多资源连续推流的方式通过concat配合-loop可以达到或者使用循环运行ffmpeg命令来长时间推流。但是无法动态控制视频资源的顺序,而且在视频存在差异性的情况下,必须保证视频参数的高度一致性。类似分辨率,码率,sardar,声道数量等造成极大的不便。使用命令行循环推流则会导致资源切换时会出现资源断流的情况,严重时会出现编码数据不匹配(绿屏、音画不同步...)
  • 与obs相比。obs更依赖图形化界面的GUI操作,依赖实时编码。这在服务器上将变得不太友好。
  1. 预生成缓存,节省硬件资源 如果你的场景是循环推流,并不需要进行实时编码。KPlayer提供缓存机制,将上一次推流的数据缓存下来。下一次直接使用缓存文件,这将极大的降低你的机器CPU与内存占用量,仅使用较小的资源可以完成不间断推流。

KPlayer也支持在高性能机器上预生成缓存,传输至性能较小的服务器上直接使用缓存推流。降低资源占用量

  1. 支持多输出资源 KPlayer不仅支持输入资源的定义,对输出资源也允许定义多个输出资源并行推流。这意味着,你可以在不同的推流平台上显示一致的视频画面。

同时支持你配置重连机制,在某些原因下由于服务端的意外断开。你可以允许KPlyaer不被中断,并在某个时间段后进行尝试重新连接。

  1. 提供丰富的API接口辅助第三方应用控制 若具备基础的编码能力,KPlayer支持你通过jsonrpc调用的方式去控制它的播放行为。包括但不限于添加/删除输入资源文件、添加/删除输出资源、暂停、跳过等等等...

API是动态控制的,不必重新运行它。

  1. 提供可热拔插的插件机制,并提供自定义插件开发 丰富视频资源内容,我们提供了插件的机制。通过插件的配置,你可以实现插件提供的各种功能。例如在直播资源中添加一行文字、添加一个图片水印、显示时间、进度条等等...

并且支持你开发自定义插件提供给其他人使用。

什么样的设计

  1. 编码语言 KPlayer从v0.5.0以上由以下编程语言构成。
  • C++17 实现编解码与输入输出的核心逻辑
  • Golang 实现用户交互态的业务逻辑
  • Rust/C++ 提供插件的实现功能

相较于v0.4.x的版本,我们将各个功能解耦方便迭代开发提供更好的迭代周期和功能开发

  1. 解耦设计 KPlayer的整体控制逻辑依赖于消息队列通信,在主程序编码中可以看到大量的消息事件的处理,方便各模块中的功能解耦。同时多线程间彼此通过消息通信进行逻辑解耦

在对libkplayer与外界交互信息上,使用protobuf进行数据交互。如果有幸你参与到插件的开发工作中来,相信这会对你带来较大的便利

  1. 插件机制 得益于插件的设计逻辑,可以丰富推流视频中的内容。v0.4.x内的插件依赖于动态链接库的加载,不好的地方就是插件行为将变得不可控(读取机器磁盘文件、访问网络资源)...

得益于WebAssembly的出色设计,我们使用wasm来完成插件的编码与运行。我们可以严格控制每个插件的可访问行为。在无授权的情况下,它并不能访问任何关于你机器上的任何数据。你可以放心的使用它而不必担心会存在恶意插件或插件被篡改的情况产生。并且你可以使用你熟悉的任何语言来编写插件,只要它符合wasm标准

未来会支持什么

  1. 提供更多的插件
  2. 提供更多的辅助工具降低入门成本
  3. 完善的辅助文档
You might also like...
SlideXtract - A tool to help extract slides from a video file.

SlideXtract A tool to help extract slides from a video file. Slides are output in the out folder. Features I didn't find any other piece of code that

red-tldr is a lightweight text search tool, which is used to help red team staff quickly find the commands and key points they want to execute, so it is more suitable for use by red team personnel with certain experience.
red-tldr is a lightweight text search tool, which is used to help red team staff quickly find the commands and key points they want to execute, so it is more suitable for use by red team personnel with certain experience.

Red Team TL;DR English | 中文简体 What is Red Team TL;DR ? red-tldr is a lightweight text search tool, which is used to help red team staff quickly find t

Parse and generate m3u8 playlists for Apple HTTP Live Streaming (HLS) in Golang (ported from gem https://github.com/sethdeckard/m3u8)

go-m3u8 Golang package for m3u8 (ported m3u8 gem https://github.com/sethdeckard/m3u8) go-m3u8 provides easy generation and parsing of m3u8 playlists d

Take control over your live stream video by running it yourself.  Streaming + chat out of the box.
Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Take control over your content and stream it yourself. Explore the docs » View Demo · Use Our Server for Testing · FAQ · Report Bug Table of Contents

live video streaming server in golang
live video streaming server in golang

中文 Simple and efficient live broadcast server: Very simple to install and use; Pure Golang, high performance, and cross-platform; Supports commonly us

Live streaming from your terminal
Live streaming from your terminal

TStream - Streaming from terminal 🙋‍♂️ Come stream at tstream.club How to start streaming Please refer to this link Upcoming features One command to

live streaming server in golang
live streaming server in golang

中文 Simple and efficient live broadcast server: Very simple to install and use; Pure Golang, high performance, and cross-platform; Supports commonly us

🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.

gev 中文 | English gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily bui

Server and client implementation of the grpc go libraries to perform unary, client streaming, server streaming and full duplex RPCs from gRPC go introduction

Description This is an implementation of a gRPC client and server that provides route guidance from gRPC Basics: Go tutorial. It demonstrates how to u

Live reload utility for Go web servers

gin gin is a simple command line utility for live-reloading Go web applications. Just run gin in your app directory and your web app will be served wi

Pi-hole data right from your terminal. Live updating view, query history extraction and more!
Pi-hole data right from your terminal. Live updating view, query history extraction and more!

Pi-CLI Pi-CLI is a command line program used to view data from a Pi-Hole instance directly in your terminal.

A graphical text editor
A graphical text editor

A A is a text editor inspired by the Sam and Acme text editors for the Plan 9 operating system. binary Latest Binaries https://github.com/as/a/release

Native Go (golang) Graphical Interface system (2D and 3D), built on GoKi tree framework
Native Go (golang) Graphical Interface system (2D and 3D), built on GoKi tree framework

GoGi is part of the GoKi Go language (golang) full strength tree structure system (ki = 木 = tree in Japanese) package gi is a scenegraph-based 2D and

A terminal based graphical activity monitor inspired by gtop and vtop
A terminal based graphical activity monitor inspired by gtop and vtop

NO LONGER MAINTAINED. A maintained fork of gotop exists at https://github.com/xxxserxxx/gotop. Another terminal based graphical activity monitor, insp

Windows GUI library for Go (Golang). Comes with a graphical UI designer.

Version 2 Please go to Version 2 of this library for the latest version. Windows GUI Library This is a pure Go library to create native Windows GUIs.

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Dear ImGui (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addit

A unified graphical user experience toolkit for Go desktop applications

Unison A unified graphical user experience toolkit for Go desktop applications. macOS, Windows, and Linux are supported. Required setup Unison is buil

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.
Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

REST API written in GO with PostgreSQL and Nginx Proxy + Certbot Let's Encrypt HTTPS certificates + Graphical Frontend in PHP. Deployed via docker-compose.

SSOA-PT REST APP Services Backend: REST API in Go Database: PostgreSQL Web Proxy: Nginx Let's Encrypt HTTPS certificates with certbot Frontend: PHP Ap

Comments
  • json配置文件中的rpc开关不起作用

    json配置文件中的rpc开关不起作用

        "rpc": {
          "on": false,
          "http_port": 4158,
          "grpc_port": 4159,
          "address": "0.0.0.0"
        }
    

    设置为false不起作用

    opened by yuban10703 2
  • 关于show-time插件的时区问题

    关于show-time插件的时区问题

    由于在docker容器内,时区和系统时区不一样,导致使用show-time插件显示时间的时候,会比北京时间差8个小时,建议,可以在show-time插件的配置参数内,增加一个时区配置参数,可以在这里显式指定所需要显示的时区,应该会方便不少。 PS:如果能够再增加一个time format参数就更好了,这样可以自由指定时间日期显示格式了。

    感谢。

    opened by leim 2
  • 资源设置的问题

    资源设置的问题

    请问如何用MP3 列表作为背景音乐,通过API 切换图片作为直播的内容呢?

    如果是静态资源可以这样配置:

    "groups": [ { "path": "/home/user/video/background.png", "media_type": "video", "persistent_loop": true }, { "path": "/home/user/video/music.mp3", "media_type": "audio" } ] 感谢。

    opened by mirror222 4
  • 关于拉流的问题

    关于拉流的问题

    用这个工具来进行拉流的话会卡在第一帧然后就卡住 777 就像这样 7777 888 但是单独用ffmpeg来拉流的话画面就不会卡住 8888 999 就像这样

    kplayer会卡的话是我用错了拉流的方法吗..... 来个大佬来解答下... 拉流的地址 https://cn-jssz-cm-02-20.bilivideo.com/live-bvc/529617/live_96015335_8150537/index.m3u8?expires=1665401204&len=0&oi=2028425183&pt=h5&qn=10000&trid=1007f09e8b224dc248c6b1ec4e2ffd44f928&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha01&sign=6dbf8080aeab59c85c9d3235810bbd4b&sk=1465b6531627450feebdec64b55df1f0&flvsk=2099dc9bbc9fef716246f34031dd8f2c&p2p_type=0&src=57345&sl=1&free_type=0&sid=cn-jssz-cm-02-20&chash=1&sche=ban&bvchls=1&score=4&pp=rtmp&machinezone=ylf&source=onetier&site=11e6bfab179a2a2b8ef93df171aac4ce&order=1

    opened by smallwhitedesu1 2
Releases(v0.5.7)
Owner
Bytelang Studio
null
Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Take control over your content and stream it yourself. Explore the docs » View Demo · Use Our Server for Testing · FAQ · Report Bug Table of Contents

Owncast 6.7k Nov 21, 2022
live video streaming server in golang

中文 Simple and efficient live broadcast server: Very simple to install and use; Pure Golang, high performance, and cross-platform; Supports commonly us

浩麟 8.4k Nov 22, 2022
live streaming server in golang

中文 Simple and efficient live broadcast server: Very simple to install and use; Pure Golang, high performance, and cross-platform; Supports commonly us

BigSillyBear 27 Nov 10, 2022
Live on-demand transcoding in go using ffmpeg. Also with NVIDIA GPU hardware acceleration.

Go live HTTP on-demand transcoding Transcoding is expensive and resource consuming operation on CPU and GPU. For big companies with thousands of custo

Miroslav Šedivý 108 Nov 20, 2022
🔥 Golang live stream lib/client/server. support RTMP/RTSP/HLS/HTTP[S]-FLV/HTTP-TS, H264/H265/AAC, relay, cluster, record, HTTP API/Notify, GOP cache. 官方文档见 https://pengrl.com/lal

lal是一个开源GoLang直播流媒体网络传输项目,包含三个主要组成部分: lalserver:流媒体转发服务器。类似于nginx-rtmp-module等应用,但支持更多的协议,提供更丰富的功能。lalserver简介 demo:一些小应用,比如推、拉流客户端,压测工具,流分析工具,调度示例程序等

yoko 1.8k Nov 19, 2022
Personal video streaming server.

tube This is a Golang project to build a self hosted "tube"-style video player for watching your own video collection over HTTP or hosting your own ch

davy wybiral 236 Nov 25, 2022
Quik.do is a video conferencing tool.

Quik.do is a video conferencing tool.

Bora Tanrıkulu 117 Nov 20, 2022
xyz, is a tool for automating actions based on events from various sources used by streamers.

Streaming Automation Software Support · Download · Report Bug · Request Feature What is xyz? xyz, is a tool for automating actions based on events fro

null 1 Oct 22, 2022
Frf-media-download - This tool downloads all the files you have uploaded to FreeFeed

FreeFeed Media Downloader This tool downloads all the files you have uploaded to

Давид Мзареулян 0 Jan 29, 2022
A tool to stream videos📺 directly into VLC media player just by its name from terminal.

PeerWatch A tool to stream videos directly into the VLC media player. Download Download the tool from here: Windows Linux win-x64 linux-x64 Building Y

Ab 0 Feb 12, 2022