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:
input_files- a map of alias names to source file URLsoutput_files- a map of alias names to desired output filenamesffmpeg_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:
| Rule | Input files | Output files |
|---|---|---|
| Prefix | Must start with in_ | Must start with out_ |
| Characters | Alphanumeric and underscores only | Alphanumeric 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:
| Alias | Type | Value | Purpose |
|---|---|---|---|
in_video | Input | https://example.com/video.mp4 | Source video to watermark |
in_logo | Input | https://example.com/logo.png | Watermark image |
out_video | Output | watermarked.mp4 | Watermarked video result |
out_thumb | Output | thumbnail.jpg | Extracted thumbnail frame |
Tips
- Use descriptive alias names that indicate the purpose of the file (
in_background,in_overlay,out_compressed) - Each alias in
input_filesandoutput_filesmust appear at least once in yourffmpeg_commandorffmpeg_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)
Related pages
- Your First Command -- full walkthrough using file aliases in a real request
- Command Types -- how aliases work across single, chained, and batch commands