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

Accept file-like objects as input in all classes #2130

Open
sohang3112 opened this issue Mar 8, 2024 · 1 comment
Open

Accept file-like objects as input in all classes #2130

sohang3112 opened this issue Mar 8, 2024 · 1 comment
Labels
feature-request Request for a new feature or additional functionality. video Related to VideoClip and related classes, or handling of video in general.

Comments

@sohang3112
Copy link
Contributor

Allow classes like moviepy.editor.VideoFileClip to directly accept file handles and file-like objects alongside filenames. This eliminates the need for intermediate disk storage, reducing latency and enhancing efficiency. Also, in case of large videos, saving them to disk may not even be possible.

Some examples of file-like objects that could be passed (in addition to filenames and normal file handles):

  • io.BytesIO - useful when the video bytes are directly available in memory
  • while using requests library to download videos, requests.Response.raw is a file-like object
  • while using flask server, request.files["video"] is a file-like object that allows accessing user-uploaded files
@sohang3112 sohang3112 added the feature-request Request for a new feature or additional functionality. label Mar 8, 2024
@sohang3112 sohang3112 changed the title Accept file-like objects as input in all video & audio classes Accept file-like objects as input in all classes Mar 8, 2024
@keikoro keikoro added the video Related to VideoClip and related classes, or handling of video in general. label Mar 8, 2024
@xaviernogueira
Copy link

I second this as valuable, especially when working with cloud providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for a new feature or additional functionality. video Related to VideoClip and related classes, or handling of video in general.
Projects
None yet
Development

No branches or pull requests

3 participants