BLOG

SVGA vs. Lottie, PAG, VAP, YYEVA, and WebP/APNG: format selection guide

SVGA vs. Lottie, PAG, VAP, YYEVA, and WebP/APNG: format selection guide

TL;DR

  • Match the format to the rendering workload: SVGA 2.0 pre-bakes keyframes into affine transform matrices paired with bitmaps or simple vectors; Lottie/dotLottie targets lightweight vector UI; PAG bridges full After Effects compositions to GPU rendering; VAP and YYEVA rely on hardware video decoding for dense particle or 3D effects; WebP/APNG/GIF require no player SDK at all.
  • Format origins at a glance: SVGA was originally created by the YY UED team (and Tencent’s live-gifting documentation also showed examples integrating SVGAPlayer). Tencent separately maintains libpag and vap, while YY Live open-sourced YYEVA for dynamic alpha video gifting.
  • Check upstream maintenance honestly (verified December 2026): the core svga/SVGAPlayer-{iOS,Android,Web,Flutter} repositories were archived read-only in February 2023. Meanwhile, SVGAPlayer-Web-Lite (svga on npm), community Flutter package flutter_svga, and HarmonyOS @tb-open/svga remain active, alongside Tencent’s libpag/vap and yylive/YYEVA.
  • Lossless Lottie → SVGA conversion does not exist: Lottie expressions, gradients, repeaters, and blend modes have no 1:1 field in svga.proto. Converting complex Lottie files to SVGA requires rasterizing frames into PNG bitmaps, inflating both file bytes and RGBA memory.

Scenario decision table

Product scenario Primary recommendation Alternative Why it fits
Voice-chat avatar frames, mic waves, badges, entry banners (multiple on screen) SVGA 2.0 or Lottie PAG Concurrent instances do not exhaust hardware video decoders; SVGA handles mixed bitmaps plus dynamic setImage/setText cleanly
Full-screen live-stream luxury gifts (particles, glows, 3D video renders, 3–10 s) VAP / YYEVA / PAG (BMP mode) Short, size-capped SVGA 2.0 Video codecs compress dense full-bleed particles far better than per-frame PNGs; choose SVGA only when deterministic cross-platform rendering outweighs codec limits
Marketing H5 / landing page motion Lottie / dotLottie (vector) or WebP / APNG (short bitmap) SVGA Web Lite (svga) When native apps already ship SVGA, Web Lite (< 18 KB gzip) reuses the exact same .svga file
Interactive UI micro-animations (buttons, loaders, state switches) Lottie / dotLottie Native CSS / SVG Vector scaling, progress scrubbing, and state binding with minimal bundle footprint

Eight-dimension technical comparison

Dimension SVGA 2.0 Lottie / dotLottie PAG (libpag) VAP YYEVA Dual-Channel MP4 WebP / APNG / GIF
Asset & encoding model zlib + Proto3 binary (pre-baked transforms + bitmaps + ShapeEntity) JSON (or ZIP-wrapped .lottie) with runtime expression & path evaluation Proprietary binary container supporting pure vector or BMP video compositions H.264/H.265 MP4 with appended vapc metadata box H.264/H.265 MP4 with yyeva dynamic key metadata Standard MP4 packing RGB and luma-alpha halves side-by-side or stacked Raster frame sequences decoded natively by OS/browsers
Alpha channel architecture Embedded PNG alpha, vector shapes, and matteKey track mattes Native vector alpha & path masks Native GPU alpha & track mattes Split RGB + alpha regions composited by GPU shader Embedded alpha region + dynamic key mask metadata Custom shader sampling RGB and luma alpha halves Native 8-bit alpha (WebP/APNG) or 1-bit binary transparency (GIF)
Dynamic text & image replacement Built-in setImage / setText keyed by imageKey Dynamic properties & text delegates (varies by runtime) Native PAGImage / PAGText APIs Dynamic fusion elements defined in vapc Dynamic avatar/text regions defined in yyeva None standardized; requires custom overlay coordinates Not supported
Embedded audio AudioEntity + MP3 inside images (not supported in Web Lite) None (external audio sync required) Supported (via platform audio hook configuration) Standard MP4 audio track (e.g., AAC) Standard MP4 audio track Standard MP4 audio track Not supported
Decoded memory profile ∑ bitmap_w × bitmap_h × 4 RGBA texture bytes (see Spec) Vector vertex/layer cache; minimal texture RAM unless bitmaps dominate GPU textures & frame buffers (plus video buffers in BMP mode) Hardware video decoder surfaces + composition textures Hardware video decoder surfaces + composition textures Hardware decoder surfaces + doubled-width/height frame Per-frame or double-buffered RGBA frames (high RAM on large loops)
Runtime CPU / GPU & concurrency Predictable CPU/RAM; safe for multiple concurrent badges Heavy expressions or mattes raise CPU rasterization cost Mature GPU pipeline across mobile & WebAssembly Bounded by device hardware video decoder slot limits (often 1–2 concurrent streams on low-end phones) Bounded by hardware video decoder concurrency Bounded by hardware video decoder concurrency + custom shader Best kept short/small; large loops spike memory
Authoring & export pipeline AE / Animate SVGAConverter, or scripted Proto3 via svga.proto Bodymovin / LottieFiles AE plugins PAGExporter AE plugin + PAGViewer VAP AE plugin + FFmpeg tooling YYEVA AE plugin + packager Any video exporter + FFmpeg split filter FFmpeg / ImageMagick / browser tools
SDK maintenance (verified Dec 2026) Core svga/* players archived; Web Lite, flutter_svga, @tb-open/svga active Actively maintained across platforms Actively maintained by Tencent Actively maintained by Tencent (VAP Pro) Maintained by YY Live Custom per-app player implementation Built into browsers and mobile OSes

Upstream maintenance overview (verified December 2026)

When evaluating a format, separate specification stability from SDK release activity:

  1. SVGA origin and archived repositories: SVGA was created by the YY UED team (SVGAPlayer.podspec), and Tencent’s RTC live-gifting docs also documented SVGAPlayer integration. On GitHub, SVGAPlayer-iOS (2.5.7, 2021-07-06), SVGAPlayer-Android (2.6.1, 2021-08-30), SVGAPlayer-Web (2.3.2, 2021-03-05), and SVGAPlayer-Flutter (2.2.0, 2022-11-24) were archived read-only in February 2023.
  2. Active SVGA ecosystem targets:
    • Web Lite: svga/SVGAPlayer-Web-Lite (npm svga, 2.1.1) remains active and unarchived, using a WebWorker parser and OffscreenCanvas for SVGA 2.x (no 1.x or audio).
    • Flutter: community package flutter_svga on pub.dev provides maintained Dart 3 / null-safety support beyond the archived svgaplayer_flutter.
    • HarmonyOS NEXT: distributed via OHPM as @tb-open/svga. See the changelog and integration guide for exact package details.
  3. Peer ecosystems:
    • PAG (Tencent/libpag): unified C++/GPU engine across iOS, Android, Web, Flutter, and HarmonyOS, built for full After Effects fidelity.
    • VAP (Tencent/vap / VAP Pro) and YYEVA (yylive/YYEVA): purpose-built alpha-video pipelines for full-screen particle and 3D gift effects where per-frame bitmap formats become too large.

Format conversion reality and irreversible loss boundaries

Teams frequently ask whether existing Lottie or MP4 animations can convert cleanly to SVGA. The boundaries below come directly from the underlying schemas:

  • Why lossless Lottie → SVGA is impossible
    In svga.proto, ShapeEntity only supports SHAPE (SVG path d), RECT, ELLIPSE, and KEEP, styled with flat RGBAColor fills/strokes and line dashes. Lottie features such as JavaScript expressions, gradients, repeaters, trim-path animations, and blend modes have no native representation in SVGA. Exporting a complex Lottie to SVGA requires rasterizing frames into PNG bitmaps, which destroys vector scalability and sharply increases both file size and decoded RGBA memory.
  • SVGA → SMIL SVG boundaries
    The browser-based SVGA to SVG converter maps ShapeEntity paths and sprite transforms into animated SMIL <svg>, which works well for lightweight static-asset web embeds—but SMIL SVG cannot preserve matteKey track mattes or embedded AudioEntity audio tracks.
  • Dual-Channel MP4 / VAP / YYEVA ↔ SVGA
    Standard dual-channel MP4 clips can be composited frame-by-frame into transparent PNGs and packed as SVGA 2.0 (see the MP4 to SVGA guide), though dynamic vapc or yyeva metadata boxes do not translate automatically to SVGA imageKey slots. Converting multi-second video into SVGA also multiplies file weight because every changing frame becomes a separate bitmap.

Seven-step format selection checklist

  1. Classify visual style and duration: short graphic or layered bitmap motion favors SVGA or Lottie; 3–10 second full-screen 3D/particle renders point to VAP, YYEVA, or PAG BMP mode.
  2. Count concurrent on-screen animations: if a room screen renders five or more animated avatar frames simultaneously, avoid hardware-video-decoder formats and pick SVGA, Lottie, or WebP/APNG.
  3. Verify dynamic slot requirements: test whether long CJK, English, or RTL (Arabic) user names and circular avatar crops can be safely swapped at runtime via setImage/setText or equivalent APIs.
  4. Check platform constraints: verify browser compatibility (e.g., Web Lite vs Web Classic), Flutter Dart 3 support (flutter_svga), and HarmonyOS NEXT availability in the integration guide.
  5. Budget both wire bytes and decoded RAM: measure download size alongside uncompressed runtime RAM (∑ w × h × 4 for SVGA; see the SVGA compression guide).
  6. Stress-test three consecutive loops on low-end devices: monitor peak memory and cleanup behavior after playback stops or views unmount.
  7. Define a fallback tier: pair heavy full-screen effects with a lighter SVGA, WebP, or static preview asset for constrained devices.

To explore SVGA’s own architecture and downloadable reference assets, continue to the SVGA introduction, SVGA format specification, test samples library, or SVGA Online Player.