Encarne is a tool for automatic
h.265 encoding of all video containers in a specified directory.
Every container, which isn't encoded with
x265 will be reencoded using
x265 one by one.
pueue is used for scheduling and process handling.
Another requirement is
mediainfo, which is needed to determine various attributes of video containers.
- Automatic conversion of all movies/series in a directory
- Easy configurable ffmpeg command
- Configurable encoder thread count
- Niceness to not slow down other processes on your server
- Database to remember failed movies and to measure overall storage savings
- Automatic detection of renamed files
- Schedule management with pueue
There are three different ways to install pueue.
- An arch linux AUR package manager e.g
yaourt -S encarne-git. This will deploy the service file automatically.
pip install encarne.
- Clone the repository and execute
python setup.py install.
If you don't use an AUR package manager for installation you need to create the directory
/var/lib/encarne and grant permissions for your user.
You need to install
mediainfo to use encarne.
Pueue will be installed together with encarne, but you need to start the
Pueue daemon once with
pueue --daemon. A systemctl service is installed for
Pueue if you use an AUR package manager. Start it with
systemctl --user start pueue.
Default parameters for
# Default configuration ['encoding'] crf = 18 preset = slow audio = None kbitrate-audio = None threads: 4, [default] min-size = 6442450944 niceness = 15
All parameters are adjustable using the command line. Just use
-h for more information.
A configuration file is created in
/home/$USER/.config/encarne after the first start.
All movies are now hashed with sha1.
If you move a movie to another location and run
encarne again, it will recognize the movie and update the path in it's DB.
encarne stat to show how much space you already saved (Non existent files aren't counted).
encarne clean to clean movies which do no longer exist in the file system.
1.4.0 the sha1 hash is introduced. As there is no migration system there yet, you need to run the migration once manually:
> sqlite3 /var/lib/encarne CREATE TABLE movie2 ( name VARCHAR(240) NOT NULL, directory VARCHAR(240), size INTEGER NOT NULL, original_size INTEGER, encoded BOOLEAN NOT NULL, failed BOOLEAN NOT NULL, PRIMARY KEY (name, directory) CHECK (encoded IN (0, 1)), CHECK (failed IN (0, 1)) ); INSERT INTO movie2 (name, directory, size, original_size, encoded, failed) SELECT name, directory, size, original_size, encoded, failed FROM movie; DROP TABLE movie; ALTER TABLE movie2 RENAME TO movie; ALTER TABLE movie ADD sha1 VARCHAR(40);
Copyright © 2016 Arne Beer (@Nukesor)