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

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.1
File Size Uploaded Provenance Actions
raricode-0.2.1.tar.gz 16.2 kB Without provenance Details for raricode-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 42.0 kB

Release files / raricode-0.2.1.tar.gz

Download URL raricode-0.2.1.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e2f0c45ca5adc304ce5b1f95faacbd396c94e9aa58260b2b45cafe1cb063c52a
BLAKE2b-256 checksum
How to use checksums
3d0b5d3ac392fcbd9e2c96e1dc83fbbade4b739c6ca6b3351af409e1fb21b740
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.1-py3-none-any.whl

Download URL raricode-0.2.1-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ed4253fe52e4d5abb118679bbde10c8194628d856a56aa933cd6431a0a9602a
BLAKE2b-256 checksum
How to use checksums
2b2bd4d56b2cda805f9731c413f2af9f99f4ddab01967b96d066e68c89cbd832
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.1

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