-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Storing Processed Video clip takes a long time #726
Comments
How long is the video? What is the difference in writing times between before you’ve edited it, and after? Also, you shouldn’t need to pass |
the video is 30 seconds with 900 frames, it takes almost 1.5 minutes to write, before processing it takes around 40 seconds to write |
What is the image resolution ? For HD video, rotating 1 frame can take some time, so if you have 30 frames per second it will be slow. What do you use to rotate the video ? Maybe there exist faster options. |
the whole processing is done separately, and takes 3 seconds per video, the above numbers are for just saving the result of the video with or without rotation process (3 seconds) |
Can you paste the exact code you are using ? |
|
if I save clip.write_video , it is super fast, but clip_realiz.write_video is slow |
I think the results you are getting are pretty typical. I may be wrong, but I don’t think moviepy does much processing in your |
It's clearer now, and I think your problem is wrong assumptions on what is going on in the script. When you apply |
oh, i see, thank you for that, |
Not sure about your first question, but you should be able to use |
is there a way to replace all the frames inside a clip with a numpy array? |
I am closing this thread as it is not a moviepy bug/feature request anymore. To answer your first question, yes you could with the unfortunately undocumented ImagesSequenceClip But beware that all these numpy arrays in memory are going to take a lot of RAM ! Another option is to convert your clip to a sequence of images on your disk using "clip.write_images_sequence", then load these images using ImageSequenceClip (which in this case will only load the images as they are needed). |
Thank you for the replies and solution provided. I really appreciate you guys efforts in building such a nice package. |
I have used moviepy to load and process a video. during processing the fps and total number of frames dont change, but each frame is rotated with 10 degrees, the outer area of frame are set as black.
when I want to store the videos, it takes a very long time (4 times the video time) using the the following command,
clip.write_videofile(outpath, fps=clip.fps, codec = 'mpeg4', audio=True, threads=8)
The text was updated successfully, but these errors were encountered: