Autizmo Movie Night https://movie-night.autizmo.xyz
Go to file
2021-08-15 21:04:37 +02:00
common Count the streams using the 'http' sessions instead of the 'IP'. 2021-03-16 22:48:18 +01:00
docker added docker-compose file 2020-03-19 12:55:17 +01:00
installation Add working dir 2020-04-25 15:05:35 -05:00
static add emojis 2021-08-15 13:54:50 -05:00
wasm Don't wrap name highlights with colons 2020-04-27 12:50:29 -04:00
.dockerignore add dockerignore file 2020-06-08 22:19:09 -07:00
.gitignore Multi-target build 2020-10-20 00:45:17 +02:00
.travis.yml Update .travis.yml 2020-10-20 00:53:13 +02:00
chatclient_test.go Fix name highlighting breaking emotes 2019-09-22 15:42:48 -04:00
chatclient.go Stream Viewers minimal statistics. 2021-03-15 23:55:18 +01:00
chatcommands.go Stream Viewers minimal statistics. 2021-03-15 23:55:18 +01:00
chatroom.go add new setting to suppress join/leave announcements 2020-06-03 19:47:57 -07:00
connection.go Add some logging 2019-03-24 18:58:59 -04:00
Dockerfile added Dockerfile 2020-03-19 11:49:42 +01:00
emotes.go Fixed the Emotes feature 2020-10-20 20:57:05 +02:00
errors.go Add more information to error output 2019-03-15 18:57:12 -04:00
favicon.png Replace favicon with something else 2019-03-18 11:21:17 -04:00
go.mod Chat template 2020-10-26 14:27:14 +01:00
go.sum Chat template 2020-10-26 14:27:14 +01:00
handlers.go Zorch review, use session.ID to count running stream 2021-03-20 22:32:13 +01:00
license.md Add MIT license 2020-07-09 18:48:08 -04:00
main.go Gracefully shutdown HTTP server 2021-02-07 15:55:51 -05:00
Makefile Finally found a way to correctly build on BSD, so remove BSD specific 2021-03-17 21:09:39 +01:00
notes.txt Initial commit 2019-03-10 11:42:12 -04:00
readme.md Merge remote-tracking branch 'upstream/master' 2021-08-15 12:18:38 -05:00
settings_example.json Add option to change the RTMP listen address 2020-06-12 23:58:45 -04:00
settings.go setting.go: 2020-10-24 01:08:57 +02:00
stats.go Zorch review, use session.ID to count running stream 2021-03-20 22:32:13 +01:00

Table of Contents

MovieNight 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/zorchenhimer/MovieNight, go into the source directory cd MovieNight;
  • 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=plan9 ARCH=arm64 (On BSD systems use gmake);
  • and run ./MovieNight;

Example :

$ git clone https://git.mentality.rip/sjw/MovieNight.git
$ cd MovieNight
$ make TARGET=linux ARCH=amd64

Docker build

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

Building the Container

Install Docker, clone the repository and build:

docker build -t movienight .

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] movienight

Explanation:

  • -d runs the container in the background.
  • -p 8089:8089 maps the MovieNight 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 movienight-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 (not maintained by me). 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 .\MovieNight.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 MovieNight (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

MovieNights 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 MovieNight. 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 MovieNight listens on, formatted as :8089.
  • LogFile: the path of the MovieNight 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., Movie Night | 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 MovieNight.
  • 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.