Skip to content

Ray Video Pipeline : Video Reader #775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: ray-api
Choose a base branch
from
Open

Conversation

suiyoubi
Copy link

@suiyoubi suiyoubi commented Jul 9, 2025

Description

Add the initial stage for video pipeline:

  • It reads from a local folder and grab all the videos from it
  • Reads meta data of the video
    Also provide with the associated Unit Test

Usage

python ray_curator/examples/video/video_read_example.py --video-folder PATH/TO/VIDEO/FOLDER

Checklist

  • I am familiar with the Contributing Guide.
  • New or Existing tests cover these changes.
  • The documentation is up to date with these changes.

Copy link

copy-pr-bot bot commented Jul 9, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@suiyoubi suiyoubi changed the title Aot/ray video reader Ray Video Pipeline : Video Reader Jul 9, 2025
@suiyoubi suiyoubi requested a review from abhinavg4 July 9, 2025 14:43
Copy link
Contributor

@abhinavg4 abhinavg4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we majorly need to split this into 2 stages:

  1. Get file list from local/s3. (potentially decides which files are already processed, or it can be a seperate stage, preferred)
  2. Download that file and decode it (This stage is generally very intensive and where xenna shines, We will use nvencs and nvdecs for this later)

data: Video = field(default_factory=Video)

@property
def fraction(self) -> float:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these functions? Can't we just do

task.data.fraction... wherever required?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could, this is just to ease the layer of abstraction.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait all this is wrong. I think it should be self.data.fraction and not self.video.fraction ?

suiyoubi added 6 commits July 14, 2025 07:02
…adStage to accept VideoTask. Enhance video reading capabilities with new tests for VideoReaderStage.

Signed-off-by: Ao Tang <[email protected]>
…_read_example to include verbose argument.

Signed-off-by: Ao Tang <[email protected]>
- Introduced a new test package for tasks with an initial test suite for the video tasks module, including tests for the Clip, ClipStats, Video, VideoMetadata, and VideoTask classes.
- Implemented various test cases to validate initialization, property calculations, metadata extraction, and size calculations.

This enhances the testing coverage for video-related functionalities in the ray-curator project.

Signed-off-by: Ao Tang <[email protected]>
- Expanded the test suite for the video tasks module by adding new test cases for the Clip, ClipStats, Video, VideoMetadata, and VideoTask classes.
- Improved coverage for various functionalities including initialization, property calculations, and metadata extraction.

This update strengthens the reliability of video-related features in the ray-curator project.

Signed-off-by: Ao Tang <[email protected]>
@suiyoubi suiyoubi requested a review from abhinavg4 July 14, 2025 15:27
return "video_download"

def inputs(self) -> tuple[list[str], list[str]]:
return [], []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be

["data"], ["input_video"] ?

Copy link
Contributor

@abhinavg4 abhinavg4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments but overall looks good.

  1. Please address the comments
  2. Can you make a composite stage for Read and Download ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants