npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ozymandias724/aviphy

v0.4.0

Published

Animated GIF/WebP to animated AVIF conversion with bundled avifenc binaries, Buffer support, and a packaged CLI.

Readme

aviphy

Convert animated GIF and WebP images into animated AVIF.

Aviphy is a JavaScript library designed for automated image conversion workflows, media pipelines, build tooling, and batch processing.

Platform-specific avifenc binaries are bundled automatically, so no additional system dependencies are required.

Features

  • Animated GIF input
  • Animated WebP input
  • Animated AVIF output
  • Alpha transparency support
  • Quality and speed controls
  • Built-in encoder presets
  • In-memory Buffer input support
  • Progress callbacks
  • Normal and debug logging
  • Packaged CLI command
  • Bundled macOS, Linux, and Windows binaries
  • Node.js and Bun compatible

Installation

npm install @ozymandias724/aviphy

or

bun add @ozymandias724/aviphy

Note: Bun is used for development and building the package, but the published library and CLI are usable without Bun.

Quick Start

import { convert } from "@ozymandias724/aviphy";

const result = await convert({
  input: "./input.gif",
  output: "./output.avif",
});

console.log(result);

Basic Example

import { convert } from "@ozymandias724/aviphy";

const result = await convert({
  input: "./input.webp",
  output: "./output.avif",

  preset: "balanced",

  quality: 60,
  speed: 6,

  logLevel: "normal",
});

console.log(result);

Buffer Input

import fs from "node:fs";
import { convert } from "@ozymandias724/aviphy";

const inputBuffer = fs.readFileSync("./input.gif");

const result = await convert({
  input: inputBuffer,
  output: "./output.avif",
});

console.log(result);

Logging

normal (default)

Human-friendly conversion progress.

Includes:

  • metadata loading
  • conversion settings
  • encoder startup
  • conversion progress

debug

Includes all normal logging plus:

  • frame processing details
  • encoder diagnostics
  • subprocess lifecycle information
  • binary resolution information

Example:

await convert({
  input: "./input.webp",
  output: "./output.avif",

  logLevel: "debug",
});

API

convert(options)

const result = await convert({
  input: "./input.gif",
  output: "./output.avif",
});

ConvertOptions

type ConvertOptions = {
  input: string | Buffer;
  output: string;

  preset?: "fast" | "balanced" | "high-quality" | "lossless";

  quality?: number;
  speed?: number;

  preserveAlpha?: boolean;

  logLevel?: "normal" | "debug";

  onProgress?: (event: ConversionProgressEvent) => void;
};

Presets

preset: "fast";
preset: "balanced";
preset: "high-quality";
preset: "lossless";

Presets provide sensible quality and speed defaults while still allowing explicit overrides.

Result Object

{
  inputSize: number;
  outputSize: number;

  reductionPercent: number;

  sourceFrameCount: number;

  durationMs: number;
}

Progress Events

Aviphy supports progress callbacks for:

  • progress bars
  • spinners
  • telemetry
  • custom logging
  • UI updates

Example:

await convert({
  input: "./input.gif",
  output: "./output.avif",

  onProgress(event) {
    console.log(event);
  },
});

CLI Utility

A lightweight CLI utility is included for:

  • local testing
  • debugging
  • development workflows
  • installed package usage

Supported CLI options

  • --preset <fast|balanced|high-quality|lossless>
  • --quality <0-100>
  • --speed <0-10>
  • --no-alpha to disable alpha preservation
  • --debug for verbose logging

Example (development):

bun run src/cli.ts fixtures/test.gif tmp/output.avif --debug

Example (packaged CLI):

npx aviphy fixtures/test.gif tmp/output.avif --quality 70 --speed 5

Or after a global install:

npm install -g @ozymandias724/aviphy
aviphy fixtures/test.gif tmp/output.avif

Development

Install dependencies:

bun install

Run tests:

bun test

Build the package:

bun run build

Create an npm package (build first):

bun run build
npm pack

License

MIT