# Render video with preset

**Action ID:** `render_video_with_preset`

## Description

Render video preset

## Connection

| Name               | Description                                 | Required | Category |
| ------------------ | ------------------------------------------- | -------- | -------- |
| PixelML Connection | The PixelML connection to call PixelML API. | True     | pixelml  |

## Input Schema

```json
{
  "description": "Render Video with preset node input.",
  "properties": {
    "images": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "string"
        }
      ],
      "description": "List of images to use for rendering",
      "title": "List of images"
    },
    "caption": {
      "description": "Url to a srt file containing the caption",
      "title": "Url to caption file",
      "type": "string"
    },
    "voice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Url to voice file",
      "title": "Voice"
    },
    "voice_volume": {
      "anyOf": [
        {
          "maximum": 1,
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": 0.1,
      "description": "Voice volume",
      "title": "Voice Volume"
    },
    "audio": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Url to audio file",
      "title": "Audio"
    },
    "audio_volume": {
      "anyOf": [
        {
          "maximum": 1,
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": 0.1,
      "description": "Audio volume",
      "title": "Audio Volume"
    },
    "duration": {
      "default": 20,
      "description": "Duration",
      "minimum": 0,
      "title": "Duration",
      "type": "number"
    },
    "config": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Config",
      "title": "Config"
    }
  },
  "required": [
    "images",
    "caption",
    "voice"
  ],
  "title": "RenderVideoWithPresetNodeInput",
  "type": "object"
}
```

## Output Schema

```json
{
  "description": "Render Video node output.",
  "properties": {
    "video": {
      "description": "Rendered video",
      "title": "Rendered video",
      "type": "string"
    }
  },
  "required": [
    "video"
  ],
  "title": "RenderVideoWithPresetNodeOutput",
  "type": "object"
}
```

## How It Works

This node renders videos using predefined presets by combining multiple media elements. It accepts a list of images, optional caption file (SRT format), voice audio, background audio, and configuration parameters. The rendering engine processes these inputs through the PixelML API, synchronizing images with captions and audio tracks based on the specified duration and volume levels. The resulting video is compiled with all elements properly timed and mixed, then returned as a downloadable video URL.

## Usage Examples

### Example 1: Create Marketing Video with Voiceover

**Input:**

```json
{
  "images": ["https://example.com/product1.jpg", "https://example.com/product2.jpg"],
  "caption": "https://example.com/captions.srt",
  "voice": "https://example.com/narration.mp3",
  "voice_volume": 0.8,
  "duration": 15
}
```

**Output:**

```json
{
  "video": "https://pixelml.com/rendered/marketing_video_abc123.mp4"
}
```

### Example 2: Tutorial Video with Background Music

**Input:**

```json
{
  "images": ["https://example.com/step1.png", "https://example.com/step2.png", "https://example.com/step3.png"],
  "caption": "https://example.com/instructions.srt",
  "voice": "https://example.com/tutorial_voice.mp3",
  "voice_volume": 0.9,
  "audio": "https://example.com/background_music.mp3",
  "audio_volume": 0.2,
  "duration": 30
}
```

**Output:**

```json
{
  "video": "https://pixelml.com/rendered/tutorial_video_xyz789.mp4"
}
```

### Example 3: Simple Slideshow with Custom Config

**Input:**

```json
{
  "images": ["https://example.com/slide1.jpg", "https://example.com/slide2.jpg"],
  "caption": "https://example.com/text.srt",
  "voice": "https://example.com/speech.mp3",
  "duration": 20,
  "config": "{\"transition\": \"fade\", \"quality\": \"high\"}"
}
```

**Output:**

```json
{
  "video": "https://pixelml.com/rendered/slideshow_def456.mp4"
}
```

## Common Use Cases

* **Marketing Content Creation**: Generate promotional videos by combining product images with voiceover narration and background music for social media campaigns
* **Educational Content**: Create tutorial videos with step-by-step images, instructional voiceover, and synchronized captions for accessibility
* **Social Media Stories**: Produce engaging story content for platforms like Instagram and Facebook by animating static images with audio
* **Product Demonstrations**: Build product showcase videos that highlight features through image sequences with explanatory voiceover
* **Presentation Videos**: Convert PowerPoint-style slides into video format with synchronized audio narration and captions
* **Content Localization**: Generate multiple video versions with different audio tracks and caption files for international audiences
* **Automated Video Reports**: Create periodic video reports by combining data visualizations with automated voice narration

## Error Handling

| Error Type                   | Cause                                                       | Solution                                                                                  |
| ---------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| Invalid Image URL            | One or more image URLs are malformed or inaccessible        | Verify all image URLs are valid and publicly accessible; check for expired signed URLs    |
| Caption File Format Error    | Caption file is not in valid SRT format or URL is incorrect | Ensure caption file follows SRT format specifications and URL points to a valid .srt file |
| Audio File Not Supported     | Voice or audio file format is incompatible with renderer    | Convert audio files to supported formats (MP3, WAV, AAC) before providing URLs            |
| Volume Out of Range          | Voice or audio volume values exceed 0-1 range               | Set volume values between 0.0 (mute) and 1.0 (full volume)                                |
| Duration Too Short           | Specified duration is insufficient for content length       | Increase duration value to accommodate all images and audio content                       |
| PixelML API Connection Error | Unable to reach PixelML service or invalid credentials      | Verify PixelML connection credentials and check API service status                        |
| Rendering Timeout            | Video rendering exceeds maximum processing time             | Reduce video duration, decrease number of images, or simplify configuration settings      |

## Notes

* **Image Format Support**: Accepts JPEG, PNG, and WebP formats; images are automatically resized to maintain consistent video dimensions
* **Caption Synchronization**: SRT caption files must include proper timestamps; captions are automatically synchronized with video timeline
* **Audio Mixing**: Voice and background audio are mixed in real-time; voice volume typically should be higher than background audio for clarity
* **Default Values**: Voice and audio volumes default to 0.1 (10%); duration defaults to 20 seconds if not specified
* **Processing Time**: Rendering typically takes 30-90 seconds depending on video length and number of images; longer videos may take several minutes
* **Config Parameter**: Optional JSON configuration allows advanced customization of transitions, quality settings, and rendering options
* **URL Requirements**: All media URLs must be publicly accessible or use signed URLs with sufficient expiration time to complete rendering
* **Output Format**: Rendered videos are provided in MP4 format with H.264 encoding, optimized for web playback and social media platforms


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.agenticflow.ai/reference/nodes/render_video_with_preset.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
