Houdini 20.5 Nodes TOP nodes

FFmpeg Extract Images TOP node

Extracts a sequence of still images from a video file.

On this page
Since 17.5

Note

For information about the opposite operation of compiling frame images into a video, see the FFmpeg Encode Video node documentation.

Overview

You can use this node in two ways:

  • If the node has no inputs, you can specify a video file from which to extract images.

  • If the node has incoming work items with a video file output, you can extract frames for each incoming work item.

    This node generates one work item to extract all images from the 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).

Installation

This node is a wrapper around the ffmpeg command line tool. By default, it uses the version of FFmpeg that ships with Houdini as `$HFS/bin/hffmpeg. You can also install your own version of FFmpeg and use that instead.

For the node to find a custom installation of the FFmpeg command line tool, the path to the tool’s executable binary must be available via one of the following methods:

  • The system path.

  • Specified in an environment variable PDG_FFMPEG.

  • Specified directly in the node by the FFmpeg Binary Path parameter.

Tip

The $HH/help/files/pdg_examples/top_multishot and $HH/help/files/pdg_examples/top_rop examples show how you can use this node to create a movie from rendered images.

TOP Attributes

height

integer

The height of the outputted images.

width

integer

The width of the outputted images.

fps

float

The frames per second.

Parameters

Node

Generate When

Determines when this node will generate work items. You should generally leave this set to “Automatic” unless you know the node requires a specific generation mode, or that the work items need to be generated dynamically.

All Upstream Items are Generated

This node will generate work items once all of the input nodes have generated their work items.

All Upstream Items are Cooked

This node will generate work items once all of the input nodes have cooked their work items.

Each Upstream Item is Cooked

This node will generate work items each time a work item in an input node is cooked.

Automatic

The generation mode is selected based on the generation mode of the input nodes. If any of the input nodes are generating work items when their inputs cook, this node will be set to Each Upstream Item is Cooked. Otherwise, it will be set to All Upstream Items are Generated.

Cook Type

Determines how work items in the node should cook, e.g. if they should run in process, out of process, or using services.

Run on Service Block

Determines whether or not work items in this node should run on the parent service block, if one exists.

Always

Always run work items on the block’s service, regardless of any other service settings on this node.

Match

Only run work items on the block’s service if Service Name matches the service name that’s used by the block.

Never

Never run work items on the block’s service.

Service Name

When Cook Type is set to the Service, this parameter is used to specify the name of the service. For more information on using services, see the PDG Service Manager documentation.

Source

Input Source

Specifies the input source.

Upstream Output File

Sets the input as the first output file from the upstream work item with the tag specified by the File Tag parameter.

Custom File Path

Sets the input as the video specified by the File Path parameter.

File Tag

Specifies the file tag of the input source.

File Path

Specifies the file path of the input source.

Controls

Frames per Second

Sets the number of images to extract per second.

Output File Pattern

Specifies the output pattern of the extracted images.

File Tag

Specifies the file tag of the outputted images.

Options

Width

When on, specifies the width of the output images.

Height

When on, specifies the height of the output images.

FFmpeg

FFmpeg Binary

Specifies how FFmpeg is called.

System Path

Calls FFmpeg from the system path (if available).

$PDG_FFMPEG

Calls FFmpeg using the path stored in the PDG_FFMPEG environment variable. This environment variable must be user-created.

Custom Path

Calls the FFmpeg binary using the path specified by the FFmpeg Binary Path parameter.

Houdini FFmpeg

Uses the copy of FFmpeg that ships with Houdini, i.e. $HFS/bin/hffmpeg.

FFmpeg Binary Path

Specifies the path to the FFmpeg binary.

This parameter is only available when FFmpeg Binary is set to Custom Path.

FFmpeg Command

When on, specifies the FFmpeg command that is called when the work item cooks. You can modify this command, but it will not automatically update if the other parameters change.

Schedulers

TOP Scheduler Override

This parameter overrides the TOP scheduler for this node.

Schedule When

When enabled, this parameter can be used to specify an expression that determines which work items from the node should be scheduled. If the expression returns zero for a given work item, that work item will immediately be marked as cooked instead of being queued with a scheduler. If the expression returns a non-zero value, the work item is scheduled normally.

Add Job Parms

Opens the Edit Parameter Interface window for the purpose of adding scheduler parameters to the node’s interface.

In-Process Scheduler

The Edit Parameter Interface window opens with the In-Process Scheduler’s parameter folder selected in the Create Parameters column.

Local Scheduler

The Edit Parameter Interface window opens with the Local Scheduler’s parameter folder selected in the Create Parameters column.

HQueue Scheduler

The Edit Parameter Interface window opens with the HQueue Scheduler’s parameter folder selected in the Create Parameters column.

Work Item Label

Determines how the node should label its work items. This parameter allows you to assign non-unique label strings to your work items which are then used to identify the work items in the attribute panel, task bar, and scheduler job names.

Use Default Label

The work items in this node will use the default label from the TOP network, or have no label if the default is unset.

Inherit From Upstream Item

The work items inherit their labels from their parent work items.

Custom Expression

The work item label is set to the Label Expression custom expression which is evaluated for each item.

Node Defines Label

The work item label is defined in the node’s internal logic.

Label Expression

When on, this parameter specifies a custom label for work items created by this node. The parameter can be an expression that includes references to work item attributes or built-in properties. For example, $OS: @pdg_frame will set the label of each work item based on its frame value.

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 specifies an expression for work item priority. The expression is evaluated for each work item in the node.

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

Examples

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