Skip to content
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

Feature to loop extracted video to make up required lenght #91

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

adradr
Copy link

@adradr adradr commented Aug 13, 2023

✨ feat(handle_videos.py): add loop_video_until_target_length function and improve extract_random_clip_from_video function

A new function called loop_video_until_target_length is added, which loops the video by concatenating it with itself until it reaches the target length. The extract_random_clip_from_video function is also improved to handle cases where the video duration is too short by doubling its length until it meets the minimum requirement.

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. πŸ‘€πŸ”§

Types of changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply πŸ˜„πŸš€

  • Bugfix (non-breaking change which fixes an issue) πŸ›
  • New feature (non-breaking change which adds functionality) ✨
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) πŸ’₯
  • Documentation Update (if none of the other choices apply) πŸ“–

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. βœ…

  • I have read the CONTRIBUTING.md πŸ“š
  • I have added tests that prove my fix is effective or that my feature works βœ…βœ”οΈ
  • I have added necessary documentation (if appropriate) πŸ“

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... πŸ’‘β“

References and related issues (e.g. #1234)

N/A πŸ“Œ

✨ feat(handle_videos.py): add loop_video_until_target_length function and improve extract_random_clip_from_video function

The changes in this commit fix the indentation in the handle_videos.py file and add missing imports. Additionally, a new function called loop_video_until_target_length is added, which loops the video by concatenating it with itself until it reaches the target length. The extract_random_clip_from_video function is also improved to handle cases where the video duration is too short by doubling its length until it meets the minimum requirement.
@vercel
Copy link

vercel bot commented Aug 13, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
short-gpt-dcs ⬜️ Ignored (Inspect) Visit Preview Aug 13, 2023 10:28pm

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.

None yet

2 participants