Closed MSameerAbbas closed 2 years ago
Hey, can you tell me if you were using a manim.cfg file or not?
Note: if you've changed this from the settings, this is going to be your default media directory
If you're not using a manim.cfg file, you have to edit the media directory, opening up the run time configurations menu:
F1 -> "Set A Configuration" (OR) ctrl + '
and then s
, then edit the Video Directory
section.
If your'e using the manim.cfg file, add an option for mediaDir.
No I wasn't using a manim.cfg file. I went to the vscode settings using the ctrl + ,
shortcut, and edited the Manim-sideview: Media Directory
from the default media
to the absolute path C:\Users\Sam\Desktop\VSCode\ManimCE\media
. I also tried changing the Manim-sideview: Video Directory
from the default media\videos\{module_name}\480p15
to the absolute path C:\Users\Sam\Desktop\VSCode\ManimCE\media\videos\{module_name}\480p15
. Idk if this is relevant, but my current VSCode workspace is a folder called VSCode (the one in the absolute paths above). Every time I run the extension, it creates a media folder containing the video output inside my VSCode folder, whereas I want it inside the ManimCE folder. Sorry if I said anything confusing or irrelevant. I'm a noob at computers lol
Ah, okay. If I understood you correctly, you want the video output to be in the absolute path.
The best way to do that as of right now is by making a configuration file in your working directory. Your workspace is let's say C:/Works/
you want to make the configuration file here C:/Works/manim.cfg
.
Inside the cfg file, make a CLI header and set the video dir inside there
Which should look like:
[CLI]
video_dir=C:\Users\Sam\Desktop\VSCode\ManimCE\videos\{module_name}\480p15
Restart your job or editor and then run it.
It worked, thanks !!
Hi, one more thing, every time I run the extension, an empty directory spawns in my workspace. Any way to fix that?
You can find all the configuration options here https://docs.manim.community/en/stable/tutorials/configuration.html#the-config-files
As for the empty folder, I need more context, what is it named? And also please paste the log you get when you run the extension
Thnx for the documentation :)
The empty folder is (which I just checked is apparently not completely empty) is named media
, and has a subfolder called images
, which itself has another (this time actually empty subfolder) called Scene2
(this happens to be the name of the python file I'm write my manim code in. The output log reads:
[Log] CWD : "c:\Users\Sam\Desktop\VSCode"
[Log] VDir: "C:\Users\Sam\Desktop\VSCode\ManimCE\media\videos\Scene2\1080p60"
[Log] Args: "c:\Users\Sam\Desktop\VSCode\ManimCE\Scene2.py" | "SquareToCircle"
[Log] Conf: true
[Running] IN : C:\Users\Sam\Desktop\VSCode\VenvManimCE\Scripts\manim.exe "c:\Users\Sam\Desktop\VSCode\ManimCE\Scene2.py" "SquareToCircle"
[Running] OUT : C:\Users\Sam\Desktop\VSCode\ManimCE\media\videos\Scene2\1080p60\SquareToCircle.mp4
Manim Community v0.13.1
Animation 0: Create(Square): 0%| | 0/60 [00:00<?, ?it/s]
Animation 0: Create(Square): 2%|1 | 1/60 [00:00<00:20, 2.88it/s]
Animation 0: Create(Square): 5%|5 | 3/60 [00:00<00:07, 7.59it/s]
Animation 0: Create(Square): 10%|# | 6/60 [00:00<00:04, 13.28it/s]
Animation 0: Create(Square): 15%|#5 | 9/60 [00:00<00:03, 16.52it/s]
Animation 0: Create(Square): 20%|## | 12/60 [00:00<00:02, 19.51it/s]
Animation 0: Create(Square): 25%|##5 | 15/60 [00:00<00:02, 20.95it/s]
Animation 0: Create(Square): 30%|### | 18/60 [00:01<00:01, 21.53it/s]
Animation 0: Create(Square): 35%|###5 | 21/60 [00:01<00:01, 21.67it/s]
Animation 0: Create(Square): 40%|#### | 24/60 [00:01<00:01, 21.89it/s]
Animation 0: Create(Square): 45%|####5 | 27/60 [00:01<00:01, 22.09it/s]
Animation 0: Create(Square): 50%|##### | 30/60 [00:01<00:01, 22.65it/s]
Animation 0: Create(Square): 55%|#####5 | 33/60 [00:01<00:01, 23.10it/s]
Animation 0: Create(Square): 60%|###### | 36/60 [00:01<00:01, 23.26it/s]
Animation 0: Create(Square): 65%|######5 | 39/60 [00:02<00:00, 21.08it/s]
Animation 0: Create(Square): 70%|####### | 42/60 [00:02<00:00, 20.03it/s]
Animation 0: Create(Square): 75%|#######5 | 45/60 [00:02<00:00, 18.74it/s]
Animation 0: Create(Square): 78%|#######8 | 47/60 [00:02<00:01, 12.80it/s]
Animation 0: Create(Square): 82%|########1 | 49/60 [00:02<00:00, 13.93it/s]
Animation 0: Create(Square): 85%|########5 | 51/60 [00:02<00:00, 15.02it/s]
Animation 0: Create(Square): 88%|########8 | 53/60 [00:03<00:00, 15.99it/s]
Animation 0: Create(Square): 93%|#########3| 56/60 [00:03<00:00, 17.32it/s]
Animation 0: Create(Square): 97%|#########6| 58/60 [00:03<00:00, 17.82it/s]
(process:572): GLib-GIO-WARNING **: 23:56:54.916: Unexpectedly, UWP app `Sketchbook.SketchbookPro_8.8.19.0_x64__k9x4nk31cvt0g' (AUMId `Sketchbook.SketchbookPro_k9x4nk31cvt0g!SketchBookPro') supports 10 extensions but has no verbs
[12/18/21 23:56:55] INFO Animation 0 : Partial scene_file_writer.py:514
movie file written in 'C:
\Users\Sam\Desktop\VSC
ode\ManimCE\media\videos\
Scene2\1080p60\partial_mo
vie_files\SquareToCircle\
2724823860_374588165_1793
580042.mp4'
[12/18/21 23:56:59] INFO Animation 1 : Partial scene_file_writer.py:514
movie file written in 'C:
\Users\Sam\Desktop\VSC
ode\ManimCE\media\videos\
Scene2\1080p60\partial_mo
vie_files\SquareToCircle\
1164547788_398514950_1259
83425.mp4'
Animation 2: ReplacementTransform(Square): 0%| | 0/60 [00:00<?, ?it/s]
Animation 2: ReplacementTransform(Square): 2%|1 | 1/60 [00:00<00:21, 2.76it/s]
Animation 2: ReplacementTransform(Square): 5%|5 | 3/60 [00:00<00:08, 7.08it/s]
Animation 2: ReplacementTransform(Square): 10%|# | 6/60 [00:00<00:04, 12.50it/s]
Animation 2: ReplacementTransform(Square): 15%|#5 | 9/60 [00:00<00:03, 16.48it/s]
Animation 2: ReplacementTransform(Square): 20%|## | 12/60 [00:00<00:02, 17.96it/s]
Animation 2: ReplacementTransform(Square): 25%|##5 | 15/60 [00:01<00:02, 18.78it/s]
Animation 2: ReplacementTransform(Square): 30%|### | 18/60 [00:01<00:02, 20.87it/s]
Animation 2: ReplacementTransform(Square): 35%|###5 | 21/60 [00:01<00:01, 22.91it/s]
Animation 2: ReplacementTransform(Square): 40%|#### | 24/60 [00:01<00:01, 24.46it/s]
Animation 2: ReplacementTransform(Square): 45%|####5 | 27/60 [00:01<00:01, 25.34it/s]
Animation 2: ReplacementTransform(Square): 50%|##### | 30/60 [00:01<00:01, 26.26it/s]
Animation 2: ReplacementTransform(Square): 55%|#####5 | 33/60 [00:01<00:01, 26.49it/s]
Animation 2: ReplacementTransform(Square): 60%|###### | 36/60 [00:01<00:00, 27.47it/s]
Animation 2: ReplacementTransform(Square): 67%|######6 | 40/60 [00:01<00:00, 29.93it/s]
Animation 2: ReplacementTransform(Square): 73%|#######3 | 44/60 [00:02<00:00, 30.77it/s]
Animation 2: ReplacementTransform(Square): 80%|######## | 48/60 [00:02<00:00, 22.66it/s]
Animation 2: ReplacementTransform(Square): 85%|########5 | 51/60 [00:02<00:00, 23.91it/s]
Animation 2: ReplacementTransform(Square): 90%|######### | 54/60 [00:02<00:00, 24.79it/s]
Animation 2: ReplacementTransform(Square): 95%|#########5| 57/60 [00:02<00:00, 25.10it/s]
Animation 2: ReplacementTransform(Square): 100%|##########| 60/60 [00:02<00:00, 25.01it/s]
[12/18/21 23:57:02] INFO Animation 2 : Partial scene_file_writer.py:514
movie file written in 'C:
\Users\Sam\Desktop\VSC
ode\ManimCE\media\videos\
Scene2\1080p60\partial_mo
vie_files\SquareToCircle\
1164547788_740733791_1331
664314.mp4'
[12/18/21 23:57:05] INFO Animation 3 : Partial scene_file_writer.py:514
movie file written in 'C:
\Users\Sam\Desktop\VSC
ode\ManimCE\media\videos\
Scene2\1080p60\partial_mo
vie_files\SquareToCircle\
1164547788_398514950_3565
471102.mp4'
INFO Combining to Movie file. scene_file_writer.py:608
INFO scene_file_writer.py:729
File ready at 'C:\Users\S
am\Desktop\VSCode\Mani
mCE\media\videos\Scene2\1
080p60\SquareToCircle.mp4
'
INFO Rendered SquareToCircle scene.py:237
Played 4 animations
[Done] returned code=0 in 21.194 seconds```
Ah that's because we've only changed the video directory and not the media directory that encompasses the video itself, naturally.
Must add a media_dir
option in your config file and set it to the media directory that's inside ManimCE.
Then delete the excess folder, and restart your job or your editor.
Thank you so much !!
Is there any way to output the log in the terminal instead of the output window?
Yes, it's currently being worked on with other few things, I've made a separate issue on this so that I can post an answer there once stable v0.0.13 which this will be in gets released.
For some reason my output keeps coming in the default media directory, despite me updating the sideview.mediaDirectory to be a subfolder of one of my folders with a different name