Probe
Analyzes media files to extract detailed information about format, streams, codecs, duration, bitrate, resolution, and other metadata. This node uses FFprobe under the hood to inspect media files without processing them.
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
- File Path - Path to the media file to analyze. Must be a local file path (not a URL).
Options
This node does not have any configurable options.
Output
- info - Object containing comprehensive media file information in JSON format. The structure includes:
- format - Container format information
filename- Input file pathformat_name- Format name (e.g., "mov,mp4,m4a,3gp,3g2,mj2")format_long_name- Human-readable format descriptionduration- Total duration in secondssize- File size in bytesbit_rate- Overall bitratetags- Metadata tags (title, artist, date, etc.)
- streams - Array of stream information
index- Stream indexcodec_type- Type: "video", "audio", "subtitle", "data"codec_name- Codec name (e.g., "h264", "aac")codec_long_name- Human-readable codec descriptionwidth- Video width in pixels (video streams only)height- Video height in pixels (video streams only)duration- Stream duration in secondsbit_rate- Stream bitratesample_rate- Audio sample rate (audio streams only)channels- Number of audio channels (audio streams only)tags- Stream-specific metadata
- format - Container format information
How It Works
The Probe node uses FFprobe to analyze media files and extract detailed information. When executed, the node:
- Validates that the file path is provided
- Checks that the file exists and is not a directory
- Executes FFprobe with JSON output format
- Parses the JSON response
- Returns the complete media information as an object
This operation is read-only and does not modify the file. It's fast and lightweight compared to media processing operations.
Example Output Structure
{
"format": {
"filename": "/path/to/video.mp4",
"format_name": "mov,mp4,m4a,3gp,3g2,mj2",
"format_long_name": "QuickTime / MOV",
"duration": "120.500000",
"size": "15728640",
"bit_rate": "1044480",
"tags": {
"major_brand": "isom",
"minor_version": "512",
"compatible_brands": "isomiso2avc1mp41",
"encoder": "Lavf58.45.100"
}
},
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"codec_type": "video",
"width": 1920,
"height": 1080,
"r_frame_rate": "30/1",
"avg_frame_rate": "30/1",
"duration": "120.500000",
"bit_rate": "913491"
},
{
"index": 1,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"codec_type": "audio",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"duration": "120.500000",
"bit_rate": "128000"
}
]
}
Example Usage
Basic File Inspection
Get information about a video file:
// Probe node:
{
"File Path": "/path/to/video.mp4"
}
// Output: info object
// Access data in subsequent nodes:
info.format.duration // "120.500000"
info.streams[0].width // 1920
info.streams[0].height // 1080
Extract Video Properties
Get video dimensions and codec:
// After Probe node, use Script node:
const videoStream = info.streams.find(s => s.codec_type === 'video');
const width = videoStream.width;
const height = videoStream.height;
const codec = videoStream.codec_name;
Check File Duration
Determine video length:
const duration = parseFloat(info.format.duration);
const minutes = Math.floor(duration / 60);
const seconds = Math.floor(duration % 60);
// e.g., "2 minutes 0 seconds"
Validate File Properties
Ensure file meets requirements:
const videoStream = info.streams.find(s => s.codec_type === 'video');
const isHD = videoStream.width >= 1280 && videoStream.height >= 720;
const isH264 = videoStream.codec_name === 'h264';
const hasAudio = info.streams.some(s => s.codec_type === 'audio');
if (!isHD || !isH264 || !hasAudio) {
// File doesn't meet requirements
}
Practical RPA Scenarios
Scenario 1: Validate Before Processing
Check file properties before starting intensive processing:
[Probe file] →
[Script: Check if video is > 1080p] →
If yes: [Skip processing, already high quality]
If no: [Create → Input → Filter (upscale) → Output → Run]
Scenario 2: Determine Processing Parameters
Use file properties to set appropriate conversion settings:
// Probe the input file
Probe → info
// Script node to determine settings:
const videoStream = info.streams.find(s => s.codec_type === 'video');
let targetWidth, targetHeight;
if (videoStream.width > 1920) {
// 4K or higher - downscale to 1080p
targetWidth = 1920;
targetHeight = 1080;
} else {
// Keep original size
targetWidth = videoStream.width;
targetHeight = videoStream.height;
}
// Use in Filter node
Scenario 3: Extract Metadata for Database
Store media file information in database:
[Probe] →
[Script: Extract key properties] →
[Database: Insert record]
Properties to store:
- Filename
- Duration
- Resolution (width x height)
- Format
- File size
- Codecs used
Scenario 4: Batch File Analysis
Analyze multiple files and generate report:
// Loop through files
for each file:
[Probe file] →
[Extract: duration, resolution, size, format] →
[Add to report array]
// After loop:
[Generate CSV or Excel report]
Scenario 5: Smart File Conversion
Only convert files that need conversion:
[Probe] →
[Check codec and format] →
If already H.264/MP4: [Skip conversion]
If different format: [Convert to H.264/MP4]
Scenario 6: Verify Processed Output
Confirm output file was created correctly:
[Run FFmpeg command] →
[Probe output file] →
[Verify properties match expectations] →
If correct: [Continue]
If incorrect: [Retry or alert]
Accessing Information
Format Information
// File path
const filename = info.format.filename;
// Format name and type
const format = info.format.format_name;
const formatDesc = info.format.format_long_name;
// Duration (in seconds)
const duration = parseFloat(info.format.duration);
// File size (in bytes)
const fileSize = parseInt(info.format.size);
// Bitrate
const bitrate = parseInt(info.format.bit_rate);
// Metadata tags
const tags = info.format.tags;
const title = tags?.title;
const date = tags?.date;
Stream Information
// Get all streams
const streams = info.streams;
// Find video stream
const videoStream = streams.find(s => s.codec_type === 'video');
// Find audio stream
const audioStream = streams.find(s => s.codec_type === 'audio');
// Video properties
if (videoStream) {
const width = videoStream.width;
const height = videoStream.height;
const codec = videoStream.codec_name;
const fps = eval(videoStream.r_frame_rate); // e.g., "30/1" → 30
}
// Audio properties
if (audioStream) {
const sampleRate = parseInt(audioStream.sample_rate);
const channels = audioStream.channels;
const audioCodec = audioStream.codec_name;
}
Calculated Properties
// Resolution category
const resolution = `${videoStream.width}x${videoStream.height}`;
let category;
if (videoStream.width >= 3840) category = '4K';
else if (videoStream.width >= 1920) category = '1080p';
else if (videoStream.width >= 1280) category = '720p';
else category = 'SD';
// File size in MB
const fileSizeMB = (parseInt(info.format.size) / 1024 / 1024).toFixed(2);
// Duration in HH:MM:SS
const totalSeconds = parseFloat(info.format.duration);
const hours = Math.floor(totalSeconds / 3600);
const minutes = Math.floor((totalSeconds % 3600) / 60);
const seconds = Math.floor(totalSeconds % 60);
const durationFormatted = `${hours}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
Error Handling
The node will return errors in the following cases:
- "Input file is required" - File path is empty
- "File does not exist" - The specified file cannot be found
- "Input should be a file and not a directory" - Path points to a directory
- "Failed to get file info" - FFprobe execution failed (corrupted file, unsupported format, etc.)
- "Failed to parse file info" - FFprobe output could not be parsed (unexpected format)
Usage Notes
- Probe is independent - it doesn't require Create node or session ID
- Works only with local files - URLs are not supported
- Fast operation - typically completes in milliseconds
- Read-only - never modifies the file
- Can be used before or after FFmpeg processing
- Some properties may be missing for certain file types
- Corrupted files may cause errors or return incomplete information
Performance Tips
- Probe Before Processing: Validate files before expensive operations
- Cache Results: Store probe results if checking the same file multiple times
- Parallel Probing: Probe multiple files in parallel for batch operations
- Early Validation: Use Probe early in workflow to fail fast on invalid files
Common Errors and Solutions
Error: "File does not exist"
Cause: The file path is incorrect or file was deleted. Solution: Verify the path is correct and the file exists. Use absolute paths.
Error: "Input should be a file and not a directory"
Cause: The path points to a directory instead of a file. Solution: Provide the complete file path including filename.
Error: "Failed to get file info"
Cause: FFprobe cannot read the file (corrupted, unsupported format, permissions). Solution: Verify file integrity, check format is supported, ensure read permissions.
Error: Property is undefined
Cause: Trying to access a property that doesn't exist for this file type.
Solution: Use optional chaining (?.) or check if property exists before accessing.
Best Practices
- Validate File Existence: Use File System nodes to check file exists before probing
- Handle Missing Properties: Not all files have all properties - check before accessing
- Type Conversion: Convert string values (duration, size) to numbers when doing calculations
- Error Handling: Wrap Probe in try-catch for robust error handling
- Use for Validation: Probe files before processing to catch issues early
- Store Results: Save probe results in variables for use in multiple nodes
- Filter Streams: When working with streams, filter by codec_type to find the right stream
Advanced Usage
Multi-Stream Analysis
// Analyze all streams in the file
const videoStreams = info.streams.filter(s => s.codec_type === 'video');
const audioStreams = info.streams.filter(s => s.codec_type === 'audio');
const subtitleStreams = info.streams.filter(s => s.codec_type === 'subtitle');
console.log(`Video streams: ${videoStreams.length}`);
console.log(`Audio streams: ${audioStreams.length}`);
console.log(`Subtitle streams: ${subtitleStreams.length}`);
Codec Compatibility Check
const supportedVideoCodecs = ['h264', 'hevc', 'vp8', 'vp9'];
const supportedAudioCodecs = ['aac', 'mp3', 'opus', 'vorbis'];
const videoStream = info.streams.find(s => s.codec_type === 'video');
const audioStream = info.streams.find(s => s.codec_type === 'audio');
const needsVideoConversion = !supportedVideoCodecs.includes(videoStream?.codec_name);
const needsAudioConversion = !supportedAudioCodecs.includes(audioStream?.codec_name);
if (needsVideoConversion || needsAudioConversion) {
// Trigger conversion workflow
}
Quality Assessment
const videoStream = info.streams.find(s => s.codec_type === 'video');
const bitrate = parseInt(videoStream.bit_rate || info.format.bit_rate);
const pixels = videoStream.width * videoStream.height;
const bitsPerPixel = bitrate / pixels / 30; // Assuming 30 fps
let quality;
if (bitsPerPixel > 0.15) quality = 'High';
else if (bitsPerPixel > 0.08) quality = 'Medium';
else quality = 'Low';
Related Nodes
- Input - Use Probe results to determine input settings
- Filter - Use properties to configure appropriate filters
- Output - Set output parameters based on input properties
- File System - Check file existence before probing
- Script - Process and analyze probe results
Additional Resources
For more information about FFprobe and available data: