• Stars
    star
    681
  • Rank 66,346 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created over 5 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Single instance video streaming server with integrated chat.

Table of Contents

MovieNight stream server

Build status

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.16 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.16.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;
  • run go build

If you want to cross compile instead of running go build:

  • 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/zorchenhimer/MovieNight
$ cd MovieNight
$ (make|gmake) TARGET=windows ARCH=386
$ ./MovieNight

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:

# with default settings file (this uses the settings_example.json config file)
docker run -d -p 8089:8089 -p 1935:1935 movienight

# using a custom settings file
docker run -d -p 8089:8089 -p 1935:1935 -v ./settings.json:/data/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. 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

MovieNight’s 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.
  • 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).
  • 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.

More Repositories

1

nes-runner

An infinite runner NES game!
Assembly
35
star
2

nes-pong

Pong written from scratch for the NES
Assembly
20
star
3

MoviePolls

Voting to decide on a movie to watch with MovieNight
Go
16
star
4

nes-platforming

A platforming demo for the NES wirtten in 6502 assembly!
Assembly
15
star
5

nes-breakout

Breakout meets Inception on the NES
Assembly
15
star
6

go-nes

A library and some utilities to help with NES development
Go
11
star
7

steam-screenshots

Steam screenshot hosting server.
Go
11
star
8

brainfuck

Brainfuck interpreter written in Go
Go
8
star
9

nes-game-of-life

Conway's Game of Life on the NES
Assembly
5
star
10

emu-6502

A simple 6502 emulator
Go
4
star
11

nes-dvd-screensaver

The DVD screensaver on the NES
Assembly
4
star
12

rar2zip

Convert RAR files into ZIP files
Go
4
star
13

opentracker

Opentracker fork using inotify for accesslist updates.
C
3
star
14

rcon

Simple remote console client for Quake 2 servers.
Python
3
star
15

bmp2chr

Utility to convert bitmaps into NES CHR image data
Go
3
star
16

nes-snek

A Snake game on the NES
Assembly
2
star
17

ld65-labels

Takes a debug file from ld65 and outputs a symbol file for the Mesen and FCEUX emulators.
Go
2
star
18

mangahere

Scraper for Manga Here
Go
2
star
19

why

Go
2
star
20

nes-parallax

Parallax scrolling demo on the NES written in 6502 assembly
Assembly
2
star
21

whitespace

Whitespace Interpreter written in Go
Go
2
star
22

hacker-quotes

A hacker quote generator
Go
1
star
23

opentracker-manage

Script to manage opentracker accesslists.
Perl
1
star
24

webcam

Short webcam image capture script.
Python
1
star
25

nes-pooh

Photoshop is for plebs
Assembly
1
star
26

NoudaEngine

2D Topdown Shooter Engine
Python
1
star
27

go-acc

A utility to verify CRC32 hashes in filenames and generate ed2k links
Go
1
star
28

baseEmoji

Go package to encode things in emojis, because reasons.
Go
1
star
29

zorchenhimer

1
star