-
-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Terms
- Checked the existing issues and discussions to see if my issue had not already been reported;
- Checked the frequently asked questions;
- Read the installation instructions;
- Created a virtual environment in which I can reproduce my bug;
Describe the issue
The command manim-slides present shows a black screen on macOS. I was not able to reproduce the issue on Ubuntu 20.04.
Unlike #315 and #377, the issue cannot be mitigated by using the option --hide-info-window and no debug messages are reported
When the info window is active, it correctly reports the number of the slides. Thus, manim-slides seems to properly read the JSON file. The arrow keys move the presentation back and forth as expected, but no video plays.
Reproducibility
After rendering the basic example available on the main page of the GitHub repository, the command manim-slides BasicExample shows the presentation window with a black background.
Issue cause
The qtpy method QMediaPlayer.setSource() misinterprets relative paths on macOS. Thus, this seems to be a qtpy issue. However, there is a small fix that solves the issue on manim-slides (see below).
Command
manim-slides BasicExample
Issue Type
Visual bug when presenting (manim-slides present)
Python version
Python 3.14.0
Python environment
Manim Slides version: 5.5.2
Python executable: /opt/homebrew/Cellar/manim-slides/5.5.2/libexec/bin/python
Manim bindings:
/opt/homebrew/Cellar/manim-slides/5.5.2/libexec/lib/python3.14/site-packages/pydub/utils.py:300: SyntaxWarning: "\(" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\("? A raw string is also an option.
m = re.match('([su]([0-9]{1,2})p?) \(([0-9]{1,2}) bit\)$', token)
/opt/homebrew/Cellar/manim-slides/5.5.2/libexec/lib/python3.14/site-packages/pydub/utils.py:301: SyntaxWarning: "\(" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\("? A raw string is also an option.
m2 = re.match('([su]([0-9]{1,2})p?)( \(default\))?$', token)
/opt/homebrew/Cellar/manim-slides/5.5.2/libexec/lib/python3.14/site-packages/pydub/utils.py:310: SyntaxWarning: "\(" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\("? A raw string is also an option.
elif re.match('(flt)p?( \(default\))?$', token):
/opt/homebrew/Cellar/manim-slides/5.5.2/libexec/lib/python3.14/site-packages/pydub/utils.py:314: SyntaxWarning: "\(" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\("? A raw string is also an option.
elif re.match('(dbl)p?( \(default\))?$', token):
manim (version: 0.19.0)
manimgl not found
Qt API: pyqt6 (version: 6.9.3)What is your platform?
macOS
Other platform
No response
Manim Slides Python code
from manim import * # or: from manimlib import *
from manim_slides import Slide
class BasicExample(Slide):
def construct(self):
circle = Circle(radius=3, color=BLUE)
dot = Dot()
self.play(GrowFromCenter(circle))
self.next_slide() # Waits user to press continue to go to the next slide
self.next_slide(loop=True) # Start loop
self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
self.next_slide() # This will start a new non-looping slide
self.play(dot.animate.move_to(ORIGIN))Relevant log output
Screenshots
Additional information
No response
Recommended fix or suggestions
Either waiting for a qtpy fix or using the absolute paths of the video in place of the relative paths. In particular, any line of the type QUrl.fromLocalFile(str(...)) should become QUrl.fromLocalFile(os.path.abspath(...)).
The following patch solves the issue.