All Projects → zsxsoft → Danmu Server

zsxsoft / Danmu Server

A danmaku server based on WebSocket. 弹幕服务器,基于WebSocket。

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Danmu Server

Danmaku
live video comments protocol and platform api
Stars: ✭ 70 (-58.58%)
Mutual labels:  danmaku, danmu
acfundanmu
AcFun直播API
Stars: ✭ 27 (-84.02%)
Mutual labels:  danmaku, danmu
Commentcorelibrary
Javascript Live Comment (Danmaku) Engine Implementation. JS弹幕模块核心,提供从基本骨架到高级弹幕的支持。
Stars: ✭ 1,724 (+920.12%)
Mutual labels:  danmaku, danmu
awesome-danmaku
一款轻量、适用于 H5 弹幕场景的 JS lib。🚀🚀
Stars: ✭ 35 (-79.29%)
Mutual labels:  danmaku, danmu
Danmu.server
一个开源的弹幕后端
Stars: ✭ 92 (-45.56%)
Mutual labels:  danmaku, danmu
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 589 (+248.52%)
Mutual labels:  danmaku, danmu
Danmu.js
HTML5 danmu (danmaku) plugin for any DOM element
Stars: ✭ 130 (-23.08%)
Mutual labels:  danmaku, danmu
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 294 (+73.96%)
Mutual labels:  danmaku, danmu
Kikoplay
KikoPlay - NOT ONLY A Full-Featured Danmu Player 不仅仅是全功能弹幕播放器
Stars: ✭ 313 (+85.21%)
Mutual labels:  danmaku, danmu
Danmaku
A high-performance JavaScript danmaku engine. 高性能弹幕引擎库
Stars: ✭ 446 (+163.91%)
Mutual labels:  danmaku, danmu
Danmu Client
A cross-platforms danmaku client that supports transparency which based on canvas + WebSocket. 多用跨平台透明弹幕客户端,支持图文弹幕,基于canvas + WebSocket。
Stars: ✭ 151 (-10.65%)
Mutual labels:  danmaku, danmu
Dmview2
轻量级弹幕,三步即可展示弹幕;也可作为公告的动态展示用途
Stars: ✭ 70 (-58.58%)
Mutual labels:  danmu
Xcdanmuview
Android弹幕效果View-支持左右两个方向
Stars: ✭ 28 (-83.43%)
Mutual labels:  danmu
Yatto
Parse & play online video with danmaku on local player.
Stars: ✭ 14 (-91.72%)
Mutual labels:  danmaku
Douyu For Mac
非官方Mac版斗鱼播放器带实时弹幕
Stars: ✭ 148 (-12.43%)
Mutual labels:  danmu
Danmu.go
基于golang的命令行形式的直播网站(斗鱼)的弹幕浏览
Stars: ✭ 14 (-91.72%)
Mutual labels:  danmu
Abplayerhtml5
Video Player for danmaku comments. ABPlayer in HTML5. ABPlayer核心构件以动态HTML编写的版本。向HTML5进发!HTML5弹幕播放器
Stars: ✭ 858 (+407.69%)
Mutual labels:  danmu
Us Danmaku
Firefox 扩展版本见 https://github.com/tiansh/ass-danmaku ;【用户脚本已停止维护】用户脚本 以ass格式下载 AcFun 和 bilibili 的弹幕
Stars: ✭ 158 (-6.51%)
Mutual labels:  danmaku
Bilibili Downloader
哔哩哔哩视频下载器 | Yet another video downloader for Bilibili
Stars: ✭ 146 (-13.61%)
Mutual labels:  danmaku
Qliveplayer
A cute and useful Live Stream Player with danmaku support.
Stars: ✭ 105 (-37.87%)
Mutual labels:  danmaku

danmu-server

David deps

弹幕服务器,其客户端项目见danmu-client

欲使用此项目,客户端需要使用对应的版本。已发布的服务端均已写明对应的客户端版本号,开发分支内的服务端版本仅对应开发分支的客户端。

功能特色

  • 跨平台;
  • 房间功能;
  • 后台管理;
  • 弹幕记录与搜索(需要开启数据库);
  • 黑名单功能;
  • 关键词替换、拦截功能;
  • 弹幕记录;
  • 扩展;
    • 新浪微博登录扩展(需要开启缓存);
    • 自动封禁功能扩展(需要开启缓存);
    • 审核扩展;
    • 直播拉取扩展
  • 删除单条弹幕功能;
  • 易于部署,简单高效。

后台截图

后台截图

一些警告

稳定版请于Release手动下载。

部署方式

检查环境

Nodejs

Nodejs >= 6

数据库

如使用csv,可无视此节。

默认使用MySQL数据库。如需使用,需检查MariaDBMySQL的安装状态。支持5.0+。安装完成后,请创建相应的数据库。

如使用MongoDB数据库,请检查MongoDB的安装状态。然后需要在安装完成后执行:npm install mongodb

缓存

如不使用新浪微博与自动封禁功能,可无视此节。

默认使用memcached。如需使用,请检查Memcached(Linux)的安装状态。Windows用户请自行查找适合的Memcached版本。

如果要用阿里云开放缓存服务OCS,需要在安装完成后执行:npm install aliyun-sdk

直接安装

  1. 配置MariaDB,创建数据库等,不需要创建数据表。
  2. 修改config.js,使其参数与环境相符。
  3. 切换到命令行或终端,cd到程序所在目录执行npm install,安装程序依赖库。
  4. 现在,你可以直接npm start启动。

Docker安装

Dockerfile可能年久失修,建议自己用alpine封装一个。 直接用Docker安装的话,镜像内是含MariaDB的。

  1. 安装Docker
  2. config.js调整配置。
  3. docker build -t="zsxsoft/danmu-server:" . && docker run -t -i -p 3000:3000 "zsxsoft/danmu-server"

升级

1.0.6 -> 1.1.0

  • 在每个房间内增加cdn: false配置

1.0.5 -> 1.0.6

  • 在每个房间内增加hostname配置,类型为数组,用于将房间与域名绑定

网页接口

GET /

可以直接发布最简单的弹幕。

GET /advanced

可以发布高级弹幕(需要密码)

GET /manage

可以进行后台管理

GET /realtime

可以实时接收弹幕并直接删除或封禁(需要密码)

配置说明

以下标有*的配置项,运行时不可在后台修改。

	"rooms": {
		"房间1": {
			* "hostname": ["test.zsxsoft.com", "localhost", "127.0.0.1"],
			* "cdn": 是否使用CDN或反向代理(用于获取正确的IP,
			* "display": "房间显示名",
			* "table": "对应MySQL的数据表、MongoDB的集合",
			"connectpassword": "客户端连接密码",
			"managepassword": "管理密码",
			"advancedpassword": "高级弹幕密码",
			"keyword": {
				"block": /强制屏蔽关键词,正则格式。/
				"replacement": /替换关键词,正则格式/,
				"ignore": /忽略词,正则格式/
			},
			"blockusers": [
				"默认封禁用户列表"
			],
			"maxlength": 弹幕堆积队列最大长度,
			"textlength": 每条弹幕最大长度,
			* "image": {
				* "regex": /图片弹幕解析正则,正则格式,不要修改/ig,
				* "lifetime": 每个图片给每条弹幕增加的存货时间
			},
			"permissions": { // 普通用户允许的弹幕权限
				"send": 弹幕开关;关闭后无论普通用户还是高级权限都完全禁止弹幕。,
				"style": 弹幕样式开关,
				"color": 颜色开关,
				"textStyle": CSS开关,
				"height": 高度开关,
				"lifeTime": 显示时间开关,
			}
		},
		"房间ID2": {
			// 同上
		}
	},
	* "database": { // 数据库
		* "type": "数据库类型(mysql / mongo / csv / none)",
		* "server": " 数据库地址(mysql / mongo)",
		* "username": "数据库用户名(mysql / mongo)",
		* "password": "数据库密码(mysql / mongo)",
		* "port": "数据库端口(mysql / mongo)",
		* "db": "数据库(mysql / mongo)",
		* "retry": 24小时允许断线重连最大次数,超过则自动退出程序。24小时以第一次断线时间计。(mysql,
		* "timeout": 数据库重连延时及Pingmysql,
		* "savedir": "指定文件保存位置(csv)",
	},
	"websocket": {
		"interval": 弹幕发送间隔
		"singlesize": 每次弹幕发送数量
	},
	* "http": {
		* "port": 服务器HTTP端口,
		* "headers": {}, // HTTP头
		* "sessionKey": "随便写点,防冲突的"
	},
	* "cache": {
		* "type": "缓存类型(memcached / aliyun)",
		* "host": "缓存服务器地址,可用socket",
		* "auth": 打开身份验证,
		* "authUser": 身份验证账号,
		* "authPassword": 身份验证密码,
	},
	"ext": {
		// 扩展
	}
}

扩展

新浪微博登录

"weibo": { // 新浪微博扩展
	"clientID": '', // App ID
	"clientSecret": '', // App Secret
	"callbackURL": 'http://test.zsxsoft.com:3000/auth/sina/callback', // 这里填写的是 网站地址/auth/sina/callback
	"requireState": true // 是否打开CSRF防御
}

自动封禁

"autoban": { // 自动封号扩展
	"block": 3, // 被拦截超过一定数字自动封号
}

全局审核

"audit": { // 审核扩展
}

直播同步

此扩展基于danmu项目开发,需要安装Python 2.7+ 或 Python 3.5+。在启用前,你首先需要

pip install danmu

才可打开。

"livesync": { // 新浪微博扩展
	"房间名": {
		"liveUrl": '', // 直播网站地址
	}
}

常见问题

数据库相关

{ [Error: Connection lost: The server closed the connection.] fatal: true, code: 'PROTOCOL_CONNECTION_LOST' }

请把MySQL的wait_timeout设置得大一些。

搭配项目

流程图

流程图

协议

The MIT License (MIT)

博文

弹幕服务器及搭配之透明弹幕客户端研究结题报告

弹幕服务器及搭配之透明弹幕客户端研究中期报告

弹幕服务器及搭配之透明弹幕客户端研究开题报告

开发者

zsx - https://www.zsxsoft.com / 博客 - https://blog.zsxsoft.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].