Skip to content

Repository files navigation

Decart Realtime Video Example

An Expo app demonstrating Decart's Realtime Video models for transforming live camera feeds in real-time.

Demo

demo.mov

Features

  • Video Restyling (Lucy-restyle) - Transform your camera feed into different artistic styles (anime, cyberpunk, Pixar-style, and 90+ more)
  • Video Editing (Lucy) - Make real-time edits to your appearance (change outfits, add accessories, transform into characters)
  • Multiple View Modes - Switch between transformed-only, picture-in-picture, vertical split, and horizontal split views
  • Front/Back Camera - Switch between cameras on the fly

Prerequisites

Setup

  1. Clone the repository:

    git clone https://github.com/DecartAI/decart-example-expo-realtime.git
    cd decart-example-expo-realtime
  2. Install dependencies:

    bun install
  3. Create your environment file:

    cp .env.example .env.local
  4. Add your Decart API key to .env.local:

    EXPO_PUBLIC_DECART_API_KEY=your-api-key-here
    
  5. Run on your device:

    # iOS
    bun ios --device
    
    # Android
    bun android --device

How It Works

The app uses Decart's Realtime SDK to:

  1. Capture video from the device camera via WebRTC
  2. Stream frames to Decart's inference servers
  3. Receive transformed frames back in real-time
  4. Display the transformed video alongside or instead of the original

Key integration points:

  • useWebRTC.ts - Establishes the WebRTC connection using @decartai/sdk
  • lucy-restyle-skin-list.ts / lucy-skin-list.ts - Style definitions with prompts
  • Camera.tsx - Orchestrates the camera, styles, and model switching

Models

  • Lucy-restyle 2 (lucy-restyle-2) - Video restyling that transforms the entire scene
  • Lucy Latest (lucy-latest) - Video editing that modifies specific elements

Resources

License

MIT

About

An Expo app demonstrating Decart's realtime video models

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages