Comments (15)
It should be fine once the nixpkgs PR is merged
As far as the new notebook, it's not widely used or even known about- I'm slowly moving over from Jupyter because I like it, and hope it takes off.
The project is called Marimo, and hopes to address some of the state-based pains that Jupyter brings: https://marimo.io/
Also really polished widgets, nicer UI, and feels less bloated
If you want to highlight what is possible in documentation, I'm sure they would appreciate it. I think this issue from the lead: marimo-team/marimo#794
shows they have some interested in deeper integration with manim like tools - but what I did is a bit of a magics hack
from manim-slides.
Great news! Thanks for your work @dmadisett!
from manim-slides.
@dmadisetti, before I close this, would you mind adding a small section about how to install Manim Slides via NixOS in https://github.com/jeertmans/manim-slides/blob/main/docs/source/installation.md?
If you have time, I would really appreciate! I can review your PR and make some changes on top of it :-) Thanks!
from manim-slides.
Hello, you are right that dependencies can become very hard to manage, especially on OSes like yours.
Is NixOS Linux based? I would have guessed that it support the manylinux binaries, but maybe not.
As you can read, the Qt plug-in for displaying multimedia does not seem to be available on your platform.. I might be good to first investigate that issue further
from manim-slides.
Right, NixOS is Linux based. So I think there might not be some specific issue that can cause the malfunction of the Qt multimedia plug-in.
Is manim-slides specifically depending on qt5? I tried both qt5 and qt6 on my system, but it didn't work properly.
If there is a Dockerfile for manim-slides, I might be able to investigate the issue by comparing the Dockerfile's setup procedure and that of my system.
from manim-slides.
Also, I'd like to mention that someone proposed the packaging of manim-slides for the NixOS package manager, but looks like there is no significant progress for a few months, so it might be a good idea for us to resume the packaging.
from manim-slides.
Creating a working Dockerfile is an ongoing issue but I didn’t time yet to work on that…
Qt is a required dependency for the present mode (+ wizard).
What I don’t know is whether the issue is from Qt, or from PySide6 bindings. Maybe you can try using PyQt6. For that, I might need to rewrite the code so people can chose the bindings they prefer.
from manim-slides.
Just a side note:
I thought this is the problem coming from the absence of ffmpeg or qt5, so I installed them globally on my system. However, the problem persists.
Starting with v5.1, also waiting next Manim release (to be in sync), Manim Slides and Manim should not depend on a global FFMPEG installation anymore, because we will use PyAV that ships the necessary bindings. PySide6 should also ship ffmpeg
bindings itself, I think.
from manim-slides.
Regarding your issue, can you try installing PyQt6
and see if you can import the multimedia module?
E.g., run this (change the video file path):
import sys
from PyQt6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QPushButton, QSlider
from PyQt6.QtMultimedia import QMediaPlayer
from PyQt6.QtMultimediaWidgets import QVideoWidget
from PyQt6.QtCore import QUrl, Qt
class VideoPlayer(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Video Player")
self.setGeometry(100, 100, 1024, 768)
self.media_player = QMediaPlayer()
self.media_player.setSource(QUrl.fromLocalFile("Video.mp4"))
self.video_widget = QVideoWidget()
self.start_button = QPushButton("Start")
self.start_button.clicked.connect(self.start_video)
self.pause_button = QPushButton("Pause")
self.pause_button.clicked.connect(self.pause_video)
self.stop_button = QPushButton("Stop")
self.stop_button.clicked.connect(self.stop_video)
self.slider = QSlider(Qt.Orientation.Horizontal)
self.slider.sliderMoved.connect(self.set_position)
self.media_player.setVideoOutput(self.video_widget)
self.media_player.positionChanged.connect(self.position_changed)
self.media_player.durationChanged.connect(self.duration_changed)
layout = QVBoxLayout()
layout.addWidget(self.video_widget)
layout.addWidget(self.start_button)
layout.addWidget(self.pause_button)
layout.addWidget(self.stop_button)
layout.addWidget(self.slider)
container = QWidget()
container.setLayout(layout)
self.setCentralWidget(container)
def start_video(self):
self.media_player.play()
def pause_video(self):
self.media_player.pause()
def stop_video(self):
self.media_player.stop()
def set_position(self, position):
self.media_player.setPosition(position)
def position_changed(self, position):
self.slider.setValue(position)
def duration_changed(self, duration):
self.slider.setRange(0, duration)
if __name__ == "__main__":
app = QApplication(sys.argv)
video_player = VideoPlayer()
video_player.show()
sys.exit(app.exec())
from manim-slides.
I got this to work with nixpkgs: NixOS/nixpkgs#298198
no problem using ffmpeg
with this env
nix-shell -p ffmpeg manim "python3.withPackages(ps: with ps; [ marimo manim-slides ])"
even got magics working in a new type of notebook:
https://static.marimo.app/static/manim-example-rket
from manim-slides.
So I am not sure to catch everything: is the original issue solved?
Nonetheless, I didn't know about the "new type of notebook" thing, and this might be nice to document it in the docs. Do you have some reference for this?
from manim-slides.
Nice!
Thanks for the link to Marimo's docs, I'll give it a look once I have some time :-)
from manim-slides.
nixos has now packaged manim-slides
, should be in cache and widely accessible in a few days
from manim-slides.
No problem! I will once this gets into unstable cache, this should then get officially supported in 24.05 (released sometime in May)
from manim-slides.
No problem! I will once this gets into unstable cache, this should then get officially supported in 24.05 (released sometime in May)
thanks!
from manim-slides.
Related Issues (20)
- [BUG] manim_slides giving qtpy.QtBindingsNotFoundError: No Qt bindings could be found error. HOT 13
- [BUG] Manim Slides Showing Black Screen Only HOT 7
- [DOC] Add a known / common issues page
- [CHORE] Update issues and PR templates
- [DOC] Add example gallery HOT 2
- Force re-render in manim-slides HOT 1
- [BUG] Background color is not correctly detected/used when using `manim-slides convert`
- [DOC] Add performance tips for large presentations
- [FEATURE] Drop opencv-python
- [BUG] Flickering at slide change for stand alone html HOT 4
- [BUG] Slides are shuffled when exporting mutliple files to revealjs format HOT 5
- [BUG] Non monotonically increasing dts HOT 5
- [BUG] 'OpenGLCamera' object has no attribute 'background_color' when rendering using manim.opengl HOT 2
- [BUG] Problem about Rust during installation. HOT 1
- [BUG] `utils.reverse_video_file` causes excessive RAM usage HOT 11
- [BUG] `manim-slides present` and `wizard` immediately crash HOT 10
- [FEATURE] Allow for waiting until loop is complete before switching slide HOT 4
- [FEATURE] Provide a `htmlzip` export format for zipped HTML
- [FEATURE] Add `--offline` option for HTML convert
- [FEATURE] Allow class-level configuration of slides rendering
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manim-slides.