Zoey - 批量视频加载器:
BatchVideoLoader gathers matching paths from a folder and prepares them as an ordered batch for a video workflow. It searches the selected folder, combines matches from the requested file patterns, sorts the paths in natural order so numbered names such as clip2.mp4 come before clip10.mp4, and keeps only the first portion of that sorted list. This helps you work with a predictable selection of video files without choosing each one individually. The node collects paths; it does not open, decode, or process the videos.
Zoey - 批量视频加载器 Input Parameters:
directory
The folder the node searches. The default is D:/Videos/Input; no minimum, maximum, or other allowed-path restriction is specified in the interface. The node normalizes the path and checks that it exists as a directory before searching. If it does not, execution stops with an error. Point this to the folder containing the videos you want to collect; the search does not descend into its subfolders.
file_pattern
The filename patterns used to find items in the selected folder. The default is *.mp4;*.avi;*.mov. Separate multiple patterns with semicolons, as in the default, or use one pattern such as *.mp4 when you want only that extension. Spaces around each semicolon-separated pattern are removed. Matches from every pattern are combined before sorting and applying the limit. The interface specifies no minimum or maximum length and no fixed list of allowed patterns. If a pattern matches nothing, it contributes nothing to the batch; overlapping patterns can add the same path more than once.
limit
The maximum number of paths returned after all matches have been sorted. The default is 20, the interface minimum is 1, and no maximum is specified. For example, setting limit to 5 keeps the first five paths in natural-sort order. A smaller value gives downstream nodes a shorter batch to handle. The implementation also enforces a minimum of one when slicing the results, but it cannot produce a path when nothing matches.
refresh
An optional switch with a default of False. Its interface labels are 刷新 for on and 默认 for off. The supplied load_batch implementation does not use this value, so switching it does not change the folder search, sorting, or returned values shown in the source. No additional refresh behavior is established by the supplied code.
Zoey - 批量视频加载器 Output Parameters:
视频列表
A VIDEO_BATCH value containing a list of paths matched by the patterns, naturally sorted and shortened to the requested limit. Each entry is a path to a matched item, not decoded video frames or a processed video. The list can be empty when nothing matches. Because the implementation does not remove duplicates or verify that each match is a playable video, check your patterns if the batch contains repeated or unsuitable items.
源目录
A STRING containing the normalized directory path that the node searched. This identifies where the batch was collected, including when the video list is empty. It is the source folder path, not the path of an individual video or an output folder.
Zoey - 批量视频加载器 Usage Tips:
- Set
directoryto an existing folder containing the clips you need. Put clips directly in that folder if you expect this node to find them; it does not search subfolders. - Keep the default
file_patternto gather matching MP4, AVI, and MOV names, or narrow it to a pattern such as*.mp4when you need a more focused batch. - Name numbered clips consistently and use
limitto select the first part of the naturally sorted results. For example,clip2.mp4sorts beforeclip10.mp4. - Avoid overlapping patterns if you need each path only once. This node combines matches without deduplicating them.
- Do not rely on
refreshto alter the result: the supplied implementation accepts the switch but does not act on it.
Zoey - 批量视频加载器 Common Errors and Solutions:
目录不存在: <directory>
- Explanation: The specified path is not an existing directory after path normalization. The node stops before searching for files.
- Solution: Check the folder spelling and location, make sure the folder exists, and enter its path in
directory. Use a path accessible to the environment running the node.
No error message; 视频列表 is empty
- Explanation: The folder exists, but none of the supplied patterns matched an item in it. An empty or whitespace-only
file_patternalso produces no searches. This is an empty result, not an exception raised by the node. - Solution: Confirm that the files are directly inside
directoryand that their names matchfile_pattern. Try the default patterns or a single pattern appropriate for the filenames you see.
No loader error message; the same path appears more than once
- Explanation: Two or more patterns can match the same path. The node appends every match and does not remove duplicates.
- Solution: Make the patterns nonoverlapping, or use only the specific pattern you need.
No loader error message; a later node cannot open a returned item
- Explanation: BatchVideoLoader collects matching paths without checking whether each item is a playable video. A filename pattern may also match an unsuitable item.
- Solution: Inspect the source folder and narrow
file_patternto the intended video filenames. Remove or relocate unsuitable items before running the workflow again.
