Houdini 18.0 Nodes TOP nodes

FFmpeg Extract Images TOP node

Extracts a sequence of still images from a video file.

On this page


The opposite operation (compile frame images into a video) is in the FFmpeg encode video node.

You can use this node two ways:

  • With no inputs, specify a video file to extract images from.

  • If the node has incoming work items with outputs representing video files, the node will extract for each incoming work item. Set the Video parameter to &96;@pdg_input&96; to use each incoming item’s output result file as the input for the frame extraction.

This node generates one work item to extract all images for each input video. (It does not generate separate work items for each frame.) The output of the work item is an array of output file names. If you want to wire the output to nodes that expect separate work items per file, use the Work Item Expand node to split out the output files in the work item(s).


This node is a wrapper around the ffmpeg command line tool. You must have FFmpeg installed on each machine for this node to work.

  • You can specify an explicit path to the executable using the node’s

  • If the FFmpeg path parameter is blank, the node looks for the environment variable PDG_FFMPEG, which if defined should contain a path to the executable.

  • If the PDG_FFMPEG variable is not defined, the node will assume the executable is in the system path.

TOP Attributes



Indicates the ffmpeg operation ("extract").



File path to the video to extract from.



Whether the user specified a custom ffmpeg executable path. If this is 1, the work script should use the executable path in the ffmpegbin attribute.



The path to the ffmpeg executable, if overridebin is 1.



The number of frames to extract per second of video.



If this is 1, output the images at a custom size specified by imgwidth and imgheight



The width of the output images, if specifyimagesize is 1.



The height of the output images, if specifyimagesize is 1.



A pattern string (using FFmpeg-specific % formatting syntax) specifying how to generate the output filenames. Note: The actual output file names will be in the @pdg_output attribute as an array of file paths.



When this is 1, the work script will run the custom command line in expr.



A custom command line to run, when customcommand is 1.



TThe file tag to put on the result file paths.




File path of the video file to extract frames from.

Frames Per Second

How many times a second to sample the video to generate an output image. Higher numbers generate more frame images.


When the checkbox next to width/height is on, this specifies a custom width for the output images. Otherwise the node uses the video’s native size.


When the checkbox next to width/height is on, this specifies a custom height for the output images. Otherwise the node uses the video’s native size.

Image Output Pattern

The string to use to generate output image file paths. This can include @expressions (inside backticks because it’s a string parameter), and it must include exactly one FFmpeg-specific %d marker for where to put the frame number. You can pad the frame number with leading zeros, for example %04d to pad the frame number to 4 digits. You can use the drop-down menu at the end of the textbox to choose between different preset patterns.

Output File Tag

FFmpeg Command

Turn this on to customize the command line passed to ffmpeg.

FFmpeg Path

Turn this on to set an explicit path to the ffmpeg executable. If this is off, the node will look for a PDG_FFMPEG environment variable. If the variable is not set, the node will simply assume the executable is on the system path.


Work Item Generation

Whether this node generates static or dynamic work items. You should generally leave this set to "Automatic" unless you know the node’s work items can be computed statically, or that they need to be generated dynamically.


This node always creates dynamic work items: it waits until the upstream work items are known, and generates new work items from the upstream work items.


This node always creates static work items: it creates the number of work items it thinks it needs based on the parameters (and any upstream static items) before the network runs.


If the input is static (a static processor, or a partitioner with only static inputs, or a mapper), this node generates static work items, otherwise it generates dynamic work items.


TOP Scheduler Override

This parameter overrides the TOP scheduler for this node.

Work Item Priority

This parameter determines how the current scheduler prioritizes the work items in this node.

Inherit From Upstream Item

The work items inherit their priority from their parent items. If a work item has no parent, its priority is set to 0.

Custom Expression

The work item priority is set to the value of Priority Expression.

Node Defines Priority

The work item priority is set based on the node’s own internal priority calculations.

This option is only available on the Python Processor TOP, ROP Fetch TOP, and ROP Output TOP nodes. These nodes define their own prioritization schemes that are implemented in their node logic.

Priority Expression

This parameter is only available when Work Item Priority is set to Custom Expression.

This parameter specifies an expression for work item priority. The expression is evaluated for each work item in the node.


example_top_ffmpegextractimages Example for FFmpeg Extract Images TOP node

This example demonstrates how to use FFmpeg Extract Images node to extract images from a video file.

See also

TOP nodes