Skip to content

Conversation

@kolibril13
Copy link
Member

This is an VideoMobject, that gives the opportunity to put videos into manim scenes.
The following thing is happening:

  1. The video is added to a scene by :
vid = VideoMobject(file_directory)
self.add(vid.image_canvas)
  1. VideoMoject calls init_frames, a function that breaks the video apart into all their frames and saves them as png files.
  2. You can start the video with vid.play() in the scene file, which attaches an updater to the image canvas.
  3. When the imported video is done, frame_updater realizes that and staies at the last frame.

@kolibril13
Copy link
Member Author

In this pull request, there is furthermore a file "FrameCounterVideo" that creates an example video that displays some numbers.
This can be used to run ExampleVideoMobject, where the video can be a part of the scenes and where you can try eg.

vid.play()
self.wait(1)
vid.pause()

Some thoughts what can be changed in order to make this even better:

  • Add functionality so that the move, shift, and scale functions are applicable.
  • Maybe find a better way then extracting each frame from a video and saving it to png, because this can consume quite a lot of memory.
  • Finding a place, where we place the file VideoMobject in manim.
  • Maybe finding a way, to delete all the single frames after manim is cloesed.

@kolibril13
Copy link
Member Author

Here is my output from ExampleVideoMobject to give you an example:
output

@TonyCrane
Copy link
Contributor

This may be a good idea.

But there is still much room for improvement. As you said, this method takes up a lot of space.
And you'd better implement control of the playback rate of VideoMobject.
And unify the frame rate of VideoMobject and the frame rate of video generated by manim, otherwise this will look strange.

If you save space and implement functions such as movement, this will be a very simple and useful operation. But at present, it does not have more advantages than using external video editing software to add video.

@leotrs
Copy link
Contributor

leotrs commented Jun 3, 2020

I tend to agree with @tony031218 here.

And additionally, I'm a bit weary of continuing to add new functionality before having more extensive documentation/tests.

@kolibril13
Copy link
Member Author

ok, then I will come back with this in a few month.

@kolibril13 kolibril13 closed this Jun 3, 2020
@PgBiel PgBiel added the new feature Enhancement specifically adding a new feature (feature request should be used for issues instead) label Jun 7, 2020
@kolibril13 kolibril13 reopened this Jul 6, 2020
@Aathish04 Aathish04 changed the title #Implementation of VideoMobject Implementation of VideoMobject Jul 10, 2020
@safinsingh
Copy link
Contributor

@kolibril13 any progress on this PR?

@kolibril13
Copy link
Member Author

@safinsingh No, this is the most current version

@leotrs
Copy link
Contributor

leotrs commented Aug 2, 2020

If the current plan is to "come back to this in a few months", I vote we close this until that time. By that time there will have been a bunch of other additions and the PR will essentially be entirely different. Closing for now. @kolibril13 feel free to reopen right now if you have more updates. Or please open a new PR in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants