{"id":20572502,"url":"https://github.com/nucliweb/cavif-bin","last_synced_at":"2025-04-14T17:12:03.168Z","repository":{"id":53680644,"uuid":"326194478","full_name":"nucliweb/cavif-bin","owner":"nucliweb","description":"cavif bin-wrapper that makes it seamlessly available as a local dependency","archived":false,"fork":false,"pushed_at":"2021-03-19T14:08:36.000Z","size":6132,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T05:51:05.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nucliweb.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}},"created_at":"2021-01-02T13:59:43.000Z","updated_at":"2022-07-27T09:56:47.000Z","dependencies_parsed_at":"2022-09-06T01:11:12.798Z","dependency_job_id":null,"html_url":"https://github.com/nucliweb/cavif-bin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nucliweb%2Fcavif-bin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nucliweb%2Fcavif-bin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nucliweb%2Fcavif-bin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nucliweb%2Fcavif-bin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nucliweb","download_url":"https://codeload.github.com/nucliweb/cavif-bin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248609709,"owners_count":21132917,"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":[],"created_at":"2024-11-16T05:20:53.775Z","updated_at":"2025-04-14T17:12:03.140Z","avatar_url":"https://github.com/nucliweb.png","language":"JavaScript","readme":"# cavif-bin\n\ncavif bin-wrapper that makes it seamlessly available as a local dependency\n\n\u003e I hope that this package will be part of the imagemin plugins as an [imagemin-avif](https://github.com/nucliweb/imagemin-avif) `WIP`\n\n## About AVIF\n\n\u003cimg src=\"https://github.com/nucliweb/cavif-bin/blob/main/assets/AV1.svg?raw=true\" align=\"right\"\n     alt=\"AVIF logo\" width=\"180\" height=\"100\"\u003e\n\n[AVIF] offers significant compression gains vs. JPEG and WebP, with a recent Netflix study showing 50% savings vs. standard JPEG and \u003e 60% savings on 4:4:4 content\n\n## Underhood\n\n`cavif-bin` use [cavif](https://github.com/kornelski/cavif-rs) **v0.6.6** with [BSD 3-Clause License](https://github.com/kornelski/cavif-rs/blob/main/LICENSE) and Copyright (c) 2020, [Kornel](https://github.com/kornelski), as a AVIF coder.\n\n### Encoder options\n\n| Option | Description |\n| ------ | ----------- |\n| --quality=n | Quality from 1 (worst) to 100 (best), the default value is 80. The numbers have different meaning than JPEG's quality scale. Beware when comparing codecs. |\n| --speed=n | Encoding speed between 1 (best, but slowest) and 10 (fastest, but a blurry mess), the default value is 1. Encoding of AVIF is pretty slow, so you need either a) beefy multicore machine b) avoid large images c) patience. |\n| --overwrite | Replace files if there's .avif already. By default existing files are left untouched. |\n-o path | Write output to this path instead of samefile.avif. If multiple input files are specified, it's interpreted as a directory. |\n| --quiet | Don't print anything during conversion. |\n| --premultiplied-alpha | Warning: currently incompatible with libavif. Improves compression of transparent images by clearing RGB of fully transparent pixels and lowering quality of semi-transparent colors. |\n| --dirty-alpha | Don't change RGB values of transparent pixels. By default irrelevant color of transparent pixels is cleared to avoid wasting space. |\n| --color=rgb | encode using RGB color space instead of YCbCr color space. Makes color closer to lossless, but makes files larger. |\n## Install\n\n```bash\nnpm install cavif-bin\n```\n\n## Usage\n\n```js\nconst {execFile} = require('child_process');\nconst cavif = require('cavif-bin');\n\nexecFile(cavif, ['input.png','--quality=74', '-o', 'output.avif'], err =\u003e {\n  if (err) throw err;\n  console.log('Image is converted!');\n});\n```\n\n## CLI\n\nYou can install `cavif` globally.\n\n```bash\nnpm install --global cavif-bin\n```\n\nAnd use it as a CLI command.\n\n```bash\ncavif --help\n```\n\n## AVIF browsers support\n\n* Chrome Desktop 85+\n* Firefox 63+ (with `media.av1.enabled` activated)\n* Firefox for Android 64+ (with `media.av1.enabled` and `media.av1.use-dav1d` activated)\n* Edge 18+ (with `AV1 Video Extension` installed)\n\n## License\n\nMIT © [nucliweb](https://github.com/nucliweb)\n\n[AVIF]: https://aomediacodec.github.io/av1-avif/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnucliweb%2Fcavif-bin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnucliweb%2Fcavif-bin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnucliweb%2Fcavif-bin/lists"}