Changed EOL into readme.md

This commit is contained in:
Zorglube 2020-08-23 17:55:26 +02:00
parent 37ff82f9cc
commit 9f6061c1d7
1 changed files with 176 additions and 176 deletions

352
readme.md
View File

@ -1,176 +1,176 @@
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc --> <!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents** **Table of Contents**
- [MovieNight stream server](#movienight-stream-server) - [MovieNight stream server](#movienight-stream-server)
- [Build requirements](#build-requirements) - [Build requirements](#build-requirements)
- [Older Go Versions](#older-go-versions) - [Older Go Versions](#older-go-versions)
- [Compile and install](#compile-and-install) - [Compile and install](#compile-and-install)
- [Docker build](#docker-build) - [Docker build](#docker-build)
- [Building the Container](#building-the-container) - [Building the Container](#building-the-container)
- [Running the Container](#running-the-container) - [Running the Container](#running-the-container)
- [docker-compose](#docker-compose) - [docker-compose](#docker-compose)
- [Notes for Running Using docker-compose](#notes-for-running-using-docker-compose) - [Notes for Running Using docker-compose](#notes-for-running-using-docker-compose)
- [FreeNAS / FreeBSD build and run](#FreeNAS-FreeBSD) - [FreeNAS / FreeBSD build and run](#FreeNAS-FreeBSD)
- [Usage](#usage) - [Usage](#usage)
- [Configuration](#configuration) - [Configuration](#configuration)
<!-- markdown-toc end --> <!-- markdown-toc end -->
# MovieNight stream server # MovieNight stream server
[![Build status](https://api.travis-ci.org/zorchenhimer/MovieNight.svg?branch=master)](https://travis-ci.org/zorchenhimer/MovieNight) [![Build status](https://api.travis-ci.org/zorchenhimer/MovieNight.svg?branch=master)](https://travis-ci.org/zorchenhimer/MovieNight)
This is a single-instance streaming server with chat. Originally written to 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 replace Rabbit as the platform for watching movies with a group of people
online. online.
## Build requirements ## Build requirements
- Go 1.13 or newer - Go 1.13 or newer
- GNU Make - GNU Make
### Older Go Versions ### Older Go Versions
You can install a newer version of Go alongside your OS's distribution by You can install a newer version of Go alongside your OS's distribution by
following the guide here: [https://golang.org/doc/install#extra_versions](https://golang.org/doc/install#extra_versions) following the guide here: [https://golang.org/doc/install#extra_versions](https://golang.org/doc/install#extra_versions)
Once you have that setup add an enviromnent variable named `GO_VERSION` and 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 set it to the version you installed (eg, `1.14.1`). The Makefile will now use
the newer version. the newer version.
### Compile and install ### Compile and install
You have to : You have to :
- download **git clone https://github.com/zorchenhimer/MovieNight**, go into the source directory **cd MovieNight**; - 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 `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"; - 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**; - build **make TARGET=windows ARCH=386**;
- and run **./MovieNight**; - and run **./MovieNight**;
Example : Example :
```bash ```bash
$ git clone https://github.com/zorchenhimer/MovieNight $ git clone https://github.com/zorchenhimer/MovieNight
$ cd MovieNight $ cd MovieNight
$ make TARGET=windows ARCH=386 $ make TARGET=windows ARCH=386
$ ./MovieNight $ ./MovieNight
``` ```
### Docker build ### Docker build
MovieNight provides a Dockerfile and a docker-compose file to run MovieNight using Docker. MovieNight provides a Dockerfile and a docker-compose file to run MovieNight using Docker.
#### Building the Container #### Building the Container
Install Docker, clone the repository and build: Install Docker, clone the repository and build:
```shell ```shell
docker build -t movienight . docker build -t movienight .
``` ```
#### Running the Container #### Running the Container
Run the image once it's built: Run the image once it's built:
```shell ```shell
docker run -d -p 8089:8089 -p 1935:1935 [-v ./settings.json:/config/settings.json] movienight docker run -d -p 8089:8089 -p 1935:1935 [-v ./settings.json:/config/settings.json] movienight
``` ```
Explanation: Explanation:
- **-d** runs the container in the background. - **-d** runs the container in the background.
- **-p 8089:8089** maps the MovieNight web interface to port 8089 on the server. - **-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. - **-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] - **-v ./settings.json:/config/settings.json** maps the file *settings.json* into the container. [OPTIONAL]
#### docker-compose #### docker-compose
docker-compose will automatically build the image, no need to build it manually. 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: Install Docker and docker-compose, clone the repository and change into the directory *./docker*. Then run:
```shell ```shell
docker-compose up -d 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. 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 #### Notes for Running Using docker-compose
The container needs to be restarted to apply any changes you make to *settings.json*. The container needs to be restarted to apply any changes you make to *settings.json*.
### FreeNAS - FreeBSD build and run ### FreeNAS - FreeBSD build and run
An script wich setup an Jail and build and run MovieNight into that Jail as been writen, you'll find it here [freenas-iocage-movienight] (https://github.com/zorglube/freenas-iocage-movienight) An script wich setup an Jail and build and run MovieNight into that Jail as been writen, you'll find it here [freenas-iocage-movienight] (https://github.com/zorglube/freenas-iocage-movienight)
## Usage ## Usage
Now you can use OBS to push a stream to the server. Set the stream URL to Now you can use OBS to push a stream to the server. Set the stream URL to
```text ```text
rtmp://your.domain.host/live rtmp://your.domain.host/live
``` ```
and enter the stream key. and enter the stream key.
Now you can view the stream at Now you can view the stream at
```text ```text
http://your.domain.host:8089/ http://your.domain.host:8089/
``` ```
There is a video only version at There is a video only version at
```text ```text
http://your.domain.host:8089/video http://your.domain.host:8089/video
``` ```
and a chat only version at and a chat only version at
```text ```text
http://your.domain.host:8089/chat http://your.domain.host:8089/chat
``` ```
The default listen port is `:8089`. It can be changed by providing a new port The default listen port is `:8089`. It can be changed by providing a new port
at startup: at startup:
```text ```text
Usage of .\MovieNight.exe: Usage of .\MovieNight.exe:
-e bool -e bool
Whether or not to download approved emotes on startup (default "false") Whether or not to download approved emotes on startup (default "false")
-k string -k string
Stream key, to protect your stream (default: "") Stream key, to protect your stream (default: "")
-l string -l string
host:port of the MovieNight (default ":8089") host:port of the MovieNight (default ":8089")
-r string -r string
host:port of the RTMP server (default ":1935") host:port of the RTMP server (default ":1935")
-f string -f string
the settings file you want to use (default "./settings.json") the settings file you want to use (default "./settings.json")
``` ```
## Configuration ## Configuration
MovieNights configuration is controlled by `settings.json`: MovieNights configuration is controlled by `settings.json`:
- `AdminPassword`: users can enter `/auth <value>` into chat to grant themselves - `AdminPassword`: users can enter `/auth <value>` into chat to grant themselves
admin privileges. This value is automatically regenerated unless admin privileges. This value is automatically regenerated unless
`RegenAdminPass` is false. `RegenAdminPass` is false.
- `ApprovedEmotes`: list of Twitch users whose emotes can be imported into - `ApprovedEmotes`: list of Twitch users whose emotes can be imported into
MovieNight. Using `/addemotes <username>` in chat will add to this list. MovieNight. Using `/addemotes <username>` in chat will add to this list.
- `Bans`: list of banned users. - `Bans`: list of banned users.
- `LetThemLurk`: if false, announces when a user enters and leaves chat. - `LetThemLurk`: if false, announces when a user enters and leaves chat.
- `ListenAddress`: the port that MovieNight listens on, formatted as `:8089`. - `ListenAddress`: the port that MovieNight listens on, formatted as `:8089`.
- `LogFile`: the path of the MovieNight logfile, relative to the executable. - `LogFile`: the path of the MovieNight logfile, relative to the executable.
- `LogLevel`: the log level, defaults to `debug`. - `LogLevel`: the log level, defaults to `debug`.
- `MaxMessageCount`: the number of messages displayed in the chat window. - `MaxMessageCount`: the number of messages displayed in the chat window.
- `NewPin`: if true, regenerates `RoomAccessPin` when the server starts. - `NewPin`: if true, regenerates `RoomAccessPin` when the server starts.
- `PageTitle`: The base string used in the `<title>` element of the page. When - `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` 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. - `RegenAdminPass`: if true, regenerates `AdminPassword` when the server starts.
- `RoomAccess`: the access policy of the chat room; this is managed by the - `RoomAccess`: the access policy of the chat room; this is managed by the
application and should not be edited manually. application and should not be edited manually.
- `RoomAccessPin`: if set, serves as the password required to enter the chatroom. - `RoomAccessPin`: if set, serves as the password required to enter the chatroom.
- `SessionKey`: key used for storing session data (cookies etc.) - `SessionKey`: key used for storing session data (cookies etc.)
- `StreamKey`: the key that OBS will use to connect to MovieNight. - `StreamKey`: the key that OBS will use to connect to MovieNight.
- `StreamStats`: if true, prints statistics for the stream on server shutdown. - `StreamStats`: if true, prints statistics for the stream on server shutdown.
- `TitleLength`: the maximum allowed length for the stream title (set with `/playing`). - `TitleLength`: the maximum allowed length for the stream title (set with `/playing`).
- `TwitchClientID`: OAuth client ID for the Twitch API, used for fetching emotes - `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](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-client-credentials-flow). - `TwitchClientSecret`: OAuth client secret for the Twitch API; [can be generated locally with curl](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-client-credentials-flow).
- `WrappedEmotesOnly`: if true, requires that emote codes be wrapped in colons - `WrappedEmotesOnly`: if true, requires that emote codes be wrapped in colons
or brackets; e.g., `:PogChamp:` or brackets; e.g., `:PogChamp:`
- `RateLimitChat`: the number of seconds between each message a non-privileged - `RateLimitChat`: the number of seconds between each message a non-privileged
user can post in chat. user can post in chat.
- `RateLimitNick`: the number of seconds before a user can change their nick again. - `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. - `RakeLimitColor`: the number of seconds before a user can change their color again.
- `RateLimitAuth`: the number of seconds between each allowed auth attempt - `RateLimitAuth`: the number of seconds between each allowed auth attempt
- `RateLimitDuplicate`: the numeber of seconds before a user can post a - `RateLimitDuplicate`: the numeber of seconds before a user can post a
duplicate message. duplicate message.
- `NoCache`: if true, set `Cache-Control: no-cache, must-revalidate` in the HTTP - `NoCache`: if true, set `Cache-Control: no-cache, must-revalidate` in the HTTP
header, to prevent caching responses. header, to prevent caching responses.
## License ## License
`flv.js` is Licensed under the Apache 2.0 license. This project is licened under the MIT license. `flv.js` is Licensed under the Apache 2.0 license. This project is licened under the MIT license.