Skip to content

Small improvements for video loading #9183

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

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Small improvements for video loading #9183

merged 2 commits into from
Aug 16, 2024

Conversation

DN6
Copy link
Collaborator

@DN6 DN6 commented Aug 15, 2024

What does this PR do?

Noticed that our load_video util cannot handle URLs with query parameters, and could use some small improvements.

This PR

  • Updates to parse the URL in a more robust way.
  • Adds a check to raise an error if we get a non-200 response code.
  • Iterates over the raw video in chunks and write to file to avoid loading large videos into memory.

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@DN6 DN6 requested a review from a-r-r-o-w August 15, 2024 05:01
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

LGTM, and more correct!

@DN6 DN6 merged commit 3e46043 into main Aug 16, 2024
18 checks passed
sayakpaul pushed a commit that referenced this pull request Dec 23, 2024
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.

3 participants