jeertmans / manim-slides Goto Github PK
View Code? Open in Web Editor NEWTool for live presentations using manim
Home Page: https://manim-slides.eertmans.be
License: MIT License
Tool for live presentations using manim
Home Page: https://manim-slides.eertmans.be
License: MIT License
manim-slides no longer work on M1 chip (or arm64) because of pyqt5. Using Rosetta terminal is not an option.
v.4.2.0
macOS arm64
No response
pip install manim-slides==4.2.0
Collecting manim-slides==4.2.0
Using cached manim-slides-4.2.0.tar.gz (31 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: tqdm>=4.62.3 in /Users/xxxx/Library/Caches/pypoetry/virtualenvs/ai-conf-presentation-myrB_ykU-py3.9/lib/python3.9/site-packages (from manim-slides==4.2.0) (4.64.1)
Requirement already satisfied: numpy>=1.19.3 in /Users/xxxx/Library/Caches/pypoetry/virtualenvs/ai-conf-presentation-myrB_ykU-py3.9/lib/python3.9/site-packages (from manim-slides==4.2.0) (1.23.4)
Requirement already satisfied: click>=8.0 in /Users/xxxx/Library/Caches/pypoetry/virtualenvs/ai-conf-presentation-myrB_ykU-py3.9/lib/python3.9/site-packages (from manim-slides==4.2.0) (8.1.3)
Requirement already satisfied: opencv-python>=4.6 in /Users/xxxx/Library/Caches/pypoetry/virtualenvs/ai-conf-presentation-myrB_ykU-py3.9/lib/python3.9/site-packages (from manim-slides==4.2.0) (4.6.0.66)
Collecting pyqt5>=5.15
Using cached PyQt5-5.15.7.tar.gz (3.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
Traceback (most recent call last):
File "/Users/xxxx/Library/Caches/pypoetry/virtualenvs/ai-conf-presentation-myrB_ykU-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/xxxx/Library/Caches/pypoetry/virtualenvs/ai-conf-presentation-myrB_ykU-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Users/xxxx/Library/Caches/pypoetry/virtualenvs/ai-conf-presentation-myrB_ykU-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/xxxx/Library/Caches/pypoetry/virtualenvs/ai-conf-presentation-myrB_ykU-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/private/var/folders/15/yly5qc49661d3rkdfl04fnvc0000gp/T/pip-build-env-pxb2eug4/overlay/lib/python3.9/site-packages/sipbuild/api.py", line 46, in build_wheel
project = AbstractProject.bootstrap('wheel',
File "/private/var/folders/15/yly5qc49661d3rkdfl04fnvc0000gp/T/pip-build-env-pxb2eug4/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/private/var/folders/15/yly5qc49661d3rkdfl04fnvc0000gp/T/pip-build-env-pxb2eug4/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 585, in setup
self.apply_user_defaults(tool)
File "project.py", line 69, in apply_user_defaults
super().apply_user_defaults(tool)
File "/private/var/folders/15/yly5qc49661d3rkdfl04fnvc0000gp/T/pip-build-env-pxb2eug4/overlay/lib/python3.9/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "/private/var/folders/15/yly5qc49661d3rkdfl04fnvc0000gp/T/pip-build-env-pxb2eug4/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 236, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/private/var/folders/15/yly5qc49661d3rkdfl04fnvc0000gp/T/pip-build-env-pxb2eug4/overlay/lib/python3.9/site-packages/pyqtbuild/builder.py", line 69, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
When using aspect-ratio=keep
, the background color is white.
However, this might look weird on presentations with, e.g., black background color.
I propose to add a background color option in the CLI, that defaults to black.
The goal is to change the color of the borders.
Example of desired output with background-color=black
:
All the changes should occur in manim_slides/present.py
.
First, create a new keyword argument to App.__init__
called
background_color: str = "black"
Then, after self.label = QLabel(self)
, write
self.label.setStyleSheet(f"background-color: {background_color}")
After that, you need to add a new argument to the CLI (see @click.option
) and pass it to the App
instance.
I tried using the code in the readme, and it's all good if I use the command:
manim -pqh main.py Example
However, when I try to use manim-slides to generate the slides using the command:
manim-slides Example --fullscreen
Or even without the --fullscreen flag, the fps of the animations is lower, and the videos inside the media folder seems smoother. But when I open the videos on the slides folder, it has the same fps as the video in the media folder.
Is there any way to make the fps the same?
I've run following commands:
$ manim render example.py ThreeDExample
$ manim-slides ThreeDExample # This results in a low quality animation, but with slides
$ mpv "$(pwd)"/media/videos/main/2160p60/ThreeDExample.mp4 # This results in a high quality animation
This leads me to believe that manim-slides converts the mp4 files in a way that leads to a reduction of quality.
manim-slides, version 4.2.0
Linux, version 6.0.2-arch1-1
Look at the arrows of the coordinate system, the arrow in the video is clearly sharper.
Using manim-slides ThreeDExample
:
Using mpv "$(pwd)"/media/videos/main/2160p60/ThreeDExample.mp4
:
Python version: 3.10.8
Qt specific environment variables:
wayland compositor:
river, compiled without xwayland support
From the JOSE review criteria:
Installation: Does installation proceed as outlined in the documentation? (and documentation is sufficient?)
The installation documentation clearly states the need to install ManimCE or ManimGL, which is appreciated. I'm curious why these are not declared as dependencies of the package? Especially in the quickstart, I think it would be nice to be opinionated about installing one or the other to show a full installation flow. It can always include a link to the other, but full instructions (I have only a venv created all the way to running an example) would be nice in the quickstart.
https://eertmans.be/manim-slides/quickstart.html
Documentation Enhancement
No response
"manim-slides" command not working after pip + git install. I'm probably making some silly mistake but I can't seem to figure out why it's not binding in the console. Tried restarting + adding to PATH but still nothing
4.1.1
Windows
No response
When reversing or replaying the last slide, only one animation is played.
4.10.0
All
No response
No response
Currently, it is not possible to hide or show the mouse during the presentation.
This would be a nice feature to add.
No response
A key, e.g. HIDE_MOUSE: Key = Key(ids[Qt.Key_H], name="HIDE / SHOW MOUSE")
shoud be created in manim_slides/config.py
.
Then, the App.keyPressEvent
method in manim_slides/config.py
should be modified to listen to config.HIDE_MOUSE.match(key)
and toggle on / off the blank key.
Note that the config
argument must, therefore, also be saved in App
and that some kind of state must be kept about whether the mouse is hidden or not.
Manim offers an option, -n/--from-animation-number
, that allows to only render part of a Scene. The problem only occurs when the start index is higher than zero, not the opposite.
Current, v4.9.2
.
All
Manim Community v0.17.2
[03/08/23 10:28:21] INFO Animation 1 : Using cached data (hash : 849281109_634683520_4174018169) cairo_renderer.py:78
Animation 1: Write(VGroup of 2 submobjects), etc.: 0%| | 0/1 [00:00<?, ?it/s]
INFO Animation 2 : Using cached data (hash : 4007471538_2202726386_1950962615) cairo_renderer.py:78
INFO Combining to Movie file. scene_file_writer.py:617
INFO scene_file_writer.py:736
File ready at '/home/jeertmans/repositories/jeertmans.github.io/_slides/2023-03-27-eucap-presentation/media/videos/main/480p15/Main.mp4'
INFO Rendered Main scene.py:241
Played 3 animations
Copying animation files to './slides/files/Main' and generating reversed animations: 0%| | 0/3 [00:00<?, ?it/s]
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/jeertmans/.local/lib/python3.10/site-packages/manim/cli/render/commands.py:115 in render │
│ │
│ 112 │ │ │ try: │
│ 113 │ │ │ │ with tempconfig({}): │
│ 114 │ │ │ │ │ scene = SceneClass() │
│ ❱ 115 │ │ │ │ │ scene.render() │
│ 116 │ │ │ except Exception: │
│ 117 │ │ │ │ error_console.print_exception() │
│ 118 │ │ │ │ sys.exit(1) │
│ │
│ /home/jeertmans/.local/lib/python3.10/site-packages/manim_slides/slide.py:230 in render │
│ │
│ 227 │ │ │
│ 228 │ │ config["max_files_cached"] = max_files_cached │
│ 229 │ │ │
│ ❱ 230 │ │ self.save_slides() │
│ 231 │
│ 232 │
│ 233 class ThreeDSlide(Slide, ThreeDScene): # type: ignore │
│ │
│ /home/jeertmans/.local/lib/python3.10/site-packages/manim_slides/slide.py:183 in save_slides │
│ │
│ 180 │ │ │ ascii=True if platform.system() == "Windows" else None, │
│ 181 │ │ │ disable=not self.show_progress_bar, │
│ 182 │ │ ): │
│ ❱ 183 │ │ │ filename = os.path.basename(src_file) │
│ 184 │ │ │ rev_filename = "{}_reversed{}".format(*os.path.splitext(filename)) │
│ 185 │ │ │ │
│ 186 │ │ │ dst_file = os.path.join(scene_files_folder, filename) │
│ │
│ /usr/lib/python3.10/posixpath.py:142 in basename │
│ │
│ 139 │
│ 140 def basename(p): │
│ 141 │ """Returns the final component of a pathname""" │
│ ❱ 142 │ p = os.fspath(p) │
│ 143 │ sep = _get_sep(p) │
│ 144 │ i = p.rfind(sep) + 1 │
│ 145 │ return p[i:] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: expected str, bytes or os.PathLike object, not NoneType
No response
I am using manim-slides for live presentation and there does not seem to be an option to hide the cursor and I have to put it in a screen corner so it does not hinder the presentation which is annoying.
No response
I'm using version 4.1.1 on Windows 11.
It seems like the docs build fails:
Running Sphinx v6.1.3
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
/home/runner/work/manim-slides/manim-slides/docs/source/index.rst:26: ERROR: Failed to import "cli" from "manim_slides.__main__". The following exception was raised:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.[16](https://github.com/jeertmans/manim-slides/actions/runs/3999057965/jobs/6862480885#step:10:17)/x64/lib/python3.9/site-packages/sphinx_click/ext.py", line 403, in _load_module
looking for now-outdated files... none found
mod = __import__(module_name, globals(), locals(), [attr_name])
ModuleNotFoundError: No module named 'manim_slides'
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying images... [100%] _static/logo.png
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.
The HTML pages are in build/html.
index.html
Documentation Report
To be determined.
When launching slides with manim-slides command the opened window has the wrong resolution. It is off the screen tall and skinny. This issue is not present when launching with full screen tag.
Super cool project, thanks for doing this.
I'd love to be able to run this seamlessly in a Jupyter notebook. It's almost there, looks like a simple magic could do the trick. What do you think?
In the example below, we have:
%%manim -qm -v WARNING BasicExample
as the magic, so for the magic, I'd expect we'd want syntax like
%%manim-slides BasicExample
Which should read in the script and return an HTML IPython object with the revealjs page
ici voila
Here's the notebook: https://colab.research.google.com/drive/1K2EVdySR7H5DtLstFtX8h2mvtSW7af6O?usp=sharing
So after Reversing a slide, the Replay key also Reverses! and the only way to make Replay work is to move back and forward the slide
Hello,
I've unfortunately been getting the same error when trying to run manim-slides of a scene. The error looks like below:
I've tried to uninstall my conda distribution, reset my entire Windows PC, and try and install pyqt5-tools separately, yet none have worked. Is this a bug or is there something that I am missing?
Thank you!
P.S. - The files used in this bug were pulled straight from the main page of the repository.
From the JOSE review criteria:
Installation instructions: Is there a clearly stated list of dependencies? (Ideally these should be handled with an automated package management solution.)
I think it would be nice to improve the installation experience by declaring the dependency of Manim-slides on ManimCE/ManimGL so that these are installed automatically and with a supported version. Since you want to support both upstream packages, I think you could use an "extra" dependency, similar to your existing dev dependencies. Then the installation instructions could be modified to be python -m pip install manim-slides[manim]
or python -m pip install manim-slides[manimgl]
.
In addition, I think you should provide a wheel package on PyPI. Providing a wheel saves installation time for the user and they are not required to build anything locally when installing. I see you're using build
but specifying only --sdist
. Is there a particular reason to avoid the wheel files? Especially since this package is pure Python, it will only be one wheel uploaded.
I also suggest that you specify the compatible python_requires
(or the equivalent poetry setting) so that Pip can determine whether the Python in the venv is supported. I suggest setting this as a lower bound and not an upper bound so that new Python releases are not limited in the version they can install, unless you know specifically that a particular version is not supported.
No response
No response
When I have an scene with a certain number of elements I get error OSError: [Errno 36] File name too long:
when I do manim-slides convert Graph graph.html
.
version 4.8.3
Linux Ubuntu 22.04
No response
Code to reproduce the error:
import networkx as nx
from manim import *
from manim_slides import Slide
# Creating a random graph with 6 nodes and few edges
G = nx.gnp_random_graph(6, 0.5, seed=0)
# Obtaining the 2D coordinates of the graph nodes
pos = nx.spring_layout(G)
class Graph(Slide):
def construct(self):
circles = {}
# Printing the 2D coordinates of the nodes
for node, coord in pos.items():
print("Node:", node, "Coordinates:", coord)
circle = Circle(radius=.25)
circles[node] = circle
circle.set_fill(WHITE, opacity=1.0)
circle.set_stroke(RED, width=.5)
position = coord[0] * RIGHT + coord[1] * UP
print(f"{position=}")
circle.shift(position)
self.play(Create(circle))
edges = []
for edge in G.edges:
dot_0 = circles[edge[0]]
dot_1 = circles[edge[1]]
line = Line(dot_0.get_center(), dot_1.get_center(), color=PURPLE)
edges.append(line)
self.play(Create(line))
self.pause()
Hello! First of all, thanks for this awesome plugin, I am using Manim lately and being able to use them for interactive presentations is a nice addition. However, I found a little inconvenience.
I usually design my animations for a 1920x1080 resolution for obvious reasons, since it is the most widely used aspect-ratio. But some days ago I used a presentation made with manim + manim-slides in a projector, the typical projector found in classrooms. It had a 4:3 old aspect-ratio. Then, I found that the sides of the animation were cropped, and I had to resize the browser manually.
If the aspect-ratio of the browser doesn't match the aspect-ratio of the manim video files, the slides are cropped. This is because videos are inserted as RevealJS backgrounds. And by default, RevealJS backgrounds are in 'cover' mode, which scales the background until all the frame is covered. It should be in 'contain', which scales the background until all of it is visible:
In the RevealJS documentation, they show how to configure this background-size: https://revealjs.com/backgrounds/. Both for images and videos, it is set by the attribute data-background-size (data-background-size='contain'). I changed the attribute manually in a generated slide and it works.
I am sorry, I don't know how to do a Pull Request (I am starting to contribute to opensource projects, I have to learn soon). But I inspected your code, and I think all you have to do is to add data-background-size="contain"
to the HTML sections render. In the file main_slides/convert.py:
def get_sections_iter(self) -> Generator[str, None, None]:
"""Generates a sequence of sections, one per slide, that will be included into the html template."""
for presentation_config in self.presentation_configs:
for slide_config in presentation_config.slides:
file = presentation_config.files[slide_config.start_animation]
file = os.path.join(self.assets_dir, os.path.basename(file))
# TODO: document this
# Videos are muted because, otherwise, the first slide never plays correctly.
# This is due to a restriction in playing audio without the user doing anything.
# Later, this might be useful to only mute the first video, or to make it optional.
# Read more about this:
# https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_and_autoplay_blocking
if slide_config.is_loop():
yield f'<section data-background-video="{file}" data-background-video-muted data-background-video-loop></section>'
else:
yield f'<section data-background-video="{file}" data-background-video-muted></section>'
It should be something like:
yield f'<section data-background-size="contain" data-background-video="{file}" data-background-video-muted data-background-video-loop></section>'
else:
yield f'<section data-background-size="contain" data-background-video="{file}" data-background-video-muted></section>'
Unless you want to add a parameter to switch from contain to cover. I don't know if there is any particular use case for maintaining 'cover'.
Reading #120 (reply in thread), it seems that how paths are handled may be incorrect on Windows' platforms. It may be good to rewrite the current file-related variables using pathlib.Path
.
v4.8.4
Windows
No response
No response
As the title, is it possible to render a full video based on keystroke history using ffmpeg? That could be another useful feature.
As mentioned in #128 (comment), it would be nice to use the save background color as the one used with Manim (or ManimGL).
A few to-dos:
background_color
field in manim-slides/manim_slides/config.py
Lines 147 to 149 in a9f5355
background_color
from Manim / ManimGL config and write it somewhere in manim-slides/manim_slides/slide.py
Lines 28 to 54 in a9f5355
--background-color
/-cbackground-color
option is not set in present manim-slides/manim_slides/present.py
Lines 783 to 792 in a9f5355
manim-slides/manim_slides/convert.py
Line 271 in a9f5355
No response
No response
With #39 and #40, users can now create issues based on template. However, I'd like to have more template, in line to what is done in the numpy/numpy repository: https://github.com/numpy/numpy/issues/new/choose.
I would love to have templates for
You can get inspiration from the Numpy repository (see above), but I won't be using external links.
Please, read already existing files in ISSUE_TEMPLATE, and get some inspiration from https://github.com/numpy/numpy/issues/new/choose too.
Was this addressed already? Don't see automated tests, etc. in source tree.
Hello!
I have encountered a problem with manim-slides:
After i rendered my Scenes (or Slides, to be more precise) i am not able to present them to test the Functionality.
i gave it a try by using manim-slides present Test2
I get the following error:
Usage: manim-slides present [OPTIONS] [SCENES]...
Error: Invalid value for '--folder': Directory './slides' does not exist.
I already tried creating the "slides" folder manually. After doing so, i get the following error:
Usage: manim-slides present [OPTIONS] [SCENES]...
Error: File ./slides\Test2.json does not exist, check the scene name and make sure to use Slide as your scene base class
Even though i use "Slide" as my base class
It seems to not create the needed Folder or JSON so i cant use the Library at all
Any Help is greatly apprechiated!
PS: Im fairly new to Manim and it might be the case im just stupid and am missing something obvious, if this is the case i would extra-apprechiate some help with the descripted problem :) )
manim-slides, version 4.8.0
Windows 11
No response
No response
Related to JOSE Review openjournals/jose-reviews#206
paper.md does not include enumerated list of features added or changed over the original forked repo https://github.com/galatolofederico/manim-presentation
While a perusal of the submissions repo itself can clarify it, it should be summarized more specifically in the paper.md for the submission.
https://github.com/openjournals/jose-papers/blob/jose.00206/jose.00206/10.21105.jose.00206.pdf
Documentation Enhancement
include enumerated list of features added or changed over the original forked repo
Currently, only the CLI is documented on GitHub pages, and the remaining is partially documented on the README.
It would be great to have a better documentation, as it is done for Manim Community, where everything can be seen in one place.
All
Documentation Enhancement
I recommend to use Sphinx and the docs
directory to create more documentations, especially examples.
I'd like to make this repo easier to manage by creating a template for issues.
The documentation for creating templates on GitHub can be found here: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository.
Here is what I would like to find in the template:
From the JOSE Reviewer Guidelines:
Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support
The documentation does include several pages with contribution instructions. However, the second and third items are not covered. I'd suggest adding links and explanations of these two items in the contributing instructions and on the README.
https://eertmans.be/manim-slides/contributing/index.html
Documentation Enhancement
No response
In link with #149, it would be nice to be able to start from a given slide number (-s/--slides n
) or a given animation (-a/--animation n
).
No response
No response
I'd like to make this repo easier to manage by creating a template for pull requests.
The documentation for creating templates on GitHub can be found here: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository.
Here is what I would like to find in the template:
After following the installation steps, running manim-slides
in a command line (oh-my-zsh) yields:
Traceback (most recent call last):
File "/home/incognito/anaconda3/envs/manim-slides/lib/python3.11/site-packages/manimpango/__init__.py", line 14, in <module>
from .cmanimpango import * # noqa: F403,F401
^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: /home/incognito/anaconda3/envs/manim-slides/lib/python3.11/site-packages/manimpango/../../../libgobject-2.0.so.0: undefined symbol: g_uri_ref
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/incognito/anaconda3/envs/manim-slides/bin/manim-slides", line 5, in <module>
from manim_slides.__main__ import cli
File "/home/incognito/Repositories/manim-slides/manim_slides/__init__.py", line 3, in <module>
from .slide import Slide, ThreeDSlide
File "/home/incognito/Repositories/manim-slides/manim_slides/slide.py", line 9, in <module>
from .config import PresentationConfig, SlideConfig, SlideType
File "/home/incognito/Repositories/manim-slides/manim_slides/config.py", line 11, in <module>
from .manim import FFMPEG_BIN, logger
File "/home/incognito/Repositories/manim-slides/manim_slides/manim.py", line 76, in <module>
from manim import Scene, ThreeDScene, config, logger
File "/home/incognito/anaconda3/envs/manim-slides/lib/python3.11/site-packages/manim/__init__.py", line 32, in <module>
from .animation.numbers import *
File "/home/incognito/anaconda3/envs/manim-slides/lib/python3.11/site-packages/manim/animation/numbers.py", line 10, in <module>
from manim.mobject.text.numbers import DecimalNumber
File "/home/incognito/anaconda3/envs/manim-slides/lib/python3.11/site-packages/manim/mobject/text/numbers.py", line 15, in <module>
from manim.mobject.text.text_mobject import Text
File "/home/incognito/anaconda3/envs/manim-slides/lib/python3.11/site-packages/manim/mobject/text/text_mobject.py", line 64, in <module>
import manimpango
File "/home/incognito/anaconda3/envs/manim-slides/lib/python3.11/site-packages/manimpango/__init__.py", line 35, in <module>
raise ImportError(msg)
ImportError:
ManimPango could not import and load the necessary shared libraries.
This error may occur when ManimPango and its dependencies are improperly set up.
Please make sure the following versions are what you expect:
* ManimPango v0.4.3, Python v3.11.0
If you believe there is a greater problem,
feel free to contact us or create an issue on GitHub:
* Discord: https://www.manim.community/discord/
* GitHub: https://github.com/ManimCommunity/ManimPango/issues
Original error: /home/incognito/anaconda3/envs/manim-slides/lib/python3.11/site-packages/manimpango/../../../libgobject-2.0.so.0: undefined symbol: g_uri_ref
Activating python
and doing import manimpango
works fine though. Not sure what the issue is.
manim-slides --version
gives that same error ^ and stacktrace.
lsb_release -a
gives:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
No response
No response
Hello!
Thank you for building this project!
I saw that in the README there is a comparison with manim presentations.
I am interested in the differences between manim slides and manim editor.
Could you please summarize them and the use cases of the two tools? Both of them seems manim-presentations follow up.
The current example.gif was recorded a long time ago, when a lot of features did not exist, and I not quite attractive (in my opinion).
If possible, I like a small video / gif that shows, in a fews seconds, what you can do with manim-slides.
Create (or modify) some example file that you will display during the example video, record yourself in such a way that you can clearly see what manim-slides is doing. A good approach to that is showing key presses with screenkey.
So, there's this version of manim that allows you to create interactive diagrams, is there (or could there be in the future) a way to embed one of those inside a slide? Here's the site and some examples of diagrams I made that I'd like to embed into a slide:
P.S.: forgot to mention that the exports of manim web can also be .html files with an .js script, maybe that will ease things up
No response
No response
The installation of manim-slides, via pip3, worked totally fine. Initially compiling the example scene worked fine as well. However, running manim-slides Example
doesn't work, and returns zsh: command not found: manim-slides. How do I fix this?
Being able to export the slides as png or pdf will help in the following situations:
The animations themselves will obviously be lost, but the feature is still relevant in some cases.
I'm not familiar with the rendering process used in manim, but I guess looping through the mp4's generated by manim and taking the last image generated in each video, and then combining them, will be sufficient. Alternatively, taking the last state before the call to next_slide()
is also sufficient. The images could then be combined in a pdf file, for instance by creating a beamer presentation using LaTeX, and taking each image as one slide.
When looking at the features described in the documentation, I could not find this one, hence this issue.
Currently, Manim Slides' CLI is quite slow due to an import overhead caused by importing manim
or manimlib
, even though most of it is not needed.
Calling manim-slides --help
takes more than 1s on my computer, when 90+ % of the time taken for importing useless modules.
However, manim-like dependencies are only ever needed when rendering slides, thus in manim_slides/slides.py
.
The only attributes that are used across all tools are FFMPEG_BIN
and logger
, but those could be easily created apart, and eventually read options from CLI's arguments if configuration is needed (such as specifying ffmpeg's path).
A solution to this should be found, allowing for a faster CLI.
Snakeviz visualization when calling manim-slides --help
:
Lazy module import is only planned to be part of Python 3.12, see PEP0690, so an alternative solution should be found.
Was excited to use manim-slides but unfortunately, there's a runtime error I can't figure out with manimpango library.
when I run the manim-slides command with a scene. the traceback points me to a manimpango import error.
ImportError:
ManimPango could not import and load the necessary shared libraries.
This error may occur when ManimPango and its dependencies are improperly set up.
Please make sure the following versions are what you expect:
* ManimPango v0.4.2, Python v3.9.15
If you believe there is a greater problem,
feel free to contact us or create an issue on GitHub:
* Discord: https://www.manim.community/discord/
* GitHub: https://github.com/ManimCommunity/ManimPango/issues
Original error: manim-env/lib/libgobject-2.0.so.0: undefined symbol: g_uri_ref
I have tried several versions of manimpango and I don't have any issues running manim and I can also generate the mp4 files for the slides.
Any help would be greatly appreciated.
TIA!
From the JOSE Reviewer Guidelines:
A statement of need: Do the authors clearly state the need for this software and who the target audience is?
The paper.md does include a brief statement of need for the software, explaining that being able create slideshows from Manim animations is useful. I agree with this. I think the authors should also include information about the target audience and ways that those audiences might find this software useful, specifically. This does not have to be long, maybe 1-2 paragraphs at most.
paper.md
Documentation Enhancement
No response
When I tried to use the provided examples, I can't use the left/right keys to jump to the next/previous slide.
manim-slides, version 4.1.1
macOS, M1 chip
No response
No response
When the --use-template option is used, the error Option 'template': str type expected
is produced.
Example:
manim-slides convert --use-template slides-template.html Test.html
[...]
Error: 1 error(s) occured with configuration options for 'html', see below.
Option 'template': str type expected
Apparently there is a conflict between the type which convert.convert()
is receiving in its parameter template
, which is of type Path
, and the one Pydantic is expecting and validating, which is str
.
The problem can be solved by adding these lines at the beginning of convert.convert()
:
if template:
template = str(template)
manim-slides, version 4.13.0
Linux
No response
No response
Some files have functions with missing type hints in their signature.
Here is an up-to-date list of files to complete:
Please modify file(s) such that:
x: str | None
are not accepted, instead use x: Optional[str]
),self
in methods should not take any type hint,MANIM_AVAILABLE: bool = ...
),Typing
module only when necessary (so prefer list
over typing.List
if the list elements type is Any
).Since the number of files to be changed is large, feel free to only modify one file or so per PR.
For some reason, there is a noticeable color difference between the background and the slide. I thought that it makes sense since the background color is a CSS plain color, and the slide is a render video. But in present mode, the color difference is almost invisible, extremely subtle, while it is bigger in convert mode.
If you use this simple animation with red background, you will see the issue:
from manim import *
from manim_slides import Slide
config.background_color=RED
class TestColors(Slide):
def construct(self):
circ = Circle(color=WHITE)
self.play(
Create(circ)
)
self.pause()
Result when presenting directly with manim-slides:
Result when converting to html:
If you pay attention, the background color is the same. What changes is the hue of the video. I don't really know what's happening since it is the same .mp4 video.
Any idea?
4.11.0, with latest commits from git
Windows 10
No response
No response
In par with #34, I'd like to have some checks to assert that all functions, methods, and constants have type hints.
This PR requires adding a pre-commit hook that using mypy. After the flake8
hook:
manim-slides/.pre-commit-config.yaml
Lines 22 to 30 in 14a266b
you need to add:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: '' # Use the sha / tag you want to point at
hooks:
- id: mypy
and use customized arguments to make sure it only checks for type hints.
Python 3.11 was released in October.
I think, it is good idea to add official support.
Action needed:
No response
No response
I've tried to debug this issue with the solution to #20 , but it didn't seem to work.
Here's a screenshot of what happened:
https://imgur.com/a/egBPG9E
Commands Used:
manimgl --uhd start.py
manim-slides Test
By the way, my Mac has the default scaling 😄
currently either manim or manimgl need to be installed separately and prior to manim-slides.
each, in turn, have their own set of dependencies.
best if manim-slides handles installing manim (or manimgl) as well, if not already present on target system.
request related to jose review: openjournals/jose-reviews#206
No response
No response
I noticed that it is limiting for me that control keys only work when the presentation window is open. Because I'd like to use OBS to add overlays and have only one monitor, I need to be on the OBS window, but then I can't control the presentation.
So an option for global key bindings would be Awesome.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.