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

# Add to .bashrc
eval "$(_RARICODE_COMPLETE=bash_source raricode)"
# Add to fish completions
_RARICODE_COMPLETE=fish_source raricode | source
# Add to .zshrc
eval "$(_RARICODE_COMPLETE=zsh_source raricode)"
# 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.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.2.0
File Size Uploaded Provenance Actions
raricode-0.2.0.tar.gz 16.2 kB Without provenance Details for raricode-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 41.9 kB

Release files / raricode-0.2.0.tar.gz

Download URL raricode-0.2.0.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
55337dc6c3c442c864029ae4429453d3fdc8a7b815fddca35392d34913fd7149
BLAKE2b-256 checksum
How to use checksums
77223b59b5de1e3d5a4eabd101539e6ac50a551112838edfdc7e223303b605c6
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.0-py3-none-any.whl

Download URL raricode-0.2.0-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f359a06b0c67dbc9ca907649f645aab77c33c2669c2320ed03f2ad8e824ce684
BLAKE2b-256 checksum
How to use checksums
a6f45ae0e204689d4d2df2280003f524964a523337ba05a79737eb43e5e53991
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.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