Documentation
¶
Overview ¶
Command encode-avatar pre-encodes an image as H.264 for use as a static avatar.
This tool converts PNG/JPEG images to H.264 keyframes that can be used by the voice agent without requiring CGO at runtime.
Usage:
# Basic encoding (uses original image dimensions) go run ./cmd/encode-avatar -input avatar.png -output avatar.h264 # Resize to specific dimensions go run ./cmd/encode-avatar -input avatar.png -output avatar.h264 -width 320 -height 320 # Embed in 16:9 canvas (recommended for LiveKit) go run ./cmd/encode-avatar -input avatar.png -output avatar.h264 -canvas h360 go run ./cmd/encode-avatar -input avatar.png -output avatar.h264 -canvas 640x360 -bg black
Canvas presets (16:9 aspect ratio):
h180 = 320x180 h360 = 640x360 (recommended) h540 = 960x540 h720 = 1280x720
The output .h264 file can be committed to your repository and loaded at runtime without any encoding dependencies.
Click to show internal directories.
Click to hide internal directories.