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.4.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.4.0
File Size Uploaded Provenance Actions
raricode-0.4.0.tar.gz 19.0 kB Without provenance Details for raricode-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 46.5 kB

Release files / raricode-0.4.0.tar.gz

Download URL raricode-0.4.0.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
72838c16da80f362c92d3ea1f359f53b220f8bd81a1df98e1ea79910ed85baaa
BLAKE2b-256 checksum
How to use checksums
af9c8489cbb401b4e4a47b92897150a3cc53974b8403ba78e42b8451217b22c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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.4.0-py3-none-any.whl

Download URL raricode-0.4.0-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e87c0c642575be7a1d0379fc373787bd0489a1c074198d0701fcfdfe651cdd94
BLAKE2b-256 checksum
How to use checksums
a99092810fe657b890c7298c73a349bfe854df04e106bbc71f830e3abce7c92b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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.4.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