{"id":13400573,"url":"https://github.com/zorchenhimer/MovieNight","last_synced_at":"2025-03-14T06:31:45.413Z","repository":{"id":41125092,"uuid":"174844447","full_name":"zorchenhimer/MovieNight","owner":"zorchenhimer","description":"Single instance video streaming server with integrated chat.","archived":false,"fork":false,"pushed_at":"2024-03-25T14:19:04.000Z","size":4956,"stargazers_count":678,"open_issues_count":28,"forks_count":87,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-07-31T19:25:31.141Z","etag":null,"topics":["chat-room","golang-web-application","livestreaming","movienight","movienight-stream-server","rtmp-port","stream","streaming","video","video-streaming","webassembly","websocket-chat"],"latest_commit_sha":null,"homepage":"https://discord.gg/F2VSgjJ","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zorchenhimer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-10T15:43:50.000Z","updated_at":"2024-07-27T22:52:32.000Z","dependencies_parsed_at":"2024-06-18T20:03:35.599Z","dependency_job_id":"a9efc4ea-36c6-41b2-aa35-8124528bff9b","html_url":"https://github.com/zorchenhimer/MovieNight","commit_stats":{"total_commits":609,"total_committers":22,"mean_commits":"27.681818181818183","dds":0.6420361247947455,"last_synced_commit":"75854ce144b2021d210b82055f6a1d2dc1b66f76"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zorchenhimer%2FMovieNight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zorchenhimer%2FMovieNight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zorchenhimer%2FMovieNight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zorchenhimer%2FMovieNight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zorchenhimer","download_url":"https://codeload.github.com/zorchenhimer/MovieNight/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221440198,"owners_count":16821600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat-room","golang-web-application","livestreaming","movienight","movienight-stream-server","rtmp-port","stream","streaming","video","video-streaming","webassembly","websocket-chat"],"created_at":"2024-07-30T19:00:53.481Z","updated_at":"2025-03-14T06:31:45.403Z","avatar_url":"https://github.com/zorchenhimer.png","language":"Go","funding_links":[],"categories":["Go","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"\u003c!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc --\u003e\n**Table of Contents**\n- [MovieNight stream server](#movienight-stream-server)\n    - [Build requirements](#build-requirements)\n        - [Older Go Versions](#older-go-versions)\n        - [Compile and install](#compile-and-install)\n        - [Docker build](#docker-build)\n            - [Building the Container](#building-the-container)\n            - [Running the Container](#running-the-container)\n            - [docker-compose](#docker-compose)\n            - [Notes for Running Using docker-compose](#notes-for-running-using-docker-compose)\n        - [FreeNAS / TrueNAS / FreeBSD build and run](#freenas-freebsd-build-and-run)\n        - [Clever-Cloud deployment and run](#clever-cloud-deployment-and-run)\n    - [Usage](#usage)\n    - [Configuration](#configuration)\n\n\u003c!-- markdown-toc end --\u003e\n# MovieNight stream server\n[![Build status](https://api.travis-ci.org/zorchenhimer/MovieNight.svg?branch=master)](https://travis-ci.org/zorchenhimer/MovieNight)\n\nThis 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.\n\n## Build requirements\n- Go 1.16 or newer\n- GNU Make\n\n### Older Go Versions\nYou can install a newer version of Go alongside your OS's distribution by following the guide here: [https://golang.org/doc/manage-install](https://golang.org/doc/manage-install)\n\nOnce 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.\n\n### Compile and install\nYou have to: \n- download `git clone https://github.com/zorchenhimer/MovieNight`, go into the source directory `cd MovieNight`;\n- run `go build`\n\nIf you want to cross compile instead of running `go build`:\n- choose your `TARGET` oneof \"android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows\";\n- choose your `ARCH` oneof \"386 amd64 amd64p32 arm arm64 ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32leppc s390 s390x sparc sparc64\";\n- build `make TARGET=windows ARCH=386` (On BSD systems use `gmake`);\n- and run `./MovieNight`;\n\nExample:\n```shell\n$ git clone https://github.com/zorchenhimer/MovieNight\n$ cd MovieNight\n$ (make|gmake) TARGET=windows ARCH=386\n$ ./MovieNight\n```\n\n### Docker Packages\n\nThe image can be pulled using the command below. View tagged versions at [ghcr](https://github.com/zorchenhimer/MovieNight/pkgs/container/movienight)\n\n```bash\ndocker pull ghcr.io/zorchenhimer/movienight:master\n```\n\n### Docker build\nMovieNight provides a Dockerfile and a docker-compose file to run MovieNight using Docker.\n\n#### Building the Container\nInstall Docker, clone the repository and build:\n\n```shell\ndocker build -t movienight .\n```\n\n#### Running the Container\nRun the image once it's built:\n\n```shell\n# with default settings file (this uses the settings_example.json config file)\ndocker run -d -p 8089:8089 -p 1935:1935 movienight\n\n# using a custom settings file\ndocker run -d -p 8089:8089 -p 1935:1935 -v ./settings.json:/data/config/settings.json movienight\n```\n\nExplanation:\n- **-d** runs the container in the background.\n- **-p 8089:8089** maps the MovieNight web interface to port 8089 on the server.\n- **-p 1935:1935** maps the RTMP port for OBS to port 1935 (default RTMP port) on the server.\n- **-v ./settings.json:/config/settings.json** maps the file *settings.json* into the container. [OPTIONAL]\n\n#### docker-compose\ndocker-compose will automatically build the image, no need to build it manually.\n\nInstall Docker and docker-compose, clone the repository and change into the directory *./docker*. Then run:\n\n```shell\ndocker-compose up -d\n```\n\nThis 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.\n\n#### Notes for Running Using docker-compose\nThe container needs to be restarted to apply any changes you make to *settings.json*.\n\n### FreeNAS-FreeBSD build and run\nA [FreeNAS \u0026 TrueNAS plugin](https://github.com/zorglube/iocage-plugin-movienight) 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](https://github.com/freenas/iocage-ix-plugins)\nIf 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](https://github.com/zorglube/freenas-iocage-movienight)  \n\n### Clever-Cloud deployment and run\nIf you don't like to handle the build and run of your MovieNight instance, here is an samll manual of \"how to make it run on [Clever-Cloud](https://www.clever-cloud.com)\".\nInto your Clever-Cloud dashboard:\n - Create a \"Brand New App\" and choose `Go` runtime instance\n - Name it, choose your datacenter\n - You don't neet any \"Add-On\", unless you want to provide some Emotes to you MovieNight instance\n - Add thoses environement-variables (expert mode allow you copy past frome this page):\n      - `CC_GO_BUILD_TOOL=\"gobuild\"` Set The build method\n      - `CC_GO_PKG=\"github.com/zorchenhimer/MovieNight\"` Set the `Go` dependencies origin\n      - `CC_PRE_RUN_HOOK=\"echo \\\"{\\\\\\\"ApprovedEmotes\\\\\\\": true, \\\\\\\"Bans\\\\\\\": [], \\\\\\\"LetThemLurk\\\\\\\": false, \\\\\\\"ListenAddress\\\\\\\": \\\\\\\":8080\\\\\\\", \\\\\\\"LogFile\\\\\\\": \\\\\\\"thelog.log\\\\\\\", \\\\\\\"LogLevel\\\\\\\": \\\\\\\"debug\\\\\\\", \\\\\\\"MaxMessageCount\\\\\\\": 300, \\\\\\\"NoCache\\\\\\\": false, \\\\\\\"NewPin\\\\\\\": true, \\\\\\\"PageTitle\\\\\\\": \\\\\\\"Movie Night\\\\\\\", \\\\\\\"RateLimitAuth\\\\\\\": 5, \\\\\\\"RateLimitChat\\\\\\\": 1, \\\\\\\"RateLimitColor\\\\\\\": 60, \\\\\\\"RateLimitDuplicate\\\\\\\": 30, \\\\\\\"RateLimitNick\\\\\\\": 300, \\\\\\\"RegenAdminPass\\\\\\\": true, \\\\\\\"RtmpListenAddress\\\\\\\": \\\\\\\":4040\\\\\\\", \\\\\\\"RoomAccess\\\\\\\": \\\\\\\"pin\\\\\\\", \\\\\\\"RoomAccessPin\\\\\\\": \\\\\\\"9999\\\\\\\", \\\\\\\"StreamKey\\\\\\\": \\\\\\\"ALongStreamKey\\\\\\\", \\\\\\\"StreamStats\\\\\\\": true, \\\\\\\"TitleLength\\\\\\\": 50, \\\\\\\"WrappedEmotesOnly\\\\\\\": true}\\\" \u003e\u003e /home/bas/go_home/bin/settings.json\"` The command that will build a default configuration file `settings.json`\n      - `CC_RUN_COMMAND=\"${MN_BIN_DIR}/${MN_BIN_NAME} -l ${MN_PORT} -r ${MN_RTMP} -s ${MN_STATIC} -k ${MN_STREAM_KEY}\"` The run command\n      - `MN_BIN_DIR=\"/home/bas/go_home/bin\"` The built binary directory\n      - `MN_BIN_NAME=\"MovieNight\"` The name of the runnable bin\n      - `MN_PORT=\":8080\"` The http port\n      - `MN_RTMP=\":4040\"` The rtmp port\n      - `MN_STATIC=\"${APP_HOME}/static\"` The static contents dir\n      - `MN_STREAM_KEY=\"YourStreamKey\"` Your secret stream key, you have to change it\n - Turn on the TCP redirection\n - Try run your MovieNight instance\n\nHere is an example of the Clever-Cloud app Evironement Variables you can use after fex customizations:\n\n```text\nCC_GO_BUILD_TOOL=\"gobuild\"\nCC_GO_PKG=\"github.com/zorchenhimer/MovieNight\"\nCC_PRE_RUN_HOOK=\"echo \\\"{\\\\\\\"ApprovedEmotes\\\\\\\": true, \\\\\\\"Bans\\\\\\\": [], \\\\\\\"LetThemLurk\\\\\\\": false, \\\\\\\"ListenAddress\\\\\\\": \\\\\\\":8080\\\\\\\", \\\\\\\"LogFile\\\\\\\": \\\\\\\"thelog.log\\\\\\\", \\\\\\\"LogLevel\\\\\\\": \\\\\\\"debug\\\\\\\", \\\\\\\"MaxMessageCount\\\\\\\": 300, \\\\\\\"NoCache\\\\\\\": false, \\\\\\\"NewPin\\\\\\\": true, \\\\\\\"PageTitle\\\\\\\": \\\\\\\"Movie Night\\\\\\\", \\\\\\\"RateLimitAuth\\\\\\\": 5, \\\\\\\"RateLimitChat\\\\\\\": 1, \\\\\\\"RateLimitColor\\\\\\\": 60, \\\\\\\"RateLimitDuplicate\\\\\\\": 30, \\\\\\\"RateLimitNick\\\\\\\": 300, \\\\\\\"RegenAdminPass\\\\\\\": true, \\\\\\\"RtmpListenAddress\\\\\\\": \\\\\\\":4040\\\\\\\", \\\\\\\"RoomAccess\\\\\\\": \\\\\\\"pin\\\\\\\", \\\\\\\"RoomAccessPin\\\\\\\": \\\\\\\"9999\\\\\\\", \\\\\\\"StreamKey\\\\\\\": \\\\\\\"ALongStreamKey\\\\\\\", \\\\\\\"StreamStats\\\\\\\": true, \\\\\\\"TitleLength\\\\\\\": 50, \\\\\\\"WrappedEmotesOnly\\\\\\\": true}\\\" \u003e\u003e /home/bas/go_home/bin/settings.json\"\nCC_RUN_COMMAND=\"${MN_BIN_DIR}/${MN_BIN_NAME} -l ${MN_PORT} -r ${MN_RTMP} -s ${MN_STATIC} -k ${MN_STREAM_KEY}\"\nMN_BIN_DIR=\"/home/bas/go_home/bin\"\nMN_BIN_NAME=\"MovieNight\"\nMN_PORT=\":8080\"\nMN_RTMP=\":4040\"\nMN_STATIC=\"${APP_HOME}/static\"\nMN_STREAM_KEY=\"YourStreamKey\"\n```\n\n## Usage\nNow you can use OBS to push a stream to the server. Set the stream URL to\n\n```text\nrtmp://your.domain.host/live\n```\n\nand enter the stream key.\n\nNow you can view the stream at\n\n```text\nhttp://your.domain.host:8089/\n```\n\nThere is a video only version at\n\n```text\nhttp://your.domain.host:8089/video\n```\n\nand a chat only version at\n\n```text\nhttp://your.domain.host:8089/chat\n```\n\nThe default listen port is `:8089`. It can be changed by providing a new port at startup:\n\n```text\nUsage of .\\MovieNight.exe:\n  -e bool\n        Whether or not to download approved emotes on startup (default \"false\")\n  -k string\n        Stream key, to protect your stream (default: \"\")\n  -l string\n        host:port of the MovieNight (default \":8089\")\n  -r string\n        host:port of the RTMP server (default \":1935\")\n  -f string\n        the settings file you want to use (default \"./settings.json\")\n```\n\n## Configuration\nMovieNight’s configuration is controlled by `settings.json`:\n\n    - `AdminPassword`: users can enter `/auth \u003cvalue\u003e` into chat to grant themselves admin privileges.  This value is automatically regenerated unless `RegenAdminPass` is false.\n    - `Bans`: list of banned users.\n    - `LetThemLurk`: if false, announces when a user enters and leaves chat.\n    - `ListenAddress`: the port that MovieNight listens on, formatted as `:8089`.\n    - `LogFile`: the path of the MovieNight logfile, relative to the executable.\n    - `LogLevel`: the log level, defaults to `debug`.\n    - `MaxMessageCount`: the number of messages displayed in the chat window.\n    - `NewPin`: if true, regenerates `RoomAccessPin` when the server starts.\n    - `NewStreamKey`: if true, uses a random `StreamKey` when the server starts. The command line option takes precedence, and will be used if it is set.\n    - `PageTitle`: The base string used in the `\u003ctitle\u003e` 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`\n    - `RegenAdminPass`: if true, regenerates `AdminPassword` when the server starts.\n    - `RoomAccess`: the access policy of the chat room; this is managed by the application and should not be edited manually.\n    - `RoomAccessPin`: if set, serves as the password required to enter the chatroom.\n    - `SessionKey`: key used for storing session data (cookies etc.)\n    - `StreamKey`: the key that OBS will use to connect to MovieNight.\n    - `StreamStats`: if true, prints statistics for the stream on server shutdown.\n    - `TitleLength`: the maximum allowed length for the stream title (set with `/playing`).\n    - `WrappedEmotesOnly`: if true, requires that emote codes be wrapped in colons or brackets; e.g., `:PogChamp:`\n    - `RateLimitChat`: the number of seconds between each message a non-privileged user can post in chat.\n    - `RateLimitNick`: the number of seconds before a user can change their nick again.\n    - `RakeLimitColor`: the number of seconds before a user can change their color again.\n    - `RateLimitAuth`: the number of seconds between each allowed auth attempt.\n    - `RateLimitDuplicate`: the numeber of seconds before a user can post a duplicate message.\n    - `NoCache`: if true, set `Cache-Control: no-cache, must-revalidate` in the HTTP header, to prevent caching responses.\n\n## License\n`flv.js` is Licensed under the Apache 2.0 license. This project is licened under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzorchenhimer%2FMovieNight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzorchenhimer%2FMovieNight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzorchenhimer%2FMovieNight/lists"}