Skip to main content

Raricode

An ffmpeg transcoding helper.

Requirements

FFmpeg must be installed and available on your path.

Installation

Python

Pip

pip install raricode

PipX

pipx install raricode

Shell Completions

See https://click.palletsprojects.com/en/stable/shell-completion/.

Bash

# Add to .bashrc
eval "$(_RARICODE_COMPLETE=bash_source raricode)"

Fish

# Add to fish completions
_RARICODE_COMPLETE=fish_source raricode | source

Zsh

# Add to .zshrc
eval "$(_RARICODE_COMPLETE=zsh_source raricode)"

Powershell

# Add this to your PowerShell profile (the path of $PROFILE)
$env:_RARICODE_COMPLETE = 'powershell_source'
raricode | Out-String | Invoke-Expression
Remove-Item Env:_RARICODE_COMPLETE

Usage

See help for commands and flags.

raricode --help

Example Usage

Below is an example ffmpeg command and the equivalent raricode commands.

# The below two commands are the same

# ffmpeg command
ffmpeg -i input.mkv -map 0 -c:v libsvtav1 -preset 4 -svtav1-params tile-columns=2:tile-rows=0:fast-decode=1 -b:v 2M -c:a libopus -b:a 128K -c:s copy -disposition:s:0 0 output.mkv

# raricode command
raricode transcode -i input.mkv -c:v libsvtav1 -f:v -preset 4 -f:v -svtav1-params tile-columns=2:tile-rows=0:fast-decode=1 -b:v 2M -c:a libopus -b:a 128K -c:s copy --disposition s:0 0 output.mkv

Usefull features

Autocrop

For content with black bars, you can easy and automatically crop the video to remove them by adding --autocrop to you raricode command.

Development

Development Installation

Run in repo root:

uv tool install --editable .

Metadata

Release files for raricode 0.3.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 raricode 0.3.0
File Size Uploaded Provenance Actions
raricode-0.3.0.tar.gz 16.8 kB Without provenance Details for raricode-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for raricode 0.3.0
File Interpreter ABI Platform Actions
raricode-0.3.0-py3-none-any.whl Python 3 none any Details for raricode-0.3.0-py3-none-any.whl

Total release size: 43.7 kB

Release files / raricode-0.3.0.tar.gz

Download URL raricode-0.3.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
69fe46468fc78891570b005470f397772b061bdb0f626b4d464a083d6e6caf89
BLAKE2b-256 checksum
How to use checksums
c9864fd8b7dd7a6e43f636145b8a24251f4384c5737607659ed34d376c875231
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / raricode-0.3.0-py3-none-any.whl

Download URL raricode-0.3.0-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
262ba09d1ec3a561a70dd807b27096c0ff25169455c3e7bb82a5e98c1298b4bc
BLAKE2b-256 checksum
How to use checksums
8ddc22a75ccd01400e96d8ae1877a64050234b20ad5fd5d6c039dbbcbef4a806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for raricode 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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