This is a single-instance streaming server with chat.

Table of Contents

AlbertoBroadcast Stream Server

This is a single-instance streaming server with chat. Originally written to replace Rabbit as the platform for watching movies with a group of people online.

Build requirements

  • Go 1.13 or newer
  • GNU Make

Older Go Versions

You can install a newer version of Go alongside your OS's distribution by following the guide here: https://golang.org/doc/manage-install

Once you have that setup add an enviromnent variable named GO_VERSION and set it to the version you installed (eg, 1.14.1). The Makefile will now use the newer version.

Compile and install

You have to :

  • download git clone https://github.com/AlbertovanEckeveld/broadcastserver, go into the source directory cd broadcastserver;
  • choose your TARGET oneof "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows";
  • choose your ARCH oneof "386 amd64 amd64p32 arm arm64 ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32leppc s390 s390x sparc sparc64";
  • build make TARGET=windows ARCH=386 (On BSD systems use gmake);
  • and run ./MovieNight;

Example :

$ git clone https://github.com/AlbertovanEckeveld/broadcastserver
$ cd broadcastserver
$ (make|gmake) TARGET=windows ARCH=386
$ ./MovieNight

Docker build

broadcastserver provides a Dockerfile and a docker-compose file to run broadcastserver using Docker.

Building the Container

Install Docker, clone the repository and build:

docker build -t broadcastserver .

Running the Container

Run the image once it's built:

docker run -d -p 8089:8089 -p 1935:1935 [-v ./settings.json:/config/settings.json] broadcastserver

Explanation:

  • -d runs the container in the background.
  • -p 8089:8089 maps the broadcastserver web interface to port 8089 on the server.
  • -p 1935:1935 maps the RTMP port for OBS to port 1935 (default RTMP port) on the server.
  • -v ./settings.json:/config/settings.json maps the file settings.json into the container. [OPTIONAL]

docker-compose

docker-compose will automatically build the image, no need to build it manually.

Install Docker and docker-compose, clone the repository and change into the directory ./docker. Then run:

docker-compose up -d

This docker-compose file will create a volume called broadcastserver-config and automatically add the standard settings.json file to it. It also maps port 8089 and 1935 to the same ports of the host.

Notes for Running Using docker-compose

The container needs to be restarted to apply any changes you make to settings.json.

FreeNAS-FreeBSD build and run

A FreeNAS & TrueNAS plugin had been released. You should find MovieNight into the plugin section of you management GUI. However you still can make an manual plugin deployment, documentation here If you prefer to make an Jail without using the plugin management, a script wich setup an Jail and build and run MovieNight into that Jail as been written, you'll find it here freenas-iocage-movienight

Usage

Now you can use OBS to push a stream to the server. Set the stream URL to

rtmp://your.domain.host/live

and enter the stream key.

Now you can view the stream at

http://your.domain.host:8089/

There is a video only version at

http://your.domain.host:8089/video

and a chat only version at

http://your.domain.host:8089/chat

The default listen port is :8089. It can be changed by providing a new port at startup:

Usage of .\broadcastserver.exe:
  -e bool
        Whether or not to download approved emotes on startup (default "false")
  -k string
        Stream key, to protect your stream (default: "")
  -l string
        host:port of the broadcastserver (default ":8089")
  -r string
        host:port of the RTMP server (default ":1935")
  -f string
        the settings file you want to use (default "./settings.json")

Configuration

broadcastserver configuration is controlled by settings.json:

  • AdminPassword: users can enter /auth <value> into chat to grant themselves admin privileges. This value is automatically regenerated unless RegenAdminPass is false.
  • ApprovedEmotes: list of Twitch users whose emotes can be imported into broadcastserver. Using /addemotes <username> in chat will add to this list.
  • Bans: list of banned users.
  • LetThemLurk: if false, announces when a user enters and leaves chat.
  • ListenAddress: the port that broadcastserver listens on, formatted as :8089.
  • LogFile: the path of the broadcastserver logfile, relative to the executable.
  • LogLevel: the log level, defaults to debug.
  • MaxMessageCount: the number of messages displayed in the chat window.
  • NewPin: if true, regenerates RoomAccessPin when the server starts.
  • PageTitle: The base string used in the <title> element of the page. When the stream title is set with /playing, it is appended; e.g., broadcastserver | The Man Who Killed Hitler and Then the Bigfoot
  • RegenAdminPass: if true, regenerates AdminPassword when the server starts.
  • RoomAccess: the access policy of the chat room; this is managed by the application and should not be edited manually.
  • RoomAccessPin: if set, serves as the password required to enter the chatroom.
  • SessionKey: key used for storing session data (cookies etc.)
  • StreamKey: the key that OBS will use to connect to broadcastserver.
  • StreamStats: if true, prints statistics for the stream on server shutdown.
  • TitleLength: the maximum allowed length for the stream title (set with /playing).
  • TwitchClientID: OAuth client ID for the Twitch API, used for fetching emotes
  • TwitchClientSecret: OAuth client secret for the Twitch API; can be generated locally with curl.
  • WrappedEmotesOnly: if true, requires that emote codes be wrapped in colons or brackets; e.g., :PogChamp:
  • RateLimitChat: the number of seconds between each message a non-privileged user can post in chat.
  • RateLimitNick: the number of seconds before a user can change their nick again.
  • RakeLimitColor: the number of seconds before a user can change their color again.
  • RateLimitAuth: the number of seconds between each allowed auth attempt
  • RateLimitDuplicate: the numeber of seconds before a user can post a duplicate message.
  • NoCache: if true, set Cache-Control: no-cache, must-revalidate in the HTTP header, to prevent caching responses.

License

flv.js is Licensed under the Apache 2.0 license. This project is licened under the MIT license.

Owner
Alberto van Eckeveld
Alberto van Eckeveld Main Java Developer.
Alberto van Eckeveld
Similar Resources

A serverless sync server for Santa, built on AWS

Rudolph Rudolph is the control server counterpart of Santa, and is used to rapidly deploy configurations to Santa agents. Rudolph is built in Amazon W

Dec 5, 2022

Go server SDK for IBM Cloud Event Notifications service

IBM Cloud Event Notifications Go Admin SDK Go client library to interact with the various IBM Cloud Event Notifications APIs. Disclaimer: this SDK is

Dec 14, 2022

Metaverse api server by golang

metaverse_api_server_go 介绍 元宇宙接口 API 服务器 实现。 The implementation of Metaverse standard API 元宇宙接口标准 说明: json 所有接口,字段通常为string类型 元宇宙基础API接口(可通过此服务器获取其他节点

Jan 19, 2022

A REST API microservices-based Twitter Clone server.

Simple API Twitter Clone A REST API microservices-based project to fetch, edit, post, and delete tweets. API documentation The API documentation is bu

May 13, 2022

Centralized backend & server for Vocdoni's Voting-as-a-Service API

Centralized backend & server for Vocdoni's Voting-as-a-Service API

Vocdoni Manager Backend The vocdoni manager is a private service providing organizations with a UI to manage their community and edit their public con

Feb 18, 2022

A web server that sits beside jupyterhub and scrapes answers out of notebook files.

A Prototype grader tool that runs with jupyterhub that essentially parses jupyter notebooks and responds with a set of form fields automatically fille

Feb 22, 2022

A very simple local client-server calculator project built using Cobra and socket programming, written in Go.

Golculator Introduction A very simple local client-server calculator project built using Cobra and socket programming, written in Go. Setup and run Fi

Apr 3, 2022

Spawning up Decoy Server in case of any fraudulent activity and directing the intruder towards the decoy. Auto Killing the decoy if it is idle for too long.

Spawning up Decoy Server in case of any fraudulent activity and directing the intruder towards the decoy. Auto Killing the decoy if it is idle for too long.

SecureX Spawning up Decoy Server in case of any fraudulent activity and directing the intruder towards the decoy. Auto Killing the decoy if it is idle

Jul 9, 2022

A site displaying musical groups information by receiving a public API. The server was written in Go.

A site displaying musical groups information by receiving a public API. The server was written in Go.

A site displaying musical groups information by receiving a public API. The API consists of 4 parts with each represent a subset of the information. W

Dec 13, 2021
Launch & use a graviton instance in 5 seconds.
Launch & use a graviton instance in 5 seconds.

gravitonctl Launch & use a graviton instance in 5 seconds. Usage: To start (and connect to) a Graviton instance: gravitonctl start {name} To connect

Nov 14, 2022
A single-binary cross-platform lightweight client/server connection testing tool.

conntest A single-binary cross-platform lightweight client/server connection testing tool. Currently supports L7 TCP (HTTP). Configuration Options con

Jan 13, 2022
Go Twitter REST and Streaming API v1.1

go-twitter go-twitter is a Go client library for the Twitter API. Check the usage section or try the examples to see how to access the Twitter API. Fe

Dec 28, 2022
StreamWall - WIP demo application which streams music in exchange for streaming sats

Stream Wall Music examples borrowed from https://ableandthewolf.com/ check them

Jul 9, 2022
Service that wrap up different movies-related APIs like IMDB and match it to streaming services
Service that wrap up different movies-related APIs like IMDB and match it to streaming services

Service that wrap up different movies-related APIs like IMDB and match it to streaming services. That way you can check in which platforms you can find your favorite movies.

Feb 10, 2022
Using Golang to complete ChatGPT streaming, making it easier to join your own project
Using Golang to complete ChatGPT streaming, making it easier to join your own project

chatGPT_streaming go语言使用openai的ChatGPT接口实践,使用流式传输,类似ChatGPT网页效果,并且可以让ChatGPT的服务单独部署(单独部署到非大中华区的服务器),并用grpc streaming 做中间层,保证不受墙的影响。使用websocket最终通信,后端考

May 11, 2023
Chat bot for twitch

Microbot Chat bot for twitch. Run You need to provide config and cred files.

Oct 23, 2021
Triangula-api-server - API server for processing images with Triangula

Triangula API server Minimalistic API server that calculates and serves artistic

Jan 10, 2022
Client-server-golang-sqs - Client Server with SQS and golang

Client Server with SQS and golang Multi-threaded client-server demo with Go What

Feb 14, 2022
A payment server for NANO

nano-payment-server This is a server for processing NANO payments in conjunction with a node.

Mar 18, 2022