Skip to main content

Video and Image optimizer

Project description

Optilibre

Optilibre is a simple python program to automatically optimize video and images files using ffmpeg and other image optimizers. See Supported formats to have a list of supported file format you can convert to/from.

Official repo : https://gitlab.com/daufinsyd/optilibre

Installation

Simply install it using pip:

pip3 install optilibre

Usage

Copy the optilibre.example.conf to optilibre.conf and change the values according to your need.

optilibre optimize --config /path/to/opilibre.conf

You can find a systemd service and timer in systemd folder, which you can copy to /etc/systemd/system/ .

Requirements

See Supported formats .

Configuration

Copy and edit optilibre.example.conf to optilibre.conf . For each folder you want to process, create a new entry as shown in the example file.

You can put the configuration of a section in another optilibre.toml configuration file (see optiimage.example.toml and optivideo.example.toml for an example) by referencing it in optilibre.conf.

Video

  • The directive [optivideo] configure the video encoder.
  • The directive [optivideo.meta] defines which meta args should ffmpeg use.
  • The directive [optivideo.audio] defines which codec should ffmpeg use to audio.
  • The directive [optivideo.video] defines which codec should ffmpeg use to video.
  • The directive [optivideo.codecs.CODEC] defines a list of options for ffmpeg to be passed through. See man ffmpeg.
  • The directive [optivideo.filters] configure filters to exclude videos not matching the filters.

Filters

  • min_file_size_mb : minimum size for the image in MB to be considered for processing
  • min_storage_density : minimum size per pixel per second for the video to be considered for processing (ignores fps)

Image

  • The directive [optiimage] configure the image encoder.
  • The directive [optiimage.codecs.CODEC] defines a list of options for the image encoder to be passed through. See man <image_encoder>.
  • The directive [optiimage.filters] configure filters to exclude images not matching the filters.

Filters

  • min_file_size_mb : minimum size for the image in MB to be considered for processing
  • min_bpp : minimum bits per pixel for the image to be considered for processing

Supported formats

Video

  • any -> h264 (requires ffmpeg with libx264 encoder)
  • any -> h265 (requires ffmpeg with libx265 encoder)

Images

  • jpeg -> jpeg (requires jpegoptim)
  • any jpeg -> jpeg-xl (requires cjxl)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optilibre-2.2.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optilibre-2.2.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file optilibre-2.2.0.tar.gz.

File metadata

  • Download URL: optilibre-2.2.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for optilibre-2.2.0.tar.gz
Algorithm Hash digest
SHA256 e8bed810fdf8ca2957a318d91150a820eb7baf11662e4a939b183ac6c209c438
MD5 8a81395ca83080f119f7ac9608a15b8b
BLAKE2b-256 63dadccdb74773cde5b89a3ab9b06327b20b00cdca8d7de887fcbf547a741b36

See more details on using hashes here.

File details

Details for the file optilibre-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: optilibre-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for optilibre-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b20e342e2010bf53081e61475dd14221b395c2778ea2c7625629bf7cfb794e43
MD5 f59a8ddcbe66c84f8f1ba979d9c339be
BLAKE2b-256 86171fbad6eccf73a64075a00d02225a58650bc27f6130f12c6fb3143a578b19

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page