livliv-dev/player

A lightweight 2.5D character player for the web, with lip sync and webcam face tracking.

What it is

LivLiv Player is a lightweight web library that puts a 2.5D animated character on a webpage, a stream overlay, or an app. It's designed so that just a few lines of code get a character breathing, blinking, turning its head, and talking. The project ships with 21 ready-to-use characters in different art styles.

Key features

  • Small and dependency-free — built on WebGL2, with the core at about 30 KB gzipped.
  • Lip sync — can sync a character's mouth to a microphone, an audio file, or a video, all in the browser.
  • Webcam face tracking — uses Google's MediaPipe to mirror your facial movements onto the character. Camera images never leave the device.
  • Multiple character formats — plays LivLiv's own format, VRM (a common 3D avatar format), and PNGTuber (two static images swapped for talking) through the same API.
  • Optional features loaded on demand — lip sync and face tracking are imported only when you need them.

How to use it

In your own page, you create a Player attached to a <canvas>, load a character from a folder or a .livliv file, then control it:

const player = new Player(document.querySelector('canvas'))
await player.load('characters/k01/')   // a folder with model.json and textures/
player.setExpression('smile')
player.act('nod')
player.params.mouthOpen = 0.6          // 0..1

For lip sync and face tracking, you import extra helpers:

import { createSpeech } from '@livliv/player/voice'
import { startFaceTracking } from '@livliv/player/tracking'

For VRM or PNGTuber characters, you use a BodyPlayer with the appropriate body type (VrmBody or PngBody).

You can also embed a character without writing code using an <iframe> pointing to https://livliv.ai/live/<id> — that page has a transparent background and works as an OBS Browser Source.

The 21 featured characters

They live in the characters/ folder, each with an id (like k01, d01, v01). Each has a cover.webp preview image. The player draws a small LivLiv mark in the bottom-right corner of these characters.

Licensing note: the featured characters are not covered by the project's Apache License. Most were made by LivLiv and are free for personal, non-commercial use with credit ("Characters: LivLiv (livliv.ai)"). You can't sell them, use them commercially, or train AI models on them. Three characters — Kujira, Kujira Q, and Pen — are based on other people's work, with separate credits and terms in characters/CREDITS.md.

Making your own characters

  • PNGTuber — provide two pictures (mouth closed, mouth open), plus two more with eyes closed if you have them.
  • VRM — export from VRoid Studio or any tool that supports VRM 0.x or 1.0.
  • LivLiv model — create one from a single picture on livliv.ai, then download the model package (a .livliv file) and pass it to load().

Technical details

  • The player is LivLiv's own work — it uses no Live2D software or Cubism SDK and doesn't read .moc3 or .cmo3 files.
  • Making characters on livliv.ai uses AI, but the player itself calls no AI services — it only plays the files you point it at.
  • The full API, format spec, and security limits are documented in API.md and FORMAT.md.
  • The package isn't on npm yet — you build it from the repository and import dist/index.js.

Browser support

Requires WebGL2 and ES2023: Chrome/Edge 97+, Firefox 104+, Safari 15.4+. Tested on current desktop browsers, not yet on phones.

License

The code is under the Apache License 2.0. The featured characters have their own license (see characters/LICENSE.md). Neither license covers the LivLiv name and logos.

Related

  • Project
  • Project
  • Project
  • Project