-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commits: * Markdown Lint Stuff * Outline how I want the README to be structured * Change svg out for png * Check-in * Readme just needs some badges now * Add badges * Diagnose failing tests * Hmmm * Make the config dir after loading settings * Remove /config * Remove debug echo * Go version badge
- Loading branch information
Showing
24 changed files
with
680 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"MD013": false, | ||
"MD033": false, | ||
"MD041": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"cSpell.words": [ | ||
"encodarr", | ||
"mediainfo", | ||
"ncodarr", | ||
"popen", | ||
"pymediainfo" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,171 @@ | ||
# Encodarr | ||
<p align="center"> | ||
<img src="images/Encodarr-Text-Logo.png" height="175"/> | ||
</p> | ||
|
||
Docker-based webapp for encoding video files to the HEVC \(H.265\) standard. | ||
[![https://img.shields.io/badge/license-MPL--2.0-blue](https://img.shields.io/badge/license-MPL--2.0-blue)](https://github.com/BrenekH/encodarr/blob/master/LICENSE) | ||
![GitHub all releases](https://img.shields.io/github/downloads/brenekh/encodarr/total?label=github%20downloads) | ||
![Docker Pulls](https://img.shields.io/docker/pulls/brenekh/encodarr-controller?label=controller%20docker%20pulls) | ||
![Docker Pulls](https://img.shields.io/docker/pulls/brenekh/encodarr-runner?label=runner%20docker%20pulls) | ||
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/brenekh/encodarr-controller/latest?label=controller%20image%20size) | ||
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/brenekh/encodarr-runner/latest?label=runner%20image%20size) | ||
![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/brenekh/encodarr?filename=controller%2Fgo.mod) | ||
[![Controller CI/CD](https://github.com/BrenekH/encodarr/actions/workflows/controller.yaml/badge.svg)](https://github.com/BrenekH/encodarr/actions/workflows/controller.yaml) | ||
[![Runner CI/CD](https://github.com/BrenekH/encodarr/actions/workflows/runner.yaml/badge.svg)](https://github.com/BrenekH/encodarr/actions/workflows/runner.yaml) | ||
|
||
## Docker Compose | ||
## What is Encodarr? | ||
|
||
Recommended `docker-compose.yaml` \(Assumes the docker image was built with the tag `brenekh/encodarr:latest`\) | ||
Encodarr is a self-hosted web application that encodes video files to a target format using distributed computing. | ||
|
||
```yaml | ||
## Why use Encodarr? | ||
<!-- TODO: Why use Encodarr? (other than easy to setup) --> | ||
|
||
### Easy to Setup | ||
|
||
Encodarr bypasses the need to share media across the network by instead transmitting the file to be operated on to the Runners. | ||
This means that Encodarr is much easier to setup than other solutions. | ||
|
||
## Dependencies | ||
|
||
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/). | ||
|
||
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. | ||
|
||
## Installing | ||
|
||
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)). | ||
|
||
Pre-built executables are available via the [Releases](https://github.com/BrenekH/encodarr/releases/latest) page. | ||
|
||
## Usage | ||
|
||
### Docker/Docker Compose | ||
|
||
The latest Controller version can be run using the following `docker run` command: | ||
|
||
```bash | ||
docker run -d \ | ||
--name Encodarr-Controller \ | ||
-e TZ=Europe/London \ | ||
-v <path to data>:/config:rw \ | ||
-v <path to media>:/media:rw \ | ||
-p 8123:8123 \ | ||
--restart unless-stopped \ | ||
--user 1000:1000 \ | ||
brenekh/encodarr-controller:latest | ||
``` | ||
|
||
or if you prefer Docker Compose: | ||
|
||
```yml | ||
version: "2.2" | ||
services: | ||
encodarr: | ||
image: brenekh/encodarr:latest | ||
container_name: Encodarr | ||
encodarr-controller: | ||
image: brenekh/encodarr-controller:latest | ||
container_name: Encodarr-Controller | ||
environment: | ||
- TZ=Europe/London | ||
volumes: | ||
- /config:/config:rw | ||
- /media/folder/to/search:/usr/app/tosearch:rw | ||
- <path to controller data>:/config:rw | ||
- <path to media>:/media:rw | ||
ports: | ||
- 5000:5000 | ||
- 8123:8123 | ||
restart: unless-stopped | ||
cpus: 2.00 | ||
stop_signal: SIGINT | ||
user: "1000:1000" | ||
``` | ||
The latest Runner version is similar. | ||
Docker run: | ||
```bash | ||
docker run -d \ | ||
--name Encodarr-Runner \ | ||
-v <path to runner data>:/config:rw \ | ||
-e "ENCODARR_RUNNER_NAME=Runner 1" \ | ||
-e ENCODARR_RUNNER_CONTROLLER_IP=<Controller IP> \ | ||
-e ENCODARR_RUNNER_CONTROLLER_PORT=8123 \ | ||
--restart unless-stopped \ | ||
brenekh/encodarr-runner:latest | ||
``` | ||
|
||
## Environment Variables | ||
Docker Compose: | ||
|
||
```yml | ||
version: "2.2" | ||
services: | ||
encodarr-runner: | ||
image: brenekh/encodarr-runner:latest | ||
container_name: Encodarr-Runner | ||
volumes: | ||
- <path to runner data>:/config:rw | ||
environment: | ||
- ENCODARR_RUNNER_NAME=Runner 1 | ||
- ENCODARR_RUNNER_CONTROLLER_IP=<Controller IP> | ||
- ENCODARR_RUNNER_CONTROLLER_PORT=8123 | ||
restart: unless-stopped | ||
``` | ||
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. | ||
For example, `/mnt/disk/tv:/tv:rw` and `/mnt/disk/movies:/movies:rw`. | ||
|
||
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`\). | ||
|
||
### Startup Configuration | ||
|
||
Startup values configured either through environment variables, or command line arguments. | ||
All of the command line variants expect a value after a space (`--port 8123`) expect the Runner `--debug` flag. | ||
It is a boolean flag. | ||
|
||
#### Controller | ||
|
||
`ENCODARR_PORT`, `--port` sets the port for the HTTP web server. | ||
For containers, it is recommended to modify the external port (`8124:8123`) instead of setting this value. | ||
(default: `8123`) | ||
|
||
`ENCODARR_CONFIG_DIR`, `--config-dir` sets the directory that the configuration files are saved to. | ||
This includes the log file. | ||
In a container, this is pre-set to `/config`. | ||
(default: `<platform user config directory>/encodarr/controller/config`) | ||
|
||
#### Runner | ||
|
||
`ENCODARR_DEBUG`, `--debug` enables outputting debug messages to the log. | ||
If the environment variable is set to `True`, then debug messages are turned on. | ||
(default: `False`) | ||
|
||
`ENCODARR_LOG_FILE` sets the location of the runner log file. | ||
(default: `/config/runner.log`) | ||
|
||
`ENCODARR_RUNNER_NAME`, `--name` sets the name to be shown in the Web UI when referring to this runner. | ||
(default: `Runner-<random 3 digit number>`) | ||
|
||
`ENCODARR_RUNNER_CONTROLLER_IP`, `--controller-ip` sets the IP for connecting to the Controller. | ||
(default: `localhost`) | ||
|
||
`ENCODARR_RUNNER_CONTROLLER_PORT`, `--controller-port` sets the port for connecting to the Controller. | ||
(default: `8123`) | ||
|
||
## Contributing | ||
|
||
If you want to contribute to this project, head over to [CONTRIBUTING.md](CONTRIBUTING.md) to get started. | ||
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. | ||
|
||
## Code of Conduct | ||
|
||
### Common | ||
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). | ||
|
||
- ENCODARR_DEBUG (bool) | ||
## Future Plans | ||
|
||
- ENCODARR_LOG_FILE (string) | ||
* Rewrite Runner from Python to Go (following Clean Architecture guidelines) | ||
|
||
### Runner | ||
* Rewrite Controller to conform to Clean Architecture guidelines | ||
|
||
- ENCODARR_RUNNER_NAME (string) | ||
* Instead of configuring with dropdowns and checkboxes, use a plugin system | ||
|
||
- ENCODARR_RUNNER_CONTROLLER_IP (string) | ||
* Massive frontend overhaul | ||
|
||
- ENCODARR_RUNNER_CONTROLLER_PORT (integer) | ||
* Scheduled working times | ||
|
||
## Attributions | ||
|
||
`controller/controller/mediainfo.go` was modified from [pascoej/go-mediainfo](https://github.com/pascoej/go-mediainfo/blob/509f5adb9998a8fe497be4eed69c73d75161709e/mediainfo.go) | ||
`controller/mediainfo/mediainfo.go` was modified from [pascoej/go-mediainfo](https://github.com/pascoej/go-mediainfo/blob/509f5adb9998a8fe497be4eed69c73d75161709e/mediainfo.go). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.