Skip to main content

Play

Plays media files using FFplay, FFmpeg's built-in media player. This node is useful for previewing videos, testing media files, and verifying processing results during automation development.

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

  • File Path - Path to the media file to play. Must be a local file path.

Options

Playback Options

  • Volume - Startup volume level (0-100). Default is 100.

    • 0 = Silence (muted)
    • 100 = Normal volume
    • Values below 0 are treated as 0
    • Values above 100 are treated as 100
  • Seek (Time Duration) - Start position in the media file. Formats:

    • Seconds: 90 (90 seconds)
    • Time format: 00:01:30 (1 minute 30 seconds)
    • Default: Start from beginning
  • Play (Time Duration) - Duration to play from the start position. Formats:

    • Seconds: 60 (play 60 seconds)
    • Time format: 00:01:00 (play 1 minute)
    • Default: Play until end
  • Loop - Number of times to loop playback.

    • 0 = Loop forever
    • 1 = Play once (default)
    • N = Play N times

Window Options

  • Window Title - Custom title for the player window. Default is the input filename.

  • Window X - X position for the left edge of the window in pixels. Default is centered on screen.

  • Window Y - Y position for the top edge of the window in pixels. Default is centered on screen.

  • Forced Width - Force the displayed width in pixels. Overrides the video's natural width.

  • Forced Height - Force the displayed height in pixels. Overrides the video's natural height.

  • Fullscreen - Boolean flag to start in fullscreen mode. Default is false.

  • No Window Border - Boolean flag to display window without borders. Default is false.

Stream Options

  • Disable Video - Boolean flag to disable video display (audio only). Default is false.

  • Disable Audio - Boolean flag to disable audio playback (video only). Default is false.

  • Disable Subtitles - Boolean flag to disable subtitle display. Default is false.

Advanced Options

  • Custom Options - Array of custom FFplay command-line options for advanced control.

Output

This node does not produce any output variables. It displays the media file in a player window.

How It Works

The Play node launches FFplay to display media files. When executed, the node:

  1. Validates that the file path is provided
  2. Checks that the file exists and is not a directory
  3. Constructs FFplay command with specified options
  4. Launches FFplay to play the media
  5. Blocks until playback is complete or window is closed
  6. Returns when playback finishes

Note: The flow execution pauses while the media is playing. The node completes when the player window is closed.

Example Usage

Basic Playback

Play a video file with default settings:

{
"File Path": "/path/to/video.mp4"
}

Play Specific Segment

Play 30 seconds starting from 1 minute:

{
"File Path": "/path/to/video.mp4",
"Seek (Time Duration)": "00:01:00",
"Play (Time Duration)": "30"
}

Silent Playback

Play video without audio:

{
"File Path": "/path/to/video.mp4",
"Disable Audio": true
}

Audio Only Playback

Play audio without displaying video window:

{
"File Path": "/path/to/audio.mp3",
"Disable Video": true
}

Loop Video

Play video in a continuous loop:

{
"File Path": "/path/to/video.mp4",
"Loop": "0" // Loop forever
}

Custom Window Position and Size

Display video at specific position with custom size:

{
"File Path": "/path/to/video.mp4",
"Window X": "100",
"Window Y": "100",
"Forced Width": "1280",
"Forced Height": "720",
"Window Title": "Preview - My Video"
}

Fullscreen Playback

Play video in fullscreen mode:

{
"File Path": "/path/to/video.mp4",
"Fullscreen": true
}

Low Volume Playback

Play at 50% volume:

{
"File Path": "/path/to/video.mp4",
"Volume": 50
}

Practical RPA Scenarios

Scenario 1: Preview Before Processing

Verify input file before starting intensive processing:

[User selects file] →
[Play file for preview] →
[User confirms] →
[Start FFmpeg processing]

Scenario 2: Verify Processing Result

Check the output after conversion:

[FFmpeg: Create → Input → Output → Run] →
[Play output file] →
[Quality check passed?]
Yes: [Archive original]
No: [Adjust settings and reprocess]

Scenario 3: Quick Audio Check

Verify audio track was extracted correctly:

[Extract audio with FFmpeg] →
[Play audio file (Disable Video = true)] →
[Confirm audio quality]

Scenario 4: Compare Before/After

Show original and processed video for comparison:

[Play original file] →
[Close player] →
[Play processed file] →
[User decides which to keep]

Scenario 5: Development Testing

During workflow development, test intermediate results:

[Create test file] →
[Apply filter] →
[Save temporary output] →
[Play temporary file] →
[Verify filter worked correctly] →
[Continue or adjust]

Scenario 6: Automated Quality Check

Play specific segments for manual quality verification:

// Play first 10 seconds
[Play: Seek=0, Duration=10] →
[Wait for user feedback] →

// Play middle 10 seconds
[Play: Seek=60, Duration=10] →
[Wait for user feedback] →

// Play last 10 seconds
[Calculate end position] →
[Play: Seek=(total-10), Duration=10]

Time Format Reference

The Seek and Play options accept FFmpeg time duration formats:

Supported Formats

FormatExampleDescription
Seconds9090 seconds
SS4545 seconds
MM:SS01:301 minute 30 seconds
HH:MM:SS00:01:301 minute 30 seconds
HH:MM:SS.mmm00:01:30.500With milliseconds

Examples

// Seek to different positions
"Seek": "30" // 30 seconds
"Seek": "01:30" // 1 minute 30 seconds
"Seek": "00:05:45" // 5 minutes 45 seconds
"Seek": "01:23:45.500" // 1 hour 23 min 45.5 sec

// Play for different durations
"Play": "60" // 60 seconds
"Play": "02:00" // 2 minutes
"Play": "00:10:00" // 10 minutes

Playback Controls

When the player window is open, FFplay provides keyboard controls:

KeyAction
Space / PPause/Resume playback
Q / ESCQuit player
FToggle fullscreen
Arrow Up/DownIncrease/decrease volume
Arrow Left/RightSeek backward/forward 10 seconds
Page Up/DownSeek backward/forward 10 minutes
Mouse ClickSeek to percentage in file
SStep to next frame (when paused)
MMute/Unmute audio
0-9Seek to 0%-90% of file

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
  • "X must be a number" - Window X position is not a valid number
  • "Y must be a number" - Window Y position is not a valid number
  • "Width must be a number" - Forced Width is not a valid number
  • "Height must be a number" - Forced Height is not a valid number
  • "Loop must be a number" - Loop value is not a valid number
  • "Failed to play the video" - FFplay execution failed

Usage Notes

  • Play is independent - it doesn't require Create node or session ID
  • Execution blocks until the player window is closed
  • Works only with local files
  • Player window must be closed manually (or via automation)
  • On headless systems (no display), this node will fail
  • Large files may take a moment to start playing
  • Not recommended for production automation (use for development/testing)
  • Some formats may not play depending on codecs available

Performance Considerations

  • Playing high-resolution videos requires adequate CPU/GPU resources
  • Seeking in large files may take a moment
  • Network-mounted files may have delayed loading
  • Multiple simultaneous play instances can strain system resources

Platform-Specific Notes

Windows

  • Player window integrates normally with Windows desktop
  • All features fully supported

Linux

  • Requires X11 or Wayland display server
  • May require additional audio libraries (ALSA, PulseAudio)
  • On headless servers, playback will fail

macOS

  • Player window integrates with macOS desktop
  • All features fully supported

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: "Failed to play the video"

Cause: Unsupported format, missing codecs, or display issues. Solution: Verify file format is supported, check FFmpeg/FFplay installation, ensure display is available.

Error: Display not available (Linux)

Cause: Running on a system without a display server. Solution: Use Probe instead of Play for validation on headless systems, or configure virtual display (Xvfb).

Player doesn't respond

Cause: Player is waiting for user input or has frozen. Solution: Close the player window to continue flow execution.

Best Practices

  1. Use for Development Only: Play is ideal for testing and development, not production workflows
  2. Validate with Probe: Use Probe for automated validation in production instead of Play
  3. Handle User Interaction: Consider that Play requires user to close the window
  4. Short Previews: Use Seek and Play options to show short previews instead of entire files
  5. Check Display Availability: Verify display is available before using Play in automated environments
  6. Provide Context: Use Window Title to indicate what's being previewed
  7. Consider Alternatives: For automated verification, process validation, or headless environments, use Probe instead

Development Use Cases

Play is particularly useful during workflow development:

Test Filter Results

[Create] → [Input] → [Filter (scale)] → [Output (temp.mp4)] → [Run] → [Play temp.mp4]
// Visually verify filter worked correctly

Compare Encoding Settings

// Test CRF 23
[Create] → [Input] → [Output (crf23.mp4, options=["crf=23"])] → [Run] → [Play]

// Test CRF 18
[Create] → [Input] → [Output (crf18.mp4, options=["crf=18"])] → [Run] → [Play]

// Compare quality vs. file size

Verify Concatenation

[Create] →
[Input clip1] → [Input clip2] → [Input clip3] →
[Filter concat] → [Output] → [Run]
→ [Play output]
// Verify clips joined correctly

Alternatives for Production

For production workflows, consider these alternatives to Play:

  • Probe - Validate file properties programmatically
  • Filter (thumbnail) - Generate thumbnail images for visual verification
  • External Tools - Use dedicated video analysis tools
  • Web Preview - Convert to web format and preview in browser
  • Automated Checks - Verify duration, resolution, codec programmatically
  • Probe - Analyze media files without playback (production-friendly alternative)
  • Input - Play can preview files before adding to FFmpeg pipeline
  • Run - Play can verify output after FFmpeg processing
  • File System - Check file existence before playing

Additional Resources

For more information about FFplay capabilities: