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
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 memoryrequests
library to download videos,requests.Response.raw
is a file-like objectflask
server,request.files["video"]
is a file-like object that allows accessing user-uploaded files