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

Moviepy Roadmap - version 2.0 #1089

Open
3 of 7 tasks
tburrows13 opened this issue Feb 22, 2020 · 33 comments
Open
3 of 7 tasks

Moviepy Roadmap - version 2.0 #1089

tburrows13 opened this issue Feb 22, 2020 · 33 comments
Labels
design-decisions Discussion of ideas, suggestions, questions relevant to (re)design decision-making process. enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. project-admin Anything to do with the administration & organisation of moviepy. I.e. project "meta". python-version Compatibility issues, behaviour changes,... between different Python versions.

Comments

@tburrows13
Copy link
Collaborator

tburrows13 commented Feb 22, 2020

I’d like to propose an upcoming v2.0 which would allow us the opportunity to make a few small breaking changes, and remove some of the previously deprecated features.

Here’s some of the things that I’d like to include:

There are other things that need to be done, that, whilst they could be released at any time, would be good to include as part of a larger package

  • Implement basic data model #1076 implements support for built-in Python operators
  • I'm working on improving the install/test/build/release system
  • Updated/checked examples would be great
  • Generally the documentation is lacking in some areas; at a minimum it should state every parameter that a function accepts
  • Any other small features (Add support for path-like objects #924...)

Since there's a lot of changes here, I'd propose merging them into a v2 branch first, before finally merging that into master when we're ready to release.

Anything else that you can think of, agree/disagree with, let's discuss either here or on gitter!

@tburrows13 tburrows13 added project-admin Anything to do with the administration & organisation of moviepy. I.e. project "meta". suggestion labels Feb 22, 2020
@tburrows13 tburrows13 added this to the Release v2.0.0 milestone Feb 23, 2020
@tburrows13 tburrows13 pinned this issue Feb 24, 2020
@misland
Copy link

misland commented Mar 7, 2020

hi,do you hava a plan for this package to make it support GPU?

@tburrows13
Copy link
Collaborator Author

@misland Thanks for the suggestion, I'll add it to the list. There's clearly interest (#790, #923), and it looks like it would be just a case of configuring FFmpeg settings.

@misland
Copy link

misland commented Mar 11, 2020

@tburrows13 thanks for your reply,I also checked #790 and I will test ffmpeg which compiled with gpu library later,I will post the result when I finish testing.

@misland
Copy link

misland commented Mar 19, 2020

@tburrows13 hi,I modify the ffmpeg_reader.py as follows:

image
I execute one python script to process mp4 video,then I do see two processors by nvidia-smi,as follows:
image
it seems to worked,but the cpu cost didn't go down at all,so I don't think gpu acceleration take effect,hope it helps to you :(

@tburrows13
Copy link
Collaborator Author

@misland, thanks for investigating. I'll have a look at some point to see if it would be benificial, but it doesn't seem to require much extra code on our part, so it will probably end up being an option for end users to use if they want to.

@tburrows13
Copy link
Collaborator Author

I don't think that having v2 as a separate branch is really working, so I'll release v1.0.2 today, and then merge master into v2, then v2 back into master, so that new contributions will automatically be based off the v2 code.

@tburrows13
Copy link
Collaborator Author

I don't think that having v2 as a separate branch is really working, so I'll release v1.0.2 today, and then merge master into v2, then v2 back into master, so that new contributions will automatically be based off the v2 code.

Now done, so all v2 code is in the current master branch.

@mgaitan
Copy link
Collaborator

mgaitan commented Mar 29, 2020

Oh, didn't see these last comment. I've been opening the prs against v2 :-)

@tburrows13
Copy link
Collaborator Author

Ok, I'll delete v2 now as it doesn't seem to have any purpose.

@ryanfox ryanfox unpinned this issue Apr 29, 2020
@tburrows13 tburrows13 pinned this issue Apr 29, 2020
@tburrows13
Copy link
Collaborator Author

tburrows13 commented Jun 3, 2020

I thought that it would be a good idea to post my current thoughts regarding the v2.0 release (for my own sake as much as anything else!). There are a few outstanding major PRs that are still awaiting merges and there are a few more things that don't yet have a PR that I am still planning to do.

Current PRs:

Other:

Documentation:

  • Comb through every docstring to ensure that all parameters are explained and formatting is consistent
  • Create an improved 'Getting Started' tutorial
  • Ensure that the examples are all functional and useful. Add more examples
  • Move documentation to readthedocs.org. This allows it to be automatically built whenever an update is posted, and they can store different versions of the documentation for different git tagged versions.

I'm very happy to discuss any of these plans before actually implementing them!

@mike592
Copy link

mike592 commented Jun 21, 2020

gpu

do you mean GPU don't help to make moviepy do rendering jobs faster at all?

@averypfeiffer
Copy link

I thought that it would be a good idea to post my current thoughts regarding the v2.0 release (for my own sake as much as anything else!). There are a few outstanding major PRs that are still awaiting merges and there are a few more things that don't yet have a PR that I am still planning to do.

Current PRs:

Other:

Documentation:

  • Comb through every docstring to ensure that all parameters are explained and formatting is consistent
  • Create an improved 'Getting Started' tutorial
  • Ensure that the examples are all functional and useful. Add more examples
  • Move documentation to readthedocs.org. This allows it to be automatically built whenever an update is posted, and they can store different versions of the documentation for different git tagged versions.

I'm very happy to discuss any of these plans before actually implementing them!

Love to see this project moving forward. I don't see GPU acceleration in the progress update above, is this still on your radar? Would be incredibly useful in a lot of use-cases. I don't mind volunteering some time to help solve the GPU issue.

@tburrows13
Copy link
Collaborator Author

tburrows13 commented Sep 2, 2020

Hello, thanks for your interest! Here's where I'm up to:

I'll have some time over the next 4-5 weeks to work on moviepy and hopefully I'll be able to push v2.0 at the end of that.
My 5 priorities are:


As well as those 'big' items, I am planning to rework the documentation. The examples and tutorials are very outdated and lots of parameters are poorly documented or not mentioned at all. In addition, I'd like to move the docs to readthedocs.io, because they automatically update the docs on every push and they add a dropdown which allows the user to switch between docs for different versions. This allows future documentation improvements to take effect in realtime.

When all of the above is done, I'd like to release it as 2.0.0. At various stages throughout it I'll probably release more dev releases (we already have v2.0.0.dev1).


Here's where anyone/everyone else comes in :)
The v2.0.0 milestone has a list of issues and PRs that I've previously thought would be good to be in v2.0. If you're wanting something to do, that would be a good place to start! I'm not expecting all of them to actually be done by v2.0 by any means.

You mentioned GPU acceleration: there have been a lot of requests for either that or multi-threading, because moviepy is quite slow! They would be great features to have, however I expect that they'd be quite complicated but also quite backwards-compatible so I see them as something that I'd probably work on for 2.1. However, if anyone else would like to do them and they are ready in time for 2.0, I'd happily add them in. #698 has a proof of concept for multi-threading.

If you do decide to work on GPU/multi-threading, let me know what you are working on and I may be able to help :)

@keikoro
Copy link
Collaborator

keikoro commented Oct 2, 2020

A looong, long time ago, I updated and fixed parts of the docs, but the changes were ultimately rejected because I combined code + doc fixes. I'll try to dig them up to see if it would make sense to reuse them (or parts of them).

@keikoro keikoro added enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. python-version Compatibility issues, behaviour changes,... between different Python versions. and removed suggestion labels Oct 6, 2020
@keikoro
Copy link
Collaborator

keikoro commented Oct 7, 2020

Ok, I checked, and it looks like the changes I suggested back then were in fact merged in. (They just aren't labelled as mine because they happened within a PR.)

@keikoro keikoro added the design-decisions Discussion of ideas, suggestions, questions relevant to (re)design decision-making process. label Oct 13, 2020
@dheerajmpai
Copy link

I guess GPU support is one of the key feature with popular demand. It is preferred this is added in the settings file itself

@hpp0hpp
Copy link

hpp0hpp commented Nov 14, 2020

I would ask again for the GPU supporting for write_videofile, I see lots of demanding for this. Thank you

@cryzed
Copy link

cryzed commented Nov 27, 2020

I suppose this is somewhat of a niche request, but since we are suggesting bigger changes we might want to see in 2.0, could I suggest changing the ffmpeg instance handling? For every VideoClipFile instance, I think one or two ffmpeg instances are spawned and running in the background while the videos aren't close()d. Now I recently wanted to combine several hundred videos into one and quickly ran into issues due to the hundreds of running ffmpeg instances. I had to write special handling that would create certain parts of the final video one at a time, taking care to never open more than n ffmpeg instances to not crash my PC. Another drawback is that I wanted to avoid re-encoding the partial clips during the rendering of the final clip, so I had to save those files to disk using codec="png" temporarily, which results in 3x 30gb files in my case.

Would something like a "lazy" mode work, where every time the user queries data from the video, the ffmpeg instance is spun up, queried and then closed immediately? For certain scripts this would be much slower of course, but if it could be turned on selectively per VideoClipFile instance, I think it would allow working with much larger volumes of files at once without running into memory issues. If the actual process of merging many clips into one, using concatenate_videoclips() etc., doesn't require all files to be loaded into memory at once, but only for example 2, the memory consumption could be much lower.

@tburrows13
Copy link
Collaborator Author

@cryzed that seems like a good idea, and I think that it would be feasible. However, I don't think that that would be a breaking change, so I wouldn't neccasarily think it should go in v2.0. I'll continue to consider it though!

@cryzed
Copy link

cryzed commented Nov 27, 2020

@tburrows13 thank you for the quick reply, and yes I might have been a bit overeager in commenting it on this issue! Sorry about that :). I'm glad to hear you are considering it.

@dheerajmpai
Copy link

@cryzed I feel you should look for the potential speedup GPU can provide. GpU does not necessarily speed up rendering. In my case it is around 1.3x speed up and not much.

@cryzed
Copy link

cryzed commented Nov 27, 2020

@dheerajmpai the speed is fine, that's not the problem. The problem is memory utilization. If I want to open 500 small files at once, 500 ffmpeg instances have to run in the background during the lifetime of the objects.

@fortunto2
Copy link

Interesting implementation of using ffmpeg and a video card gpu in this library https://github.com/dmlc/decord

@pingvinton
Copy link

pingvinton commented Sep 1, 2021

In my case I try add '-hwaccel', 'cuda', '-c:v', 'h264_cuvid' params for read and write VideoFileClip and don't get any performance improvements. As result for reading I have started FFmpeg with this params:
FFMmpeg params: ['ffmpeg', '-hwaccel', 'cuda', '-c:v', 'h264_cuvid', '-i', './videos/file.mp4', '-loglevel', 'error', '-f', 'image2pipe', '-vf', 'scale=1920:1080', '-sws_flags', 'bicubic', '-pix_fmt', 'rgb24', '-vcodec', 'rawvideo', '-']

I don't know why adding cuda acceleration doesn't improve performance.
I tested it on GeForce RTX 3090

Thanks.

@keikoro
Copy link
Collaborator

keikoro commented Oct 24, 2021

@pingvinton Did you mean to comment on this issue? It's specifically about progressing Moviepy as a library and your comment seems unrelated. Please open a separate, new issue in which you describe your problem in detail.

@owocado
Copy link

owocado commented Jul 9, 2022

Hi, are there any plans to release 2.0.0.dev3 on pypi? 2.0.0.dev2 was released in October 2020 and there is changes on master branch since then. 😅

@B3QL
Copy link
Contributor

B3QL commented Jul 12, 2022

Hi, are there any plans to release 2.0.0.dev3 on pypi? 2.0.0.dev2 was released in October 2020 and there is changes on master branch since then. sweat_smile

Accordingly to #1768 (comment) it should be soon :) but AFAIK the #1076 PR needs to be merged before and it waits for fixes from the original maintainer.

@tburrows13 is there any plan for moving the project closer to 2.0 release?

@kskadart
Copy link

kskadart commented Dec 10, 2022

Hey @averypfeiffer
I want to try implement a GPU acceleration, can we have a short discussion?

@arnavmehta7
Copy link

Me too!

@yemibox51
Copy link

Is there a discord or communication channel we can use to communicate potential solutions and their trade-offs to issues, particularly if there is someone who knows why a particular thing was written a certain way or if they know about it?

@keikoro
Copy link
Collaborator

keikoro commented Feb 6, 2023

There's a Gitter (see link in README) but it's not really active. There is no other chat-like solution currently.

@tburrows13
Copy link
Collaborator Author

https://twitter.com/gdb/status/1638971232443076609 apparently ChatGPT likes to use moviepy...?!

@jitendra-koodo
Copy link

Folks, do we have any update on GPU acceleration? Is it released or planned to be released soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-decisions Discussion of ideas, suggestions, questions relevant to (re)design decision-making process. enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. project-admin Anything to do with the administration & organisation of moviepy. I.e. project "meta". python-version Compatibility issues, behaviour changes,... between different Python versions.
Projects
None yet
Development

No branches or pull requests