Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

avifenc

$ avifenc Foundation Low Risk
Alliance for Open Media · AI & Media · BSD-2-Clause · macos / linux / windows

avifenc is the Alliance for Open Media's reference CLI for encoding PNG, JPEG, and Y4M inputs into high-efficiency AVIF images (8/10/12-bit, lossless, or lossy). It ships alongside avifdec for decoding and inspection, and includes --no-overwrite and --stdin pipeline support.

FCRS-1.0 Score
83 /100
Good
High Confidence
Zero-Friction Install
brew install libavif
CLI vs MCP Decision CLI Only

CPU-intensive AVIF encoding and avifdec --info inspection execute directly on local cores without MCP.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
Version: 1.4.0 (dav1d [dec]:1.5.3, aom [enc/dec]:3.13.1)
Startup
22 ms
Exit Codes (help / invalid)
0 / 1
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
Syntax: avifenc [options] input.[jpg|jpeg|png|y4m] output.avif
Standard options:
    -h,--help                         : Show syntax help (this page)
    -V,--version                      : Show the version number

Basic options:
    -q,--qcolor Q                     : Quality for color in 0..100 where 100 is lossless
    --qalpha Q                        : Quality for alpha in 0..100 where 100 is lossless
    -s,--speed S                      : Encoder speed in 0..10 where 0 is the slowest, 10 is the fastest. Or 'default' or 'd' for codec internal defaults. (Default: 6)

Advanced options:
    -j,--jobs J                       : Number of jobs (worker threads), or 'all' to potentially use as many cores as possible. (Default: all)
    --no-overwrite                    : Never overwrite existing output file
    -o,--output FILENAME              : Instead of using the last filename given as output, use this filename
    -l,--lossless                     : Set all defaults to encode losslessly, and emit warnings when settings/input don't allow for it
    -d,--depth D[,Dextension]         : D is the output bit depth per channel. D must be 8, 10 or 12. (JPEG/PNG only; y4m or stdin: bit depth is retained)
                                        If specified, Dextension adds a hidden encoded image of Dextension bit depth in the same file as the primary image to reach 16-bit depth at decoding.
                                        See avifSampleTransformRecipe for the supported combinations (8,8 and 12,4 and 12,8).
    -y,--yuv FORMAT                   : Output format, one of 'auto' (default), 444, 422, 420 or 400. Ignored for y4m or stdin (y4m format is retained)
                                        For JPEG, auto honors the JPEG's internal format, if possible. For grayscale PNG, auto defaults to 400. For all other cases, auto defaults to 444
    -p,--premultiply                  : Premultiply color by the alpha channel and signal this in the AVIF
    --sharpyuv                        : Use sharp RGB to YUV420 conversion (if supported). Ignored for y4m or if output is not 420.
    --stdin                           : Read input from stdin instead of file paths. No other input is allowed. The input format is assumed to be y4m unless --input-format is specified. The output file path must still be provided.
    --input-format FORMAT             : File format of the input data. One of: jpeg/png/y4m/auto. (Default: auto, except for stdin where auto is not supported

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

Clean non-interactive GNU-style options with --no-overwrite, --stdin, and --help, though it lacks --quiet and JSON output.

  • Supports --no-overwrite, --stdin, and -q/-s tuning
  • No JSON output or --dry-run
Trust & Safety 22 / 25

Explicit --no-overwrite guard protects existing files and input images are never altered.

  • --no-overwrite fails cleanly instead of replacing existing output files
Setup & Portability 13 / 15

Available via brew install libavif and Linux packages, though distro versions vary on bundled AV1 encoders (aom/svt-av1).

  • Packaged via Homebrew libavif and GitHub releases
Utility & Efficiency 13 / 15

Reference AVIF implementation supporting 10/12-bit HDR, alpha channels, --sharpyuv, and --target-size.

  • Full AVIF feature coverage including --lossless and --target-size
Maintenance & Lineage 9 / 10

Official Alliance for Open Media (AOMediaCodec/libavif) reference repository under BSD-2-Clause.

  • Maintained by Alliance for Open Media
Docs & Verifiability 8 / 10

Detailed avifenc --help output documents defaults, ranges (0..100), and YUV behavior clearly.

  • Comprehensive built-in avifenc -h help text

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates on local image files or stdin.

Side Effects
Read-Only Local Write
Cost & Quotas

Free BSD-2-Clause open-source binary from Alliance for Open Media.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# avifenc Agent Rules
- Always pass `--no-overwrite` when generating `output.avif` to avoid clobbering existing assets.
- Set explicit speed (`-s 6` for balanced, `-s 8` for fast previews) because `-s 0` can take minutes per image.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect AVIF dimensions, bit depth, and color metadata
avifdec --info image.avif

Uses companion avifdec from libavif to print AVIF properties without decoding or writing pixels.

Verify avifenc version and codec backends
avifenc --version

Reports libavif version and compiled AV1 encoder backends without touching files.

Controlled Writes & Previews

Encode JPEG to AVIF safely without overwriting
avifenc --no-overwrite -q 75 -s 6 input.jpg output.avif

Encodes input.jpg at quality 75 and speed 6 into output.avif, failing safely if target exists.

Strengths for Agents

  • + --no-overwrite prevents accidental overwriting of existing .avif assets.
  • + Supports --target-size byte budgets, --lossless, and --stdin pipelines.

Caveats & Pitfalls

  • ! Lacks a --quiet flag and outputs encoding summary lines to stdout.
  • ! Low -s speed values (0–2) can cause long CPU-bound timeouts on high-res images.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI