Skip to main content

Select Every Nth Image πŸŽ₯πŸ…₯πŸ…—πŸ…’

Video Helper Suite πŸŽ₯πŸ…₯πŸ…—πŸ…’/image
VHS_SelectEveryNthImage

Select Every Nth Image πŸŽ₯πŸ…₯πŸ…—πŸ…’<div style="font-size: 0.8em"><div id=VHS_shortdesc>Keep only 1 image for every interval</div></div><div style="font-size: 0.8em"><div vhs_title="Inputs" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">Inputs: <div vhs_title="images" style="display: flex; font-size: 1em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">images: The input image</div></div></div></div><div vhs_title="Outputs" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">Outputs: <div vhs_title="IMAGE" style="display: flex; font-size: 1em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">IMAGE: The output images</div></div><div vhs_title="count" style="display: flex; font-size: 1em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">count: The number of images in the input</div></div></div></div><div vhs_title="Widgets" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">Widgets: <div vhs_title="select_every_nth" style="display: flex; font-size: 1em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">select_every_nth: The interval from which one frame is kept. 1 means no frames are skipped.</div></div><div vhs_title="skip_first_images" style="display: flex; font-size: 1em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">skip_first_images: A number of frames which that is skipped from the start. This applies before select_every_nth. As a result, multiple copies of the node can each have a different skip_first_frames to divide the image into groups</div></div></div></div></div>

Example

JSON Example
{
  "class_type": "VHS_SelectEveryNthImage",
  "inputs": {
    "images": [
      "node_id",
      0
    ],
    "select_every_nth": 1,
    "skip_first_images": 0
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
imagesIMAGErequired--
select_every_nthINTrequiredmin: 1, max: 9.01e+15, step: 11
skip_first_imagesINTrequiredmin: 0, max: 9.01e+15, step: 10

Outputs

IndexNameTypeIs ListConnection Reference
0IMAGEIMAGENo["{node_id}", 0]
1countINTNo["{node_id}", 1]
How to connect to these outputs

To connect another node's input to an output from this node, use the connection reference format:

["node_id", output_index]

Where node_id is the ID of this VHS_SelectEveryNthImage node in your workflow, and output_index is the index from the table above.

Example

If this node has ID "5" in your workflow:

  • IMAGE (IMAGE): ["5", 0]
  • count (INT): ["5", 1]
Was this page helpful?