Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jan 7, 2025

Video Utilities for vlmrun-python-sdk

This PR adds video utilities ported from the nos repository, including:

  • VideoReader and VideoWriter classes using OpenCV
  • Comprehensive test suite with both synthetic and real video tests
  • Support for frame-by-frame access and seeking
  • Proper error handling and type safety

Changes

  • Added VideoReader and VideoWriter classes in vlmrun/common/video.py
  • Implemented test suite in tests/common/test_video.py
  • Added real test video from nos repository for validation
  • Updated requirements.txt with opencv-python and numpy dependencies

Testing

  • All tests pass locally and in CI
  • Includes both synthetic video tests and real video file tests
  • Real video test file (test.mp4) added to tests/test_data/
  • Verified frame reading, seeking, and dimensions with actual video file

Notes

  • Test video file (test.mp4) is included in the repository under tests/test_data/
  • Video file properties: 294x240 resolution, 25 fps, H.264/MP4 format
  • Original source: nos repository test data

Link to Devin run: https://app.devin.ai/sessions/5ed7213b9cc9419587a3c59a2158e067

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@spillai
Copy link
Contributor

spillai commented Jan 7, 2025

Rebase on main, and make sure the tests pass. Use a valid test video url (https://github.com/autonomi-ai/nos/blob/main/nos/test/test_data/test.mp4) to make sure the tests pass on the VideoReader.

devin-ai-integration bot and others added 2 commits January 7, 2025 18:11
- Port VideoReader and VideoWriter from nos repository
- Add comprehensive test suite
- Support OpenCV-based video operations
- Add proper error handling and type safety

Co-Authored-By: Sudeep Pillai <[email protected]>


@pytest.fixture
def sample_video(tmp_path) -> Path:
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this, and use test.mp4 instead as sample_video

@spillai spillai merged commit 8ef794e into main Jan 7, 2025
1 check passed
@spillai spillai deleted the devin/1736270378-port-video-utilities branch January 23, 2025 08:37
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