RenderIO
Concepts

File Aliases

Learn how RenderIO's file alias system maps input and output files to your FFmpeg commands using placeholder syntax.

File Aliases

RenderIO uses a file alias system to map input and output files to your FFmpeg commands. Instead of hardcoding file paths, you define named aliases that RenderIO replaces with actual file paths before running FFmpeg.

How aliases work

When you submit a command, you provide three things:

  1. input_files - a map of alias names to source file URLs
  2. output_files - a map of alias names to desired output filenames
  3. ffmpeg_command - your FFmpeg command using {{alias}} placeholders

RenderIO downloads the input files, replaces the placeholders with real file paths inside the sandbox, runs FFmpeg, then uploads the outputs.

Naming rules

Aliases must follow these conventions:

RuleInput filesOutput files
PrefixMust start with in_Must start with out_
CharactersAlphanumeric and underscores onlyAlphanumeric and underscores only
Pattern/^[a-zA-Z0-9_]+$//^[a-zA-Z0-9_]+$/

Valid input alias examples: in_video, in_audio, in_logo, in_subtitle_file

Valid output alias examples: out_video, out_thumbnail, out_compressed

Invalid aliases: video (missing prefix), in-video (contains hyphen), in_video.mp4 (contains dot)

Placeholder syntax

In your ffmpeg_command, reference aliases using double curly braces:

-i {{in_video}} -i {{in_audio}} -c:v libx264 {{out_video}}

RenderIO replaces each {{alias}} with the actual file path in the sandbox before executing the command.

Input files

The values in input_files must be URLs pointing to publicly accessible source files. RenderIO downloads these files into the sandbox before running FFmpeg.

{
  "input_files": {
    "in_video": "https://example.com/source-video.mp4",
    "in_watermark": "https://example.com/logo.png"
  }
}

Output files

The values in output_files are the desired filenames for the output. These determine the file extension and name of the output in storage.

{
  "output_files": {
    "out_video": "watermarked.mp4",
    "out_thumbnail": "thumb.jpg"
  }
}

Complete example

Here is a full request that adds a watermark to a video and also extracts a thumbnail:

curl -X POST https://renderio.dev/api/v1/run-chained-ffmpeg-commands \
  -H "X-API-KEY: ffsk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "input_files": {
      "in_video": "https://example.com/video.mp4",
      "in_logo": "https://example.com/logo.png"
    },
    "output_files": {
      "out_video": "watermarked.mp4",
      "out_thumb": "thumbnail.jpg"
    },
    "ffmpeg_commands": [
      "-i {{in_video}} -i {{in_logo}} -filter_complex overlay=10:10 -c:a copy {{out_video}}",
      "-i {{out_video}} -ss 00:00:01 -vframes 1 {{out_thumb}}"
    ]
  }'

In this example:

AliasTypeValuePurpose
in_videoInputhttps://example.com/video.mp4Source video to watermark
in_logoInputhttps://example.com/logo.pngWatermark image
out_videoOutputwatermarked.mp4Watermarked video result
out_thumbOutputthumbnail.jpgExtracted thumbnail frame

Tips

  • Use descriptive alias names that indicate the purpose of the file (in_background, in_overlay, out_compressed)
  • Each alias in input_files and output_files must appear at least once in your ffmpeg_command or ffmpeg_commands
  • Output aliases from earlier steps in a chained command can be used as inputs in later steps (like {{out_video}} being used as input in the second command above)

On this page