|
1 |
| -# Encodarr |
| 1 | +<p align="center"> |
| 2 | + <img src="images/Encodarr-Text-Logo.png" height="175"/> |
| 3 | +</p> |
2 | 4 |
|
3 |
| -Docker-based webapp for encoding video files to the HEVC \(H.265\) standard. |
| 5 | +[](https://github.com/BrenekH/encodarr/blob/master/LICENSE) |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +[](https://github.com/BrenekH/encodarr/actions/workflows/controller.yaml) |
| 13 | +[](https://github.com/BrenekH/encodarr/actions/workflows/runner.yaml) |
4 | 14 |
|
5 |
| -## Docker Compose |
| 15 | +## What is Encodarr? |
6 | 16 |
|
7 |
| -Recommended `docker-compose.yaml` \(Assumes the docker image was built with the tag `brenekh/encodarr:latest`\) |
| 17 | +Encodarr is a self-hosted web application that encodes video files to a target format using distributed computing. |
8 | 18 |
|
9 |
| -```yaml |
| 19 | +## Why use Encodarr? |
| 20 | +<!-- TODO: Why use Encodarr? (other than easy to setup) --> |
| 21 | + |
| 22 | +### Easy to Setup |
| 23 | + |
| 24 | +Encodarr bypasses the need to share media across the network by instead transmitting the file to be operated on to the Runners. |
| 25 | +This means that Encodarr is much easier to setup than other solutions. |
| 26 | + |
| 27 | +## Dependencies |
| 28 | + |
| 29 | +The container images come with the dependencies installed, so if you go that route, all you need is [Docker](https://docs.docker.com/get-docker/). |
| 30 | + |
| 31 | +If you are not using containers, you will need [mediainfo](https://mediaarea.net/en/MediaInfo/Download) and [FFmpeg](https://ffmpeg.org/download.html) in the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) variable. |
| 32 | + |
| 33 | +## Installing |
| 34 | + |
| 35 | +Container images are available from Docker Hub([Controller](https://hub.docker.com/r/brenekh/encodarr-controller), [Runner](https://hub.docker.com/repository/docker/brenekh/encodarr-runner)) and the GitHub Container Registry([Controller](https://github.com/users/BrenekH/packages/container/package/encodarr-controller), [Runner](https://github.com/users/BrenekH/packages/container/package/encodarr-runner)). |
| 36 | + |
| 37 | +Pre-built executables are available via the [Releases](https://github.com/BrenekH/encodarr/releases/latest) page. |
| 38 | + |
| 39 | +## Usage |
| 40 | + |
| 41 | +### Docker/Docker Compose |
| 42 | + |
| 43 | +The latest Controller version can be run using the following `docker run` command: |
| 44 | + |
| 45 | +```bash |
| 46 | +docker run -d \ |
| 47 | + --name Encodarr-Controller \ |
| 48 | + -e TZ=Europe/London \ |
| 49 | + -v <path to data>:/config:rw \ |
| 50 | + -v <path to media>:/media:rw \ |
| 51 | + -p 8123:8123 \ |
| 52 | + --restart unless-stopped \ |
| 53 | + --user 1000:1000 \ |
| 54 | + brenekh/encodarr-controller:latest |
| 55 | +``` |
| 56 | + |
| 57 | +or if you prefer Docker Compose: |
| 58 | + |
| 59 | +```yml |
10 | 60 | version: "2.2"
|
11 | 61 | services:
|
12 |
| - encodarr: |
13 |
| - image: brenekh/encodarr:latest |
14 |
| - container_name: Encodarr |
| 62 | + encodarr-controller: |
| 63 | + image: brenekh/encodarr-controller:latest |
| 64 | + container_name: Encodarr-Controller |
| 65 | + environment: |
| 66 | + - TZ=Europe/London |
15 | 67 | volumes:
|
16 |
| - - /config:/config:rw |
17 |
| - - /media/folder/to/search:/usr/app/tosearch:rw |
| 68 | + - <path to controller data>:/config:rw |
| 69 | + - <path to media>:/media:rw |
18 | 70 | ports:
|
19 |
| - - 5000:5000 |
| 71 | + - 8123:8123 |
20 | 72 | restart: unless-stopped
|
21 |
| - cpus: 2.00 |
22 |
| - stop_signal: SIGINT |
| 73 | + user: "1000:1000" |
| 74 | +``` |
| 75 | +
|
| 76 | +The latest Runner version is similar. |
| 77 | +
|
| 78 | +Docker run: |
| 79 | +
|
| 80 | +```bash |
| 81 | +docker run -d \ |
| 82 | + --name Encodarr-Runner \ |
| 83 | + -v <path to runner data>:/config:rw \ |
| 84 | + -e "ENCODARR_RUNNER_NAME=Runner 1" \ |
| 85 | + -e ENCODARR_RUNNER_CONTROLLER_IP=<Controller IP> \ |
| 86 | + -e ENCODARR_RUNNER_CONTROLLER_PORT=8123 \ |
| 87 | + --restart unless-stopped \ |
| 88 | + brenekh/encodarr-runner:latest |
23 | 89 | ```
|
24 | 90 |
|
25 |
| -## Environment Variables |
| 91 | +Docker Compose: |
| 92 | + |
| 93 | +```yml |
| 94 | +version: "2.2" |
| 95 | +services: |
| 96 | + encodarr-runner: |
| 97 | + image: brenekh/encodarr-runner:latest |
| 98 | + container_name: Encodarr-Runner |
| 99 | + volumes: |
| 100 | + - <path to runner data>:/config:rw |
| 101 | + environment: |
| 102 | + - ENCODARR_RUNNER_NAME=Runner 1 |
| 103 | + - ENCODARR_RUNNER_CONTROLLER_IP=<Controller IP> |
| 104 | + - ENCODARR_RUNNER_CONTROLLER_PORT=8123 |
| 105 | + restart: unless-stopped |
| 106 | +``` |
| 107 | +
|
| 108 | +The Controller `path to media` and the corresponding mount inside the container can be anything you want and you can have as many as you want. |
| 109 | +For example, `/mnt/disk/tv:/tv:rw` and `/mnt/disk/movies:/movies:rw`. |
| 110 | + |
| 111 | +In addition, the paths to data that are mounted to `/config` in the container should be separate folders, ideally with full paths\(`/home/user/docker` instead of `~/docker`\). |
| 112 | + |
| 113 | +### Startup Configuration |
| 114 | + |
| 115 | +Startup values configured either through environment variables, or command line arguments. |
| 116 | +All of the command line variants expect a value after a space (`--port 8123`) expect the Runner `--debug` flag. |
| 117 | +It is a boolean flag. |
| 118 | + |
| 119 | +#### Controller |
| 120 | + |
| 121 | +`ENCODARR_PORT`, `--port` sets the port for the HTTP web server. |
| 122 | +For containers, it is recommended to modify the external port (`8124:8123`) instead of setting this value. |
| 123 | +(default: `8123`) |
| 124 | + |
| 125 | +`ENCODARR_CONFIG_DIR`, `--config-dir` sets the directory that the configuration files are saved to. |
| 126 | +This includes the log file. |
| 127 | +In a container, this is pre-set to `/config`. |
| 128 | +(default: `<platform user config directory>/encodarr/controller/config`) |
| 129 | + |
| 130 | +#### Runner |
| 131 | + |
| 132 | +`ENCODARR_DEBUG`, `--debug` enables outputting debug messages to the log. |
| 133 | +If the environment variable is set to `True`, then debug messages are turned on. |
| 134 | +(default: `False`) |
| 135 | + |
| 136 | +`ENCODARR_LOG_FILE` sets the location of the runner log file. |
| 137 | +(default: `/config/runner.log`) |
| 138 | + |
| 139 | +`ENCODARR_RUNNER_NAME`, `--name` sets the name to be shown in the Web UI when referring to this runner. |
| 140 | +(default: `Runner-<random 3 digit number>`) |
| 141 | + |
| 142 | +`ENCODARR_RUNNER_CONTROLLER_IP`, `--controller-ip` sets the IP for connecting to the Controller. |
| 143 | +(default: `localhost`) |
| 144 | + |
| 145 | +`ENCODARR_RUNNER_CONTROLLER_PORT`, `--controller-port` sets the port for connecting to the Controller. |
| 146 | +(default: `8123`) |
| 147 | + |
| 148 | +## Contributing |
| 149 | + |
| 150 | +If you want to contribute to this project, head over to [CONTRIBUTING.md](CONTRIBUTING.md) to get started. |
| 151 | +Do note that the project is going to be rewritten soon to more closely follow clean architecture guidelines, so contributing to the `master` or `development` branches is not recommended at this time. |
| 152 | + |
| 153 | +## Code of Conduct |
26 | 154 |
|
27 |
| -### Common |
| 155 | +This project holds all maintainers, contributors, and participants to the standards outlined by the Contributor Covenant, a copy of which can be found in [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). |
28 | 156 |
|
29 |
| -- ENCODARR_DEBUG (bool) |
| 157 | +## Future Plans |
30 | 158 |
|
31 |
| -- ENCODARR_LOG_FILE (string) |
| 159 | +* Rewrite Runner from Python to Go (following Clean Architecture guidelines) |
32 | 160 |
|
33 |
| -### Runner |
| 161 | +* Rewrite Controller to conform to Clean Architecture guidelines |
34 | 162 |
|
35 |
| -- ENCODARR_RUNNER_NAME (string) |
| 163 | +* Instead of configuring with dropdowns and checkboxes, use a plugin system |
36 | 164 |
|
37 |
| -- ENCODARR_RUNNER_CONTROLLER_IP (string) |
| 165 | +* Massive frontend overhaul |
38 | 166 |
|
39 |
| -- ENCODARR_RUNNER_CONTROLLER_PORT (integer) |
| 167 | +* Scheduled working times |
40 | 168 |
|
41 | 169 | ## Attributions
|
42 | 170 |
|
43 |
| -`controller/controller/mediainfo.go` was modified from [pascoej/go-mediainfo](https://github.com/pascoej/go-mediainfo/blob/509f5adb9998a8fe497be4eed69c73d75161709e/mediainfo.go) |
| 171 | +`controller/mediainfo/mediainfo.go` was modified from [pascoej/go-mediainfo](https://github.com/pascoej/go-mediainfo/blob/509f5adb9998a8fe497be4eed69c73d75161709e/mediainfo.go). |
0 commit comments