Skip to content

Animation from Player #217

Dec 22, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

UPDATE March 2024

From v0.14, we can export to an mp4 video using Player.to_video().

Original answer below

Hi @sarkadava
There is no official way yet, but there are two good solutions that may work well. The first is to simply use a screen recorder to create a video from what is shown on the screen. The second, which is probably more what you are looking for, is to use a private method of the Player that I use to generate the website: Player._to_animation.

Step 1. Imports

We import Kinetics Toolkit and the animation module from Matplotlib (since the Player uses Matplotlib).

import kineticstoolkit.lab as ktk
import matplotlib.animation as animation

Step 2. Create the player instance and as…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by felixchenier
Comment options

You must be logged in to vote
2 replies
@felixchenier
Comment options

@sarkadava
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants