All Projects → filiphanes → websocket-overlays

filiphanes / websocket-overlays

Licence: MIT license
Websocket controlled Video Overlay server for OBS-Studio, XSplit, CasparCG, ProPresenter and everything with web browser.

Programming Languages

HTML
75241 projects
Svelte
593 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to websocket-overlays

XION-ChaseCam
This is a free-to-use HTML/javascript based overlay for roleplay streamers. Basically it mimics the overlay of the AXON bodycam, but since most folks play in 3rd person, it's a ChaseCam. I've included a logo, and the html file. The html file has the css, html, and javascript all in one file for ease of editing. Goto line 81 of the html file to c…
Stars: ✭ 27 (+0%)
Mutual labels:  obs-studio, xsplit
Mongols
C++ high performance networking with TCP/UDP/RESP/HTTP/WebSocket protocols
Stars: ✭ 250 (+825.93%)
Mutual labels:  websocket-server
Arduinowebsockets
arduinoWebSockets
Stars: ✭ 1,265 (+4585.19%)
Mutual labels:  websocket-server
Ws Tcp Relay
A simple relay between WebSocket clients and TCP servers
Stars: ✭ 186 (+588.89%)
Mutual labels:  websocket-server
Facil.io
Your high performance web application C framework
Stars: ✭ 1,393 (+5059.26%)
Mutual labels:  websocket-server
Fiery
A flexible and lightweight web server
Stars: ✭ 203 (+651.85%)
Mutual labels:  websocket-server
Esp32 Websocket
ESP-IDF WebSocket Component
Stars: ✭ 83 (+207.41%)
Mutual labels:  websocket-server
CounterStrike-GlobalOffensive-LiveStat-for-OBS-Studio
Showing you LIVEstats of CS:GO in your Stream like OBS-Studio while playing/streaming.
Stars: ✭ 24 (-11.11%)
Mutual labels:  obs-studio
Websocat
Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
Stars: ✭ 3,477 (+12777.78%)
Mutual labels:  websocket-server
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+12325.93%)
Mutual labels:  websocket-server
Embedded Jetty Websocket Examples
Embedded Jetty WebSocket Examples
Stars: ✭ 159 (+488.89%)
Mutual labels:  websocket-server
Php Wss
Web-socket server/client with multi-process and parse templates support on server and send/receive options on client
Stars: ✭ 117 (+333.33%)
Mutual labels:  websocket-server
Ixwebsocket
websocket and http client and server library, coming with ws, a command line swiss army knife utility
Stars: ✭ 204 (+655.56%)
Mutual labels:  websocket-server
Sandstone
PHP microframework designed to build a RestApi working together with a websocket server. Build a real time RestApi!
Stars: ✭ 98 (+262.96%)
Mutual labels:  websocket-server
Websocketd
Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.
Stars: ✭ 15,828 (+58522.22%)
Mutual labels:  websocket-server
Sketchpad
Sketchpad is fully customisable collaborative whiteboard plugin written in pure JavaScript.
Stars: ✭ 85 (+214.81%)
Mutual labels:  websocket-server
Websocket
WSServer is a fast, configurable, and extendable WebSocket Server for UNIX systems written in C (C11).
Stars: ✭ 144 (+433.33%)
Mutual labels:  websocket-server
Swoft Im
基于swoft-cloud的微服务架构,最小化拆分粒度,PHP7、多进程、协程、异步任务、mysql连接池、redi连接池、rpc连接池、服务治理、服务注册与发现、Aop切面、全注解
Stars: ✭ 189 (+600%)
Mutual labels:  websocket-server
keker
Easy to use pub-sub message broker via websocket
Stars: ✭ 12 (-55.56%)
Mutual labels:  websocket-server
obs-vkcapture
OBS Linux Vulkan/OpenGL game capture
Stars: ✭ 332 (+1129.63%)
Mutual labels:  obs-studio

Websocket Overlay

Simple and powerfull remote controlled html pages useful for overlays in OBS Studio, Casper CD, XSplit or simply fullscreen browser.

Check out overlays project using gundb: https://github.com/filiphanes/gun-overlays

Features

  • server holds overlay state, not only relay commands
  • on refresh or reconnect, state is updated from server for overlay and controller so you don't loose texts etc.
  • multiple overlay-controller groups on 1 server instance (via different websocket paths)
  • automatic reconnection every 5s

Install

You can run server with Python or Nodejs.

Python 3.6+ is needed. You can download it from https://www.python.org/downloads/

pip3 install websockets

NodeJS is needed. You can download it from https://nodejs.org/en/

npm install ws

Run

1. Run websocket server

Python server:

python3 server.py 127.0.0.1 8089

Node server:

node server.js 127.0.0.1 8089

2. Open controller

Open in browser lower-third-simple/controller.html.

3. Open overlay

Open in browser lower-third-simple/overlay.html

Setup in playout software

Setting you might need to change is websocket URI in overlay.html and controller.html in directory your-overlay/. FSet it to the same IP address and port as your server is running on.

WEBSOCKET_URI = "ws://127.0.0.1:8089/"

OBS Studio

  1. Click the plus button under Sources
  2. Select BrowserSource
  3. Name the source and click "OK"
  4. Check the "Local file" box
  5. Click the "Browse" button on the right and select the client.html you want to use
  6. Set the Resolution to 1920x1080 (Width: 1920; Height: 1080) or the overlay resolution
  7. Set FPS to you stream FPS (examples: 25, 30, 50, 60)

Caspar CG

https://github.com/CasparCG/help/wiki/Media:-HTML-Templates

ProPresenter

https://learn.renewedvision.com/propresenter6/the-features-of-propresenter/web-view

XSplit

https://help.xsplit.com/en/articles/5142996-webpage

New overlays

You can create your own overlay and associated controller without implementing server.

Server API

Server API is made simple and universal. Server only keeps state of overlay and broadcasts state updates from controller to all connected clients.

  • Controller and overlay connects to the same websocket ws://host:port/path. Path can be any string you choose.
  • Server keeps 1 state object for each path, so you can have multiple overlays with different state on one server with different path. State object is not persisted between server restarts. State is kept only in memory.
  • Each websocket message is json. Server keeps state of overlay in js object (dict in python).
  • When server recieves json it updates all key/value pairs, but not removes existing.
  • When new client (overlay or controller) connects to websocket, servers sends him full state in json message.
  • Controller is meant to send state updates (websocket messages) to server which are broadcasted to all connected overlays and controllers (you can control multiple opened overlays with multiple opened controllers).
  • When controller recieves message he updates his internal state.
  • Overlay usually only recieves updates from server, but in some situation may want to send updates from overlay (i.e. set value state after finishing animation).

Usually you want to send commands to overlay like show or hide something. With state updating aproach you don't send {"command":"show-counter"} and {"command":"hide-counter"}, but rather {"show-counter":true} and {"show-counter":false}.

This approach is more robust against errors on network. Controller and overlay can connect and disconnect any time and he recieves full state and don't need to replay commands from history.

Thanks

This project was inspired by

TODO

  • more overlays
  • remember controller config in browser session storage
  • public websocket server with public overlays
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].