Features
- 🎨 Real-time Video Restyling: Transform video with AI-powered style transfer
- 🚀 WebRTC Streaming: Low-latency real-time video processing
- 🔄 Dynamic Prompt Updates: Change styles on-the-fly during calls
- 🪞 Mirror Mode: Optional mirroring for front-facing cameras
Installation
Install the Decart plugin withExample
Check out our Decart example to see working code samples using the plugin, or read on for some key details.Initialization
The Decart plugin exists in the form of theRestylingProcessor class:
Parameters
These are the parameters available in the Decart RestylingProcessor plugin for you to customize:| Name | Type | Default | Description |
|---|---|---|---|
api_key | str or None | None | Your Decart API key. If not provided, the plugin will look for the DECART_API_KEY environment variable. |
model | str | "mirage_v2" | Decart model name to use for video transformation. |
initial_prompt | str | "Cyberpunk city" | Initial style prompt describing the desired visual transformation. |
enrich | bool | True | Whether to enrich the prompt with additional details for better results. |
mirror | bool | True | Enable mirror mode for front-facing cameras. |
width | int | 1280 | Output video width in pixels. |
height | int | 720 | Output video height in pixels. |
How It Works
The Decart integration processes video in real-time:- Video Input: Receives the user’s video stream from the call
- AI Processing: Sends frames to Decart’s Realtime API via WebSocket
- Style Transfer: Decart applies the prompt-based transformation to each frame
- Video Output: Publishes the transformed video back to the call
Usage in Agent
Add theRestylingProcessor to your agent’s processors list:
Dynamic Prompt Updates
You can change the video style during a call by updating the prompt. This is useful for creating interactive experiences where the visual style responds to the conversation:Advanced Configuration
Mirror Mode
Control whether the video is mirrored (useful for front-facing cameras):Custom Resolution
Adjust the output video resolution based on your needs:Higher resolutions require more bandwidth and processing power. The default 1280x720 provides a good balance between quality and performance.
Prompt Engineering Tips
For best results with Decart video transformations:- Be specific: “Studio Ghibli animation with soft colors” works better than just “animated”
- Include style details: Mention artistic styles, color palettes, or visual effects
- Use descriptive language: “Cyberpunk city with neon lights and rain” creates more vivid results
- Experiment: Try different prompts to find what works best for your use case
"Studio Ghibli animation style with vibrant colors""Cyberpunk city with neon lights and holographic displays""Watercolor painting with soft pastel colors""Retro 80s aesthetic with VHS effects""Fantasy medieval castle with magical atmosphere"
Troubleshooting
Connection Issues
If you experience connection problems:- Verify your Decart API key is valid
- Ensure network access to Decart’s servers
- Check firewall settings for WebSocket traffic
No Transformed Video
- Check browser console for errors
- Verify Decart API key has proper permissions
- Ensure the processor is added to the agent’s
processorslist

