osolmaz / manim-euclid-elements

A video rendering of Euclid's Elements using Manim
MIT License
4 stars 1 forks source link

How do I get started? #2

Open AlanApter opened 7 months ago

AlanApter commented 7 months ago

I'm interested in translating these videos to foreign languages.

I installed manim, and ran the test the manim case, but it's not clear to me how to render a video in this project - which file is the entry point into the project? Let's say I wanted to generate a video for Book 1, Proposition 47 - how would I go about that?

AlanApter commented 7 months ago

I've managed to solve this. I installed manim, and the submodules, and added an azure key, and then it was:

python render_elements.py

Which is more obvious than I thought... However when I change the data in the submodules to a different language, I get:

Traceback (most recent call last): File "C:\Users\alana\manim-euclid-elements\render_elements.py", line 119, in s.render(preview=args.preview) File "C:\tools\Manim\Lib\site-packages\manim\scene\scene.py", line 223, in render self.construct() File "C:\Users\alana\manim-euclid-elements\proposition.py", line 657, in construct with self.voiceover(text=voiceover_txt) as tracker: File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 137, in enter return next(self.gen) ^^^^^^^^^^^^^^ File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\manim_voiceover\voiceover_scene.py", line 186, in voiceover yield self.add_voiceover_text(text, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\manim_voiceover\voiceover_scene.py", line 70, in add_voiceovertext tracker = VoiceoverTracker(self, dict, self.speech_service.cache_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\manim_voiceover\tracker.py", line 49, in init self.duration = get_duration(Path(cache_dir) / self.data["final_audio"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\manim_voiceover\modify_audio.py", line 22, in get_duration audio = MP3(path) ^^^^^^^^^ File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen_file.py", line 48, in init self.load(*args, *kwargs) File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen_util.py", line 156, in wrapper return func(self, h, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen\id3_file.py", line 420, in load self.info = self._Info(fileobj, offset) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen_util.py", line 185, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\alana\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen\mp3__init.py", line 401, in init__ raise HeaderNotFoundError("can't sync to MPEG frame") mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame

AlanApter commented 7 months ago

So it seems the above error was due to changing the amount of /n (I think).

However adding a single Hebrew character (e.g. ל) results in the following error:

Traceback (most recent call last): File "C:\Users\alana\manim-euclid-elements\render_elements.py", line 119, in s.render(preview=args.preview) File "C:\tools\Manim\Lib\site-packages\manim\scene\scene.py", line 223, in render self.construct() File "C:\Users\alana\manim-euclid-elements\proposition.py", line 772, in construct Tex( File "C:\tools\Manim\Lib\site-packages\manim\mobject\text\tex_mobject.py", line 443, in init super().init( File "C:\tools\Manim\Lib\site-packages\manim\mobject\text\tex_mobject.py", line 293, in init raise compilation_error File "C:\tools\Manim\Lib\site-packages\manim\mobject\text\tex_mobject.py", line 272, in init super().init( File "C:\tools\Manim\Lib\site-packages\manim\mobject\text\tex_mobject.py", line 81, in init file_name = tex_to_svg_file( ^^^^^^^^^^^^^^^^ File "C:\tools\Manim\Lib\site-packages\manim\utils\tex_file_writing.py", line 61, in tex_to_svg_file dvi_file = compile_tex( ^^^^^^^^^^^^ File "C:\tools\Manim\Lib\site-packages\manim\utils\tex_file_writing.py", line 211, in compile_tex raise ValueError( ValueError: latex error converting to dvi. See log output above or the log file: media\Tex\f4b7afe88a9102c7.log

I've attached the contents of f4b7afe88a9102c7.log.

f4b7afe88a9102c7.log