Video Data Loading
Load video data for curation using NeMo Curator.
How it Works
NeMo Curator loads videos with a composite stage that discovers files and extracts metadata:
VideoReader is a composite stage that is broken down into a
- Partitioning (list files) stage
- Local paths use
FilePartitioningStageto list files - Remote URLs (for example,
s3://,gcs://)- use
ClientPartitioningStagebacked byfsspec. - Optional
input_list_json_pathallows explicit file lists under a root prefix.
- use
- Reader stage (
VideoReaderStage)
- This stage downloads the bytes (local or via
FSPath) for each listed file - Calls
video.populate_metadata()to extract resolution, fps, duration, encoding format, and other fields.
You can set
video_limitto limit the number of files to be processed; useNonefor unlimited.verbose=Trueto log detailed per-video information.
Local and Cloud
Use VideoReader to load videos from local paths or remote URLs.
Example
Explicit File List (JSON)
For remote datasets, ClientPartitioningStage can use an explicit file list JSON. Each entry must be an absolute path under the specified root.
JSON Format
If any entry is outside the root, the stage raises an error.
Example
Supported File Types
The loader filters these video extensions by default:
.mp4.mov.avi.mkv.webm
Metadata on Load
After a successful read, the loader populates the following metadata fields for each video:
size(bytes)width,heightframeratenum_framesduration(seconds)video_codec,pixel_format,audio_codecbit_rate_k
With verbose=True, the loader logs size, resolution, fps, duration, weight, and bit rate for each processed video.