Output
Defines the output file for an FFmpeg session. This node specifies where processed media will be saved and what encoding parameters to apply.
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 Input or Filter node. This is the primary stream that will be written to the output file.
- Output File Path - Path where the output file will be saved. The file extension determines the output format (e.g.,
.mp4,.avi,.webm,.mp3). - Additional Stream IDs - Optional array of additional stream IDs to include in the output. Useful for:
- Combining video and audio from separate sources
- Including multiple audio tracks
- Merging subtitle streams
Options
-
Output File Options - Array of FFmpeg output options. These control the encoding and output parameters. Examples:
["c:v=libx264"]- Use H.264 video codec["b:v=2M"]- Set video bitrate to 2 Mbps["c:a=aac"]- Use AAC audio codec["preset=fast"]- Use fast encoding preset["crf=23"]- Set quality level (lower = better quality)
-
Custom Output File Options - Individual output options added as separate fields. Each option should follow the format:
key=valuefor options with values (e.g.,c:v=libx264)keyonly for flags
Output
- stream_id - Output stream identifier. This must be passed to the Run node to execute the FFmpeg command.
How It Works
The Output node defines the final destination and encoding parameters for your media processing pipeline. When executed, the node:
- Validates the input stream ID and output file path
- Retrieves the input stream(s) from the session
- Parses output options
- Creates an FFmpeg output stream with the specified settings
- Returns an output stream ID for use with the Run node
Output Options Reference
Video Encoding Options
| Option | Description | Example |
|---|---|---|
c:v or codec:v | Video codec | c:v=libx264, c:v=libx265, c:v=vp9 |
b:v | Video bitrate | b:v=2M (2 Mbps), b:v=500k (500 kbps) |
crf | Constant Rate Factor (quality) | crf=23 (default), crf=18 (high quality) |
preset | Encoding speed preset | preset=fast, preset=slow (better quality) |
r | Frame rate | r=30 (30 fps), r=60 (60 fps) |
s | Resolution | s=1920x1080, s=1280x720 |
pix_fmt | Pixel format | pix_fmt=yuv420p |
Audio Encoding Options
| Option | Description | Example |
|---|---|---|
c:a or codec:a | Audio codec | c:a=aac, c:a=libmp3lame, c:a=opus |
b:a | Audio bitrate | b:a=192k (192 kbps), b:a=128k (128 kbps) |
ar | Audio sample rate | ar=48000 (48 kHz), ar=44100 (44.1 kHz) |
ac | Audio channels | ac=2 (stereo), ac=1 (mono) |
General Output Options
| Option | Description | Example |
|---|---|---|
f | Force format | f=mp4, f=webm |
t | Duration | t=60 (60 seconds) |
ss | Start time | ss=00:00:10 (start at 10 seconds) |
map | Stream mapping | map=0:v:0, map=1:a:0 |
movflags | MP4 flags | movflags=+faststart (web optimization) |
Example Usage
Basic MP4 Output
Save processed video as MP4:
// Output node settings:
{
"Output File Path": "/path/to/output.mp4"
}
High-Quality H.264 Output
Create high-quality video with H.264 codec:
// Output File Options:
["c:v=libx264", "crf=18", "preset=slow", "c:a=aac", "b:a=192k"]
Web-Optimized Video
Create a video optimized for web streaming:
// Output File Options:
["c:v=libx264", "preset=fast", "movflags=+faststart", "c:a=aac", "b:a=128k"]
Compressed Video for Storage
Reduce file size with higher compression:
// Output File Options:
["c:v=libx265", "crf=28", "preset=slow", "c:a=aac", "b:a=96k"]
Audio-Only Output
Extract audio to MP3:
{
"Output File Path": "/path/to/audio.mp3",
"Output File Options": ["c:a=libmp3lame", "b:a=320k"]
}
Multiple Stream Output
Combine video from one source with audio from another:
// Assuming:
// video_stream_id from Input node (video file)
// audio_stream_id from Input node (audio file)
{
"stream_id": video_stream_id,
"Additional Stream IDs": [audio_stream_id],
"Output File Path": "/path/to/combined.mp4",
"Output File Options": ["c:v=copy", "c:a=aac", "b:a=192k"]
}
Copy Streams (No Re-encoding)
Copy streams without re-encoding for fast processing:
// Output File Options:
["c=copy"]
// or separately:
["c:v=copy", "c:a=copy"]
Practical RPA Scenarios
Scenario 1: Convert Screen Recording to Web Format
Convert a screen recording to web-optimized MP4:
Create → Input (recording.avi) → Output (recording.mp4) → Run
Output settings:
{
"Output File Options": [
"c:v=libx264",
"preset=fast",
"crf=23",
"movflags=+faststart",
"c:a=aac",
"b:a=128k"
]
}
Scenario 2: Create Video Thumbnail
Extract a single frame as an image:
// Output File Path: "/path/to/thumbnail.jpg"
// Output File Options:
["vframes=1", "ss=00:00:05"]
// Extracts frame at 5 seconds
Scenario 3: Reduce Video File Size
Compress video for email or upload:
// Output File Options:
["c:v=libx264", "crf=28", "preset=fast", "s=1280x720", "c:a=aac", "b:a=96k"]
// Reduces resolution to 720p with higher compression
Scenario 4: Extract Audio Track
Save only the audio from a video:
// Output File Path: "/path/to/audio.mp3"
// Output File Options:
["vn", "c:a=libmp3lame", "b:a=192k"]
// vn = no video
Scenario 5: Replace Audio in Video
Combine video from one file with audio from another:
Create →
Input (video.mp4) → video_stream
Input (audio.mp3) → audio_stream
→ Output (combined.mp4, streams=[video_stream, audio_stream]) → Run
Output File Options:
["c:v=copy", "c:a=aac", "b:a=192k", "map=0:v", "map=1:a"]
Format-Specific Examples
MP4 (H.264/AAC)
["c:v=libx264", "crf=23", "preset=medium", "c:a=aac", "b:a=128k", "movflags=+faststart"]
WebM (VP9/Opus)
["c:v=libvpx-vp9", "crf=30", "b:v=0", "c:a=libopus", "b:a=128k"]
High-Quality Archive (H.265/AAC)
["c:v=libx265", "crf=20", "preset=slow", "c:a=aac", "b:a=256k"]
GIF Animation
["vf=fps=10,scale=320:-1:flags=lanczos", "f=gif"]
Error Handling
The node will return errors in the following cases:
- "Stream Id cannot be empty" - No stream_id provided
- "Invalid stream id" - The provided stream_id doesn't exist in the session
- Invalid option format - Output options are not properly formatted
Usage Notes
- The output file format is determined by the file extension
- Some codecs may not be available depending on your FFmpeg build
- Using
c=copyorc:v=copycopies streams without re-encoding (fastest) - The CRF (Constant Rate Factor) scale is 0-51, where lower values mean better quality
- For web videos, use
movflags=+faststartto enable progressive playback - Multiple audio tracks can be added using Additional Stream IDs
- The actual file is not created until the Run node executes
Performance Tips
- Use Copy When Possible: If no conversion is needed, use
c=copyto avoid re-encoding - Choose Appropriate Presets: Use
preset=fastfor speed orpreset=slowfor better quality - Balance Quality and Size: CRF 23 is a good balance; adjust based on needs
- Limit Resolution: Downscale video if high resolution isn't needed
- Optimize for Target Platform: Use format-specific optimizations (e.g.,
movflags=+faststartfor MP4)
Common Errors and Solutions
Error: "Output file already exists"
Cause: The output file exists and overwrite is not enabled. Solution: Enable the Overwrite option in the Run node or delete the existing file first.
Error: "Unknown encoder"
Cause: The specified codec is not available in your FFmpeg build. Solution: Use a different codec or verify FFmpeg installation supports the codec.
Error: "Invalid argument"
Cause: Malformed option or incompatible option combination. Solution: Check option syntax and ensure options are compatible with the output format.
Error: "Option not found"
Cause: Using an option that doesn't exist or is misspelled. Solution: Verify option names against FFmpeg documentation.
Best Practices
- Test Output Settings: Start with default settings, then optimize as needed
- Use Descriptive Paths: Include format and quality in output filenames (e.g.,
video_720p_compressed.mp4) - Enable Fast Start: Always use
movflags=+faststartfor web video - Preserve Quality When Needed: Use
c=copyor low CRF values for archival purposes - Consider File Size: Balance quality and file size based on use case
- Validate Output: Use Probe node after processing to verify output properties
Related Nodes
- Input - Provides the source streams for this node
- Filter - Can process streams before output
- Run - Executes the FFmpeg command to create the output file
- Create - Initializes the session containing all streams