Multiple Media Input

Multiple Media Input in AgenticFlow AI

What is a Multiple Media Input?

A Multiple Media Input is an input component that allows you to upload multiple video or image files to the cloud and access them via temporary URLs. These URLs can be used in other workflow actions, such as rendering a video that compiles and processes these media files. For security reasons, AgenticFlow AI does not store your files permanently; the provided URLs expire within 3 days after upload. Therefore, it is recommended to apply the desired analysis steps right after the upload.

When to Use the Multiple Media Input Component

The Multiple Media Input component is suitable for scenarios where you need to process multiple video or image files. For example, you can upload several clips or images to be used in a video rendering action that programmatically creates a highlight reel by analyzing, trimming, and combining the media files.

How to Add a Multiple Media Input to Your Custom Workflow

The Multiple Media Input component is listed under User Inputs. You can add it to your workflow using the main section or the sidebar.

Adding a Multiple Media Input

  1. Navigate to the Workflow page.

  2. Click on + Create Workflow or select an existing workflow.

  3. In the empty state or within your workflow, click on + Add Input.

  4. Select Multiple Media Input from the list of input components.

Multiple Media Input Settings

Title

The title of your input component.

Description

Describe what this input is or will be used for. This helps users understand the purpose of the input.

Variable Name

Located at the bottom left and marked in green, you can rename the variable. Use this name to access the data in your workflow.

Optional/Required

Located at the top right, indicating whether the input is mandatory for the workflow to run:

  • Optional: The input is not required for the workflow to function.

  • Required: The input must be provided before the workflow can start.

Setting a Default Value

To set a default value for a Multiple Media Input component:

  1. Enter the value in the input field.

  2. Click on the small setting icon at the bottom right.

  3. Click on Set Current Value to save the default value.

Accessing the URLs

To access the URLs of the uploaded files, use the variable name within double curly braces {{}}.

For example, if the variable name is media_urls, you can access it as:

  • {{media_urls}} in most workflow steps.

  • params.media_urls in a JavaScript step.

Example Usage in a Prompt:

Render a video using the following media files: "{{media_urls}}"

Practical Example

Example Workflow: Creating a Highlight Video from Multiple Clips

  1. Add a Multiple Media Input:

    • Title: "Upload Media Files"

    • Description: "Upload the video and image files for your project."

    • Variable Name: media_files_urls

  2. Add a Video Player Action:

    • This allows users to play the uploaded media files in the browser to verify the correct files were uploaded.

  3. Add an LLM with Media Processing Capabilities Action:

    • Use the URLs provided by the media_files_urls variable to access the media files.

    • Prompt:

      Analyze the media files at the following URLs: "{{media_files_urls}}". Trim and cut the videos to highlight the key moments and compile them into a single highlight video.
  4. Run the Workflow:

    • Save the workflow.

    • On the App page, upload the media files using the Multiple Media Input component.

    • Verify the media by playing them in the browser.

    • Run the workflow to see the processed highlight video.

By following these steps, you can effectively utilize Multiple Media Input components in your workflows to upload and process multiple media files, enhancing the capabilities of your AI-driven automation in AgenticFlow AI.

Last updated