Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PowerPoint: Cannot Play Media #392

Open
jeertmans opened this issue Mar 17, 2024 · 7 comments
Open

[BUG] PowerPoint: Cannot Play Media #392

jeertmans opened this issue Mar 17, 2024 · 7 comments
Labels
bug Something isn't working pptx-convert Related to converting to PowerPoint slides waiting external Waiting for things that are external to Manim Slides (e.g., a feature on a dependency) windows Windows related

Comments

@jeertmans
Copy link
Owner

jeertmans commented Mar 17, 2024

TLDR: checkout #392 (comment) for a potential fix.


Description

After playing a few slides correctly, it looks like some media starts to bug / glitch / or just do not play.

One example is my EuCAP 2024 slides. Here, it starts to glitch on slide 30 (see screenshot below).

If you hide the slides before slide 30, or just start presenting on slide 30, the next slides display correctly. The bug does not seem to be caused by the use of PyAV or notes (relevant changes from since year), but rather because it seems to load all slides into memory, and it somehow takes too much space (?) at some point.

Slides with issue: https://github.com/jeertmans/jeertmans.github.io/blob/677c519d1867fa87720eee25821692465a3ba47c/assets/slides/2024-03-18-eucap-presentation.pptx

Lowered quality from full HD to HD, and this seems to have fixed the slides: https://github.com/jeertmans/jeertmans.github.io/blob/3fe208cbed7a44974a077423931cc37948f9fbe6/assets/slides/2024-03-18-eucap-presentation.pptx

This fix is not very nice because:

  1. I don't know if it works every time (e.g., on very large presentations I might need to lower the quality even more);
  2. Lowering the quality is not super nice.

Version

v5.1.3

Platform

Windows

Screenshots

image

Additional information

No response

@jeertmans jeertmans added bug Something isn't working pptx-convert Related to converting to PowerPoint slides windows Windows related labels Mar 17, 2024
@jeertmans
Copy link
Owner Author

@rwydaegh
Copy link

I encountered a similar issue when changing the device from having 16 GB of RAM to 8 GB. It didn't freeze but skips some animations and refuses to show others.

@jeertmans jeertmans added the waiting external Waiting for things that are external to Manim Slides (e.g., a feature on a dependency) label Jun 24, 2024
@jeertmans jeertmans pinned this issue Jul 18, 2024
@Azercoco
Copy link

Hi, I had the issue on several computer and disabling Power Point Hardware/GPU accelaration in presentation mode (as advised here ) did solve the issue.

Also, I never had the issue on my personal laptop but it does not have a GPU.

@rwydaegh
Copy link

This also fixes the issue for me, thanks. This fix could be mentioned in the Readme file, but it certainly not ideal because when the presenters delivers the presentation on a different laptop (e.g. at a conference as I had), he/she should be remember to turn this setting on before the presentation and off afterwards.

@jeertmans
Copy link
Owner Author

Hi, I had the issue on several computer and disabling Power Point Hardware/GPU accelaration in presentation mode (as advised here ) did solve the issue.

Also, I never had the issue on my personal laptop but it does not have a GPU.

Good to know, thanks @Azercoco! Is it a real fix, or does it just postpone the issue to even larger presentations, as we usually have more standard RAM available than on GPUs?
Also, when I did my tests, it appeared it was my usual RAM that was getting filled, not the one from my GPU.

The best would be to test your suggested fix on a very large number of media, and see if it still holds.

Anyway, I think it is worth being documented somewhere in Manim Slides’ docs!

@Azercoco
Copy link

Good to know, thanks @Azercoco! Is it a real fix, or does it just postpone the issue to even larger presentations, as we usually have more standard RAM available than on GPUs?

I don't really know. My presentation worked fine for a total of 4 min of animation in full HD on 16GB of RAM.

jeertmans added a commit that referenced this issue Sep 24, 2024
* chore(docs): document new potential fix for PPTX

Ref: #392 (comment).

* chore(fmt): auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@jeertmans
Copy link
Owner Author

So I have tested locally, with the below script, and while it seems that PowerPoint keeps using more and more RAM, at least it does not break when it reaches the limit of available RAM, and still manages to play the animations correctly. I could both play all slides in HD and 4K on my computer. The 4K presentation eats all my RAM, but still plays fine.

#475 added some notes about this in the FAQ.

import random

from manim import *

from manim_slides import Slide


class Test(Slide):
    def construct(self):
        circle = Dot(radius=1, color=BLUE)
        slide_number = Integer(0, mob_class=Text).to_corner(DL)
        self.add(circle)
        self.add(slide_number)

        random.seed(1234)

        for i in range(100):
            self.next_slide()
            radius = random.random() + 0.5
            scale = radius / circle.radius
            color = ManimColor.from_rgb(
                (random.random(), random.random(), random.random())
            )
            slide_number.set_value(i + 1)
            self.play(circle.animate.scale(scale).set_color(color))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pptx-convert Related to converting to PowerPoint slides waiting external Waiting for things that are external to Manim Slides (e.g., a feature on a dependency) windows Windows related
Projects
None yet
Development

No branches or pull requests

3 participants