> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Video

> Analyze and understand video content with AI

Agents can analyze videos - describe content, answer questions, and extract key moments.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "Video Analysis"
        A[👤 User] --> B[🤖 Agent]
        B --> C[🎬 Video]
        C --> D[📝 Analysis]
    end

    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

    class B agent
    class A,C,D tool
```

## Quick Start

**1. Simple Usage**

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({
  instructions: 'You analyze videos and describe what you see',
  video: true
});

await agent.chat('Analyze https://example.com/video.mp4');
```

**2. With Configuration**

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
await agent.chat([
  { role: 'user', content: [
    { type: 'text', text: 'What is happening in this video?' },
    { type: 'video', url: 'https://example.com/video.mp4' }
  ]}
]);
```

***

## User Interaction Flow

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant Agent
    participant Video
    
    User->>Agent: "Analyze this video"
    Agent->>Video: Extract frames
    Video-->>Agent: Visual content
    Agent-->>User: "This video shows..."
```

***

## Configuration Levels

Based on your needs, configure video analysis at different levels:

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
// Level 1: Bool - Enable with defaults
const agent = new Agent({ video: true });

// Level 2: Dict - Custom options
const agent = new Agent({
  video: {
    maxDuration: 300,
    frameRate: 1
  }
});

// Level 3: Instance - Full control
import { VideoAgent } from 'praisonai';

const videoAgent = new VideoAgent({
  llm: 'gpt-4o',
  maxDuration: 600,
  transcribeAudio: true
});
```

***

## API Reference

> [card] [VideoConfig](https://praison.ai/docs/sdk/reference/typescript/classes/VideoConfig.md)
>
> Complete configuration options

> [card] [VideoAgent](https://praison.ai/docs/sdk/reference/typescript/classes/VideoAgent.md)
>
> Full class documentation

***

## What You Can Do

| Action | Example |
| - | - |
| Describe video | `agent.chat('What happens in this video?')` |
| Ask questions | `agent.chat('How many people appear?')` |
| Get summary | `agent.chat('Summarize this in 2 sentences')` |
| Find moments | `agent.chat('List the key events')` |

***

## Best Practices

> [accordion] Use GPT-4o for video
>
> GPT-4o has the best video understanding. Other models may have limited support.

> [accordion] Keep videos short
>
> Videos under 5 minutes work best. Split longer videos for better analysis.

> [accordion] Be specific in questions
>
> Ask about specific moments or details rather than general questions.

***

## Related

> [card] [Vision](https://praison.ai/docs/js/vision.md)
>
> Analyze images

> [card] [Audio](https://praison.ai/docs/js/audio.md)
>
> Process audio content


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.