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.2.5

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.2.5
File Size Uploaded Provenance Actions
raricode-0.2.5.tar.gz 16.4 kB Without provenance Details for raricode-0.2.5.tar.gz

Built distribution (wheel)

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

Total release size: 42.3 kB

Release files / raricode-0.2.5.tar.gz

Download URL raricode-0.2.5.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bf1e0eeaa66223409068ed4890daa50ef0e2850de704dd126795ab786ad4238b
BLAKE2b-256 checksum
How to use checksums
069911b1d4dd013442b650365bf4e87c157202141a8e3572cc45aa0ae85287f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.2.5-py3-none-any.whl

Download URL raricode-0.2.5-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9f7ca8ea624a73e32e3658cd1eb0f16f70ea8802354272e03a7d8bb10e23ff0
BLAKE2b-256 checksum
How to use checksums
9996e34dadd46c64a09ce13ae377843aade10c5a9747f6f60ab045cbcab5eff6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.2.5

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