Skip to main content

Remote Compression

PyPI Status Build Status Documentation Status License Code Coverage

rcomp compresses videos in batch with ffmpeg — on this machine, or on a remote server over SSH.

Features

  • Batch: point it at a directory, it recursively finds the videos worth compressing (already-compliant files are left alone) and shows progress bars.
  • Everything comes out as mkv: subtitles and odd containers (avi, wmv, flv...) stop breaking conversions; text subtitles are converted when needed.
  • Local or remote: -D my_server compresses on a server (Linux or Windows) through a single SSH connection for the whole batch; -D local (or a hostname that resolves to this machine) runs locally.
  • Robust remote: the workspace is created automatically, ffmpeg is checked at connection time, a lost connection is patiently re-established and the running encode is re-attached instead of relaunched.
  • Persistent preferences: a TOML file managed with rcomp config, with named presets; command-line flags always win.
  • Failure log: corrupt and non-profitable files are remembered (centrally, no droppings in your video folders) and skipped on the next runs; inspect it with rcomp failures.
  • Rotation-aware: phone videos with rotation metadata are sized by their display definition — a 1080x1920 portrait is 1080p, not "1920 tall".
  • Old-source friendly: interlaced material (DVD, AVCHD) is deinterlaced automatically, and odd-dimension oddities no longer break the encoder.

Requirements

  • ffmpeg and ffprobe in the local PATH.
  • For remote compression:
    • an entry in ~/.ssh/config for the server (private key; ProxyJump supported); -D user@alias is accepted too,
    • the SFTP service enabled on the server (Synology DSM ships with it disabled: Control Panel > File Services > FTP > SFTP),
    • ffmpeg in the PATH of the server (checked at connection, with a clear error message otherwise). The .rcomp workspace is created automatically.

Usage

$ rcomp movies/                     # compress a directory on the default host
$ rcomp -D nas -P hard movies/      # named preset on a specific server
$ rcomp -D local -n movies/         # local dry-run: show what would be done
$ rcomp config --init               # create the configuration template
$ rcomp remote status               # inspect the server workspace
$ rcomp remote purge --older-than 7d
$ rcomp failures                    # see why files are being skipped
$ rcomp cleanup movies/             # remove legacy .keep files (rcomp < 0.2)
$ rcomp --help

Configuration lives in a TOML file whose location is shown by rcomp config (platform-dependent, e.g. %LOCALAPPDATA%/rcomp on Windows, ~/.config/rcomp on Linux). Notable keys: hostname (your default server), codec, crf, ffmpeg_preset, height, replace, extensions, remote_ffmpeg (explicit server-side binary path, when the non-interactive PATH misses it or the stock build lacks encoders — both typical on Synology), remote_workdir/remote_workdir_sftp (the workspace as seen by the shell and by SFTP respectively — Synology chroots SFTP into the share tree, so pair the default .rcomp with remote_workdir_sftp = "/home/.rcomp"), and [preset.X] tables for your own presets. Each run also writes a full debug log under the directory shown by rcomp config.

Note: rcomp TARGET is a shortcut for rcomp run TARGET; a target literally named config, cleanup, failures, remote or run must therefore be written rcomp run <target>.

Credits

This package was created with Cookiecutter and the Package Helper 3 project template.

Metadata

Release files for remote-compression 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remote-compression 0.2.0
File Size Uploaded
remote_compression-0.2.0.tar.gz 947.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remote-compression 0.2.0
File Interpreter ABI Platform
remote_compression-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 992.4 kB

Release files / remote_compression-0.2.0.tar.gz

Download URL remote_compression-0.2.0.tar.gz
Size 947.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c739b0cc36dd4adbb832dbfbff21f8dfbe3142b320cc5c687ee67717b42760f1
BLAKE2b-256 checksum
How to use checksums
ccecf9e1e64885b49b2806d175bd5775be9468425d9bcff50e691dd258dc3445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / remote_compression-0.2.0-py3-none-any.whl

Download URL remote_compression-0.2.0-py3-none-any.whl
Size 44.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
849551893f03650801cbaaa6c69fe7736272d8281e75797aaccd950d1b6308d7
BLAKE2b-256 checksum
How to use checksums
cd058a8085f9b97850db7d622bbbe57586893c3a9f948c9552dcf3ac2e7ceee9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page