Run
Executes the FFmpeg command to process media files. This is the final node in an FFmpeg pipeline that actually performs the media processing operation.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- stream_id - Stream ID from an Output node. This identifies the complete processing pipeline to execute.
Options
-
Overwrite - Boolean flag to overwrite output files if they already exist. Default is false.
true- Automatically overwrite existing filesfalse- Fail if output file exists
-
Global Options - Array of global FFmpeg options that apply to the entire command. These are different from input/output options. Examples:
["-threads", "4"]- Use 4 threads for processing["-loglevel", "error"]- Set logging level["-stats"]- Show encoding statistics
-
Custom Global Options - Individual global options added as separate fields. Each option should be a complete flag or flag-value pair.
Output
- command - The complete FFmpeg command that was executed. Useful for debugging and logging.
How It Works
The Run node executes the FFmpeg command based on the pipeline built by previous nodes. When executed, the node:
- Validates that a stream ID is provided
- Retrieves the complete stream pipeline from the session
- Applies the overwrite setting if enabled
- Adds any global options specified
- Compiles the FFmpeg command
- Executes the command
- Waits for completion
- Cleans up the session
- Returns the executed command string
The actual media processing happens during this node's execution. Processing time depends on file size, complexity of operations, and system resources.
Global Options Reference
Common global FFmpeg options:
| Option | Description | Example |
|---|---|---|
-threads | Number of threads to use | ["-threads", "4"] |
-loglevel | Logging level | ["-loglevel", "error"] |
-stats | Show encoding statistics | ["-stats"] |
-nostdin | Disable interaction | ["-nostdin"] |
-report | Generate detailed report | ["-report"] |
-benchmark | Show benchmarking info | ["-benchmark"] |
-xerror | Exit on error | ["-xerror"] |
Example Usage
Basic Execution
Execute a simple video conversion:
// Previous nodes: Create → Input → Output
// Run node settings:
{
"Overwrite": true
}
Execution with Threading
Use multiple threads for faster processing:
{
"Overwrite": true,
"Global Options": ["-threads", "8"]
}
Quiet Execution
Suppress most output messages:
{
"Overwrite": false,
"Global Options": ["-loglevel", "error"]
}
Verbose Logging
Get detailed execution information:
{
"Global Options": ["-loglevel", "verbose", "-report"]
}
Practical RPA Scenarios
Scenario 1: Convert Screen Recording
Complete workflow to convert a screen recording:
Create →
Input (/recordings/screen_capture.avi) → input_stream
→
Filter (scale, input_stream, ["w=1280", "h=720"]) → scaled_stream
→
Output (scaled_stream, /output/recording.mp4, ["c:v=libx264", "crf=23"]) → output_stream
→
Run (output_stream, Overwrite=true)
Scenario 2: Batch Video Processing
Process multiple videos with consistent settings:
// In a loop for each video file:
Create → Input (video_file) → Output (output_file) → Run
// Run node:
{
"Overwrite": true,
"Global Options": ["-threads", "4", "-loglevel", "error"]
}
Scenario 3: Merge and Export
Merge clips and export with progress monitoring:
Create →
Input (clip1.mp4) → stream1
Input (clip2.mp4) → stream2
Input (clip3.mp4) → stream3
→
Filter (concat, [stream1, stream2, stream3], ["n=3", "v=1", "a=1"]) → merged
→
Output (merged, /output/final.mp4, ["c:v=libx264", "preset=medium"]) → out
→
Run (out, Overwrite=true, Global Options=["-stats"])
Scenario 4: Safe Execution with Error Handling
Execute with safeguards against overwriting:
// Check if output exists first using File System nodes
// Then run with appropriate settings
{
"Overwrite": false // Fail if file exists
}
// Use Try-Catch nodes to handle the error
Scenario 5: High-Performance Processing
Optimize for speed on multi-core systems:
{
"Overwrite": true,
"Global Options": [
"-threads", "0", // Use all available cores
"-preset", "ultrafast",
"-loglevel", "error"
]
}
Understanding the Command Output
The command output contains the complete FFmpeg command that was executed. Example:
ffmpeg -i /input/video.mp4 -vf scale=w=1280:h=720 -c:v libx264 -crf 23 -c:a aac -b:a 128k /output/video.mp4 -y
This is useful for:
- Debugging - Verify the exact command being run
- Logging - Record what processing was performed
- Reproducibility - Re-run the same command manually if needed
- Learning - Understand FFmpeg syntax and options
Error Handling
The node will return errors in the following cases:
- "Stream Id cannot be empty" - No stream_id provided
- "Invalid stream id" - The stream_id doesn't exist in the session
- FFmpeg execution errors - Various errors based on the processing operation:
- File not found
- Invalid codec
- Unsupported format
- Insufficient disk space
- Permission denied
- Corrupted input file
- Invalid filter parameters
Usage Notes
- This node actually executes the FFmpeg process - all previous nodes only build the command
- Processing time varies greatly based on file size and operations
- The session is automatically cleaned up after execution
- The Overwrite setting only affects the final output file, not intermediate processing
- If execution fails, the session is still cleaned up
- Large files may require significant time - consider timeout settings in production
- Progress cannot be monitored during execution (FFmpeg runs to completion)
Performance Considerations
Processing Time Factors
- Input File Size - Larger files take longer to process
- Output Settings - Higher quality/resolution increases processing time
- Codec Complexity - H.265 is slower than H.264; VP9 slower than VP8
- Filter Complexity - Multiple or complex filters increase processing time
- CPU Power - More cores and faster CPU reduce processing time
- Disk Speed - Fast SSDs improve read/write performance
Optimization Tips
- Use Threading: Set
-threadsto match your CPU cores (or use0for auto) - Choose Fast Presets: Use
preset=fastorpreset=ultrafastwhen quality isn't critical - Copy When Possible: Use
c=copyto avoid re-encoding - Limit Input: Use input options (
ss,t) to process only needed portions - Parallel Processing: Run multiple independent FFmpeg sessions in parallel
- SSD Storage: Use SSD for input/output when possible
Common Errors and Solutions
Error: "Output file already exists"
Cause: Output file exists and Overwrite is false. Solution: Set Overwrite to true, or delete the existing file first, or use a different output filename.
Error: "No space left on device"
Cause: Insufficient disk space for output file. Solution: Free up disk space or choose a different output location with more space.
Error: "Permission denied"
Cause: No write permission for output directory. Solution: Ensure the output directory is writable or choose a different location.
Error: "Encoder not found"
Cause: Specified codec is not available in FFmpeg build. Solution: Use a different codec or verify FFmpeg installation includes the codec.
Error: "Invalid argument"
Cause: Malformed options or incompatible option combinations. Solution: Review all options in Input, Output, and Filter nodes for syntax errors.
Error: "Conversion failed"
Cause: Generic error, often due to corrupted input or incompatible formats. Solution: Check input file integrity, verify format compatibility, review FFmpeg error messages in logs.
Best Practices
- Always Set Overwrite: Explicitly set Overwrite based on your use case to avoid unexpected behavior
- Use Error Handling: Wrap Run node in Try-Catch for robust error handling
- Log Commands: Store the command output for debugging and audit trails
- Validate Inputs First: Use Probe node to verify input files before processing
- Monitor Disk Space: Check available space before processing large files
- Set Timeouts: For production, set appropriate timeout values for expected processing times
- Test Incrementally: Test the complete pipeline with small files first
- Handle Cleanup: Delete temporary files after successful processing
Example Workflows
Complete Video Conversion Workflow
[Start]
↓
[Create FFmpeg Session]
↓
[Input: source.avi]
↓
[Filter: Scale to 720p]
↓
[Output: result.mp4]
↓
[Run: Overwrite=true, Threads=4]
↓
[Log Command]
↓
[Verify Output Exists]
↓
[End]
Robust Processing with Error Handling
[Try]
[Create] → [Input] → [Filter] → [Output] → [Run]
[Catch]
[Log Error]
[Send Notification]
[Cleanup Partial Files]
[Finally]
[Log Command]
[Update Processing Status]
Monitoring and Debugging
Reviewing Execution
- Check Command Output: Review the generated FFmpeg command
- Verify File Creation: Confirm output file was created
- Inspect File Size: Ensure output file is not empty or corrupted
- Use Probe: Probe the output file to verify it has expected properties
- Check Logs: Review any error messages from FFmpeg
Debugging Failed Executions
- Copy the command output
- Run it manually in terminal for detailed error messages
- Test with a smaller or simpler input file
- Verify all file paths are correct and accessible
- Check FFmpeg version and available codecs
- Simplify the pipeline (remove filters) to isolate issues
Advanced Usage
Conditional Overwrite
// Check if file exists using File System nodes
if (file_exists) {
// Prompt user or use logic to decide
overwrite = user_decision;
} else {
overwrite = false;
}
// Run node:
{ "Overwrite": overwrite }
Performance Benchmarking
{
"Global Options": [
"-benchmark",
"-loglevel", "info"
]
}
// Check command output for timing information
Generating Reports
{
"Global Options": ["-report"]
}
// FFmpeg creates a detailed report file
Related Nodes
- Create - Initializes the session that Run executes
- Input - Provides source files for processing
- Output - Defines the output configuration
- Filter - Applies transformations before Run executes
- Probe - Verify output file properties after Run completes