{"id":13647718,"url":"https://github.com/kornelski/cavif-rs","last_synced_at":"2025-05-15T04:04:21.302Z","repository":{"id":41966425,"uuid":"290356845","full_name":"kornelski/cavif-rs","owner":"kornelski","description":"AVIF image creator in pure Rust","archived":false,"fork":false,"pushed_at":"2025-04-27T21:30:25.000Z","size":117,"stargazers_count":609,"open_issues_count":11,"forks_count":33,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-27T22:26:02.238Z","etag":null,"topics":["avif","avif-encoder","image-converter","rust"],"latest_commit_sha":null,"homepage":"https://lib.rs/cavif","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kornelski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-26T00:43:20.000Z","updated_at":"2025-04-27T21:30:28.000Z","dependencies_parsed_at":"2024-01-05T04:21:03.438Z","dependency_job_id":"6cf0a356-77b0-4f19-8d1a-b24ee2f0b6f7","html_url":"https://github.com/kornelski/cavif-rs","commit_stats":{"total_commits":101,"total_committers":8,"mean_commits":12.625,"dds":0.09900990099009899,"last_synced_commit":"7df78fd8313313a97f1851cad0cacdd7a139fef7"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornelski%2Fcavif-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornelski%2Fcavif-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornelski%2Fcavif-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornelski%2Fcavif-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kornelski","download_url":"https://codeload.github.com/kornelski/cavif-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270640,"owners_count":22042858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avif","avif-encoder","image-converter","rust"],"created_at":"2024-08-02T01:03:44.159Z","updated_at":"2025-05-15T04:04:21.207Z","avatar_url":"https://github.com/kornelski.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# `cavif` — PNG/JPEG to AVIF converter\n\nEncoder/converter for AVIF images. Based on [`rav1e`](https://lib.rs/crates/rav1e) and [`avif-serialize`](https://lib.rs/crates/avif-serialize) via the [`ravif`](https://lib.rs/crates/ravif) crate, which makes it an almost pure-Rust tool (it uses C LCMS2 for color profiles).\n\n## Installation\n\n➡️ **[Download the latest release](https://github.com/kornelski/cavif/releases)** ⬅️\n\nThe pre-built zip includes a portable static executable, with no dependencies, that runs on any Linux distro. It also includes executables for macOS and Windows.\n\n## Usage\n\nRun in a terminal (hint: you don't need to type the path, terminals accept file drag'n'drop)\n\n```bash\ncavif image.png\n```\n\nIt makes `image.avif`. You can adjust quality (it's in 1-100 scale):\n\n```bash\ncavif --quality 60 image.png\n```\n\n### Advanced usage\n\nYou can also specify multiple images. Encoding is multi-threaded, so the more, the better!\n\n```text\ncavif [OPTIONS] IMAGES...\n```\n\n * `--quality=n` — Quality from 1 (worst) to 100 (best), the default value is 80. The numbers are only a rough approximation of JPEG's quality scale. [Beware when comparing codecs](https://kornel.ski/faircomparison). There is no lossless compression support, 100 just gives unreasonably bloated files.\n * `--speed=n` — Encoding speed between 1 (best, but slowest) and 10 (fastest, but a blurry mess), the default value is 4. Speeds 1 and 2 are unbelievably slow, but make files ~3-5% smaller. Speeds 7 and above degrade compression significantly, and are not recommended.\n * `--overwrite` — Replace files if there's `.avif` already. By default the existing files are left untouched.\n * `-o path` — Write images to this path (instead of `same-name.avif`). If multiple input files are specified, it's interpreted as a directory.\n * `--quiet` — Don't print anything during conversion.\n\nThere are additional options that tweak AVIF color space. The defaults in `cavif` are chosen to be the best, so use these options only when you know it's necessary:\n\n * `--dirty-alpha` — Preserve RGB values of fully transparent pixels (not recommended). By default irrelevant color of transparent pixels is cleared to avoid wasting space.\n * `--color=rgb` — Encode using RGB instead of YCbCr color space. Makes colors closer to lossless, but makes files larger. Use only if you need to avoid even smallest color shifts.\n * `--depth=8` — Encode using 8-bit color depth instead of 10-bit. This results in a slightly worse quality/compression ratio, but is more compatible.\n\n## Compatibility\n\nImages [work in all modern browsers](https://caniuse.com/avif).\n\n* Chrome 85+ desktop,\n* Chrome on Android 12,\n* Firefox 91,\n* Safari iOS 16/macOS Ventura.\n\n### Known incompatibilities\n\n* Windows' preview and very old versions of android are reported to show pink line at the right edge. This is probably a bug in an old AVIF decoder they use.\n* Windows' preview doesn't seem to support 10-bit deep images. Use `--depth=8` when encoding if this is a problem.\n\n## Building\n\nTo build it from source you need Rust 1.67 or later, preferably via [rustup](https://rustup.rs).\n\nThen run in a terminal:\n\n```bash\nrustup update\ncargo install cavif\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornelski%2Fcavif-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkornelski%2Fcavif-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornelski%2Fcavif-rs/lists"}