Inserting third-party mp4
content into manim-slides
#520
Replies: 1 comment
-
Hi @svandenhaute, no this is not possible yet. However, I have been thinking of such a feature for a long time, and I think this should be relatively easy to implement, especially if we only want to support adding Here is a suggested implementation (to be added to Manim Slides):
if pre_slide_config.base_slide_config.file is not None and pre_slide_config.start_animation != pre_slide_config.end_animation:
raise ValueError("A slide cannot have 'file=...' and more than zero animations at the same time.") see manim-slides/manim_slides/config.py Lines 243 to 262 in ef28230 3. Edit BaseSlide.next_slide 's docstring to include :param url: <...> .4. Edit BaseSlide.next_slide 's body to include a second if check statement:
# previous if ...
if base_slide_config.file is not None:
# TODO: add also wait between slides
self._slides.append(
PreSlideConfig.from_base_slide_config_and_animation_indices(
self._base_slide_config,
self._current_animation,
self._current_animation,
)
)
base_slide_config = BaseSlideConfig() # default
self._current_slide += 1 see manim-slides/manim_slides/slide/base.py Lines 447 to 462 in ef28230 5. Edit BaseSlide._save_slides to copy any video files using file into the assets folder and skip concatenation.
TODOs:
I don't have much time to implement this at the moment, so anyone if free to give it a try through a pull request! |
Beta Was this translation helpful? Give feedback.
-
Is it possible to insert external .mp4 video files into manim-slides? Given that manim-slides is "just" a triggered mp4 player, I am imagining that with some hacking I could get it to work, but I don't know where to start...
Beta Was this translation helpful? Give feedback.
All reactions