Skip to content
📺 Reencode all your movies to h.265
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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.

  1. An arch linux AUR package manager e.g yaourt: yaourt -S encarne-git . This will deploy the service file automatically.
  2. Pip: pip install encarne.
  3. Clone the repository and execute python install.

Database: 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 ffmpeg encoding:

# Default configuration
crf = 18
preset = slow
audio = None
kbitrate-audio = None
threads: 4,

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.

Type encarne stat to show how much space you already saved (Non existent files aren't counted). Type encarne clean to clean movies which do no longer exist in the file system.


In 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)

You can’t perform that action at this time.