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

[Video] Video Component to extract 1 frame every N seconds #1115

Closed
ShihChun-H opened this issue Sep 24, 2024 · 14 comments · Fixed by instill-ai/pipeline-backend#765
Closed
Assignees
Labels
component feature New feature or request good-first-issue Good for newcomers hacktoberfest hacktoberfest2024 Component improvement issues for Hacktoberfest 2024 help-wanted Help from the community is appreciated improvement Improvement on existing features instill core Label

Comments

@ShihChun-H
Copy link
Member

ShihChun-H commented Sep 24, 2024

Issue Description

Current State

  • The Video Component minimum FPS is 1 (integer)

Why We Want to Change?

  • For a use case like presentation in the video, I do not want to extract 1 frame every second but 1 frame every 10 seconds to save resources and reduce the number of images needed to feed into the next component.

Proposed Change

  • Change FPS to accept fractional inputs i.e. 60, 30, 1, 1/2, 1/4, 1/30…

Rules for the Component Hackathon

  • Each issue will only be assigned to one person/team at a time.
  • You can only work on one issue at a time.
  • To express interest in an issue, please comment on it and tag @kuroxx, allowing the Instill AI team to assign it to you.
  • Ensure you address all feedback and suggestions provided by the Instill AI team.
  • If no commits are made within five days, the issue may be reassigned to another contributor.
  • Join our Discord to engage in discussions and seek assistance in #hackathon channel. For technical queries, you can tag @chuang8511.

Component Contribution Guideline | Documentation | Official Go Tutorial

@ShihChun-H ShihChun-H added improvement Improvement on existing features need-triage Need to be investigated further feature New feature or request component hacktoberfest2024 Component improvement issues for Hacktoberfest 2024 labels Sep 24, 2024
@ShihChun-H ShihChun-H moved this to To be claimed in Hacktoberfest 2024 Sep 24, 2024
@ShihChun-H ShihChun-H added help-wanted Help from the community is appreciated instill core and removed need-triage Need to be investigated further labels Sep 24, 2024
@chuang8511 chuang8511 added the good-first-issue Good for newcomers label Sep 25, 2024
@samir-advantech
Copy link

I am interested in this issue @ShihChun-H

@ShihChun-H
Copy link
Member Author

@samir-advantech Awesome! Let me assign this issue to you. Please make sure to read and follow the rules above 🙌🏻

@ShihChun-H ShihChun-H moved this from To be claimed to In Progress in Hacktoberfest 2024 Sep 29, 2024
@ShihChun-H
Copy link
Member Author

Hi @samir-advantech, I'm following up to check on any progress made regarding this issue. Could you please provide an update? Thanks 🙏

@Reckadon
Copy link

Hi, @ShihChun-H ! If @samir-advantech is not available or working on this, can I work on this?

@kuroxx
Copy link
Contributor

kuroxx commented Oct 14, 2024

Hey @samir-advantech, since this issue has not been worked on for over >5 days, I will now assign this issue to @Reckadon 🙏 Thank you for your contribution attempt!

@kuroxx kuroxx assigned Reckadon and unassigned samir-advantech Oct 14, 2024
@Reckadon
Copy link

Reckadon commented Oct 14, 2024

hi @kuroxx, thanks for letting me contribute.
I have managed to setup the project but am facing error while building the instill-core. It is related to influxdb
dependency failed to start: container influxdb exited (1)

@kuroxx
Copy link
Contributor

kuroxx commented Oct 15, 2024

Hey @Reckadon, thanks for raising the issue!

I saw your message on Discord - hope it can be resolved after adjusting the Docker resources : https://www.instill.tech/docs/core/deployment#docker-resource-requirements

@Reckadon
Copy link

do we want to accept inputs like 10, 30, 1/5, 1/10 only or, are pure numbers fine? like- 10, 30, 0.2, 0.1, 0.5

accepting both numbers and fractional strings will require the type field in tasks.json to be any.

@chuang8511
Copy link
Contributor

do we want to accept inputs like 10, 30, 1/5, 1/10 only or, are pure numbers fine? like- 10, 30, 0.2, 0.1, 0.5

It seems good that we can support 1/5 or 0.2.

accepting both numbers and fractional strings will require the type field in tasks.json to be any.

Yes, please proceed this. Thanks for confirmation!

@Reckadon
Copy link

@chuang8511 but the main issue is can the type field be any, I think only specific types like number or string are supported

@chuang8511
Copy link
Contributor

Oh, I did not notice it.
Could you try to set it as string first?

@Reckadon
Copy link

Reckadon commented Oct 21, 2024

Setting it as string causes an error when u pass in a pure number like 10 from the frontend.
It's because the JSON parser treats it as a number and does not convert it to a number string (10 and not "10").
I think allowing only numbers (integers and floats) and not strings is the only feasible option for now.
Let me know if I can do something to change the behaviour of the Parser.

@Reckadon
Copy link

opened a PR to close this issue

@kuroxx
Copy link
Contributor

kuroxx commented Oct 22, 2024

@chuang8511 @donch1989 please review when you are free 🙏 thank you!

donch1989 pushed a commit to instill-ai/pipeline-backend that referenced this issue Oct 24, 2024
…ber, and added some debugging flags for ffmpeg (#765)

Because

- The Video Component minimum FPS is 1 (integer), For a use case like
presentation in the video, we do not want to extract 1 frame every
second but 1 frame every 10 seconds to save resources and reduce the
number of images needed to feed into the next component.
- Issue instill-ai/instill-core/issues/1115.

This commit

- Change FPS to accept real number inputs as well i.e. 60, 30, 1, 0.5,
0.2, 0.1 in both the tasks `TASK_SUBSAMPLE_VIDEO` and
`TASK_SUBSAMPLE_VIDEO_FRAMES`.
- Also implements a string parsing function which can handle fractional
inputs like 1/2 and 1/5 but is commented out - because the input `type`
can only be defined as one single type (`number` or `string` and not
both). The function can be used if this issue is resolved in the future.
@github-project-automation github-project-automation bot moved this from In Progress to Done in Hacktoberfest 2024 Oct 24, 2024
jvallesm pushed a commit to instill-ai/pipeline-backend that referenced this issue Oct 29, 2024
…ber, and added some debugging flags for ffmpeg (#765)

Because

- The Video Component minimum FPS is 1 (integer), For a use case like
presentation in the video, we do not want to extract 1 frame every
second but 1 frame every 10 seconds to save resources and reduce the
number of images needed to feed into the next component.
- Issue instill-ai/instill-core/issues/1115.

This commit

- Change FPS to accept real number inputs as well i.e. 60, 30, 1, 0.5,
0.2, 0.1 in both the tasks `TASK_SUBSAMPLE_VIDEO` and
`TASK_SUBSAMPLE_VIDEO_FRAMES`.
- Also implements a string parsing function which can handle fractional
inputs like 1/2 and 1/5 but is commented out - because the input `type`
can only be defined as one single type (`number` or `string` and not
both). The function can be used if this issue is resolved in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component feature New feature or request good-first-issue Good for newcomers hacktoberfest hacktoberfest2024 Component improvement issues for Hacktoberfest 2024 help-wanted Help from the community is appreciated improvement Improvement on existing features instill core Label
Projects
Status: Done
6 participants