Skip to main content

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.
info

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 files
    • false - 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:

  1. Validates that a stream ID is provided
  2. Retrieves the complete stream pipeline from the session
  3. Applies the overwrite setting if enabled
  4. Adds any global options specified
  5. Compiles the FFmpeg command
  6. Executes the command
  7. Waits for completion
  8. Cleans up the session
  9. 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:

OptionDescriptionExample
-threadsNumber of threads to use["-threads", "4"]
-loglevelLogging level["-loglevel", "error"]
-statsShow encoding statistics["-stats"]
-nostdinDisable interaction["-nostdin"]
-reportGenerate detailed report["-report"]
-benchmarkShow benchmarking info["-benchmark"]
-xerrorExit 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:

CreateInput (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

  1. Input File Size - Larger files take longer to process
  2. Output Settings - Higher quality/resolution increases processing time
  3. Codec Complexity - H.265 is slower than H.264; VP9 slower than VP8
  4. Filter Complexity - Multiple or complex filters increase processing time
  5. CPU Power - More cores and faster CPU reduce processing time
  6. Disk Speed - Fast SSDs improve read/write performance

Optimization Tips

  1. Use Threading: Set -threads to match your CPU cores (or use 0 for auto)
  2. Choose Fast Presets: Use preset=fast or preset=ultrafast when quality isn't critical
  3. Copy When Possible: Use c=copy to avoid re-encoding
  4. Limit Input: Use input options (ss, t) to process only needed portions
  5. Parallel Processing: Run multiple independent FFmpeg sessions in parallel
  6. 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

  1. Always Set Overwrite: Explicitly set Overwrite based on your use case to avoid unexpected behavior
  2. Use Error Handling: Wrap Run node in Try-Catch for robust error handling
  3. Log Commands: Store the command output for debugging and audit trails
  4. Validate Inputs First: Use Probe node to verify input files before processing
  5. Monitor Disk Space: Check available space before processing large files
  6. Set Timeouts: For production, set appropriate timeout values for expected processing times
  7. Test Incrementally: Test the complete pipeline with small files first
  8. 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

  1. Check Command Output: Review the generated FFmpeg command
  2. Verify File Creation: Confirm output file was created
  3. Inspect File Size: Ensure output file is not empty or corrupted
  4. Use Probe: Probe the output file to verify it has expected properties
  5. Check Logs: Review any error messages from FFmpeg

Debugging Failed Executions

  1. Copy the command output
  2. Run it manually in terminal for detailed error messages
  3. Test with a smaller or simpler input file
  4. Verify all file paths are correct and accessible
  5. Check FFmpeg version and available codecs
  6. 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
  • 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