Rickaym / manim-sideview

A Manim utility extension for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=Rickaym.manim-sideview
MIT License
99 stars 11 forks source link

Issue when not using high quality #25

Closed ksthicke closed 1 year ago

ksthicke commented 1 year ago

The extension does not show the file when I'm not rendering in high quality. In particular, if I render in low quality (with the command line argument -ql in the Manim Sideview settings), then I get the following error:

ERROR: Manim Sideview: Estimated output file does not exist at "s:\Math\Manim\Vector Calculus\media\videos\nice_3d_plot\1080p60\Nice3DPlot.mp4" Make sure that the designated video directories are reflected in the extension log.

The extension seems to only want to play the file in the 1080p60 folder, no matter what quality I render as. If I have previously rendered a high quality version, then whenever I run the extension, it only runs the output from that previous high quality render.

This seems to be a new issue in the most recent version of the extension. I am not using a config file for Manim.

Log file:

[10/9/2022 17:51] INFO: Activating extension. [10/9/2022 17:51] INFO: Loading globals. [10/9/2022 17:51] INFO: Loaded all resource paths. [10/9/2022 17:51] INFO: Successfully loaded all globals. [10/9/2022 17:51] INFO: Activated extension. [10/9/2022 17:51] INFO: Asking user for the new scene name. [10/9/2022 17:51] INFO: Creating a new configuration for file at path s:\Math\Manim\Vector Calculus\nice_3d_plot.py [10/9/2022 17:51] INFO: Attempting to render via the running configuration { "srcRootFolder": "s:\Math\Manim\Vector Calculus\", "srcPath": "s:\Math\Manim\Vector Calculus\nice_3d_plot.py", "moduleName": "nice_3d_plot", "isUsingCfgFile": false, "manimConfig": { "media_dir": "media", "video_dir": "{media_dir}/videos/{module_name}/{quality}", "images_dir": "{media_dir}/images/{module_name}", "quality": "high_quality", "image_name": "{scenename}{version}{extension}", "quality_map": { "fourk_quality": "2160p60", "production_quality": "1440p60", "high_quality": "1080p60", "medium_quality": "720p30", "low_quality": "480p15", "example_quality": "480p30" } }, "document": { "uri": { "$mid": 1, "fsPath": "s:\Math\Manim\Vector Calculus\nice_3d_plot.py", "_sep": 1, "external": "file:///s%3A/Math/Manim/Vector%20Calculus/nice_3d_plot.py", "path": "/s:/Math/Manim/Vector Calculus/nice_3d_plot.py", "scheme": "file" }, "fileName": "s:\Math\Manim\Vector Calculus\nice_3d_plot.py", "isUntitled": false, "languageId": "python", "version": 1, "isClosed": false, "isDirty": false, "eol": 2, "lineCount": 102 }, "sceneName": "Nice3DPlot" }, { "predictedVideoOutputPath": media\videos\nice_3d_plot\1080p60\Nice3DPlot.mp4, "predictedImageOutputPath": media\images\nice_3d_plot\ManimCE_v0.16.0.post0 } [10/9/2022 17:51] INFO: [10688] Spawned a new process for command execution. [10/9/2022 17:52] INFO: [10688] Relaying stdout output "Manim Community " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "v0.16.0.post0\n\n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "[10/09/22 17:52:23] INFO\t Animation " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "0 : Using cached\tcairo_renderer.py:75\n\t\t\t\t\t\t\t data (hash : 4239883951_28100\t\t\t\t\t \n\t\t\t\t\t\t\t 67070_223132457)\t\t\t\t\t\t\t\t \n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "[10/09/22 17:52:24] " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "INFO\t Animation 1 : Using cached\tcairo_renderer.py:75\n\t\t\t\t\t\t\t data (hash : 1131390362_13293\t\t\t\t\t " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "\n\t\t\t\t\t\t\t 14881_2271290059)\t\t\t\t\t\t\t\t " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "\n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "[10/09/22 17:52:27]" [10/9/2022 17:52] INFO: [10688] Relaying stdout output " INFO\t Animation 2 : Using cached\tcairo_renderer.py:75\n\t\t\t\t\t\t\t data (hash : 1131390362_15174 " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "\t\t\t\t\t\n\t\t\t\t\t\t\t 15262_537239083)\t\t\t " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "\t\t\t\t\t\n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "[10/09/22 17:52:31] INFO\t " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "Animation 3 : Using cached\tcairo_renderer.py:" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "75\n\t\t\t\t\t\t\t data (hash : 1512480823_42601\t\t\t\t\t \n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "\t\t\t\t\t\t\t 22064_2411084731)\t\t\t\t\t\t\t\t \n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "[10/09/22 17:52:32]" [10/9/2022 17:52] INFO: [10688] Relaying stdout output " INFO\t Combining to Movie file. scene_file_writer.py:607\n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "\t\t\t\t\t" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "INFO\t\t\t\t\t\t\t scene_file_writer.py:728\n\t\t\t\t\t\t\t File ready at\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t 'S:\Math\Manim\Vector Cal\t\t\t\t\t\t \n\t\t\t\t\t\t\t " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "culus\media\videos\nice_3\t\t\t\t\t\t \n\t\t\t\t\t\t\t d_plot\480p15\Nice3DPlot.\t\t\t\t\t\t \n\t\t\t\t\t\t\t mp4'\t\t\t\t\t\t\t\t\t\t\t \n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "\t\t\t\t\t" [10/9/2022 17:52] INFO: [10688] Relaying stdout output "INFO\t Rendered Nice3DPlot\t\t\t\t scene.py:240\n\t\t\t\t\t\t\t Played " [10/9/2022 17:52] INFO: [10688] Relaying stdout output "4 animations\t\t\t\t\t\t\t \n" [10/9/2022 17:52] INFO: [10688] Execution returned code=0 in 36.834 seconds
[10/9/2022 17:52] INFO: [10688] Video output detected. [10/9/2022 17:52] ERROR: Manim Sideview: Estimated output file does not exist at "s:\Math\Manim\Vector Calculus\media\videos\nice_3d_plot\1080p60\Nice3DPlot.mp4" Make sure that the designated video directories are reflected in the extension log.

lbirkert commented 1 year ago

You shouldn't use the command line settings to provide the quality settings but rather the manim.cfg

lbirkert commented 1 year ago

https://www.youtube.com/watch?v=sFpFlMEu7OY

This video explains manim sv very well.

Rickaym commented 1 year ago

Hey, Please consider watching the YouTube video KekOnTheWorld linked above. And also, is there a specific reason as to why you're using the CLI args configuration to set the render quality?

It should be noted that CLI args provided in the settings are globally used, this means whenever manim sideview calls for rendering a scene, all arguments set in the CLI settings are always passed through. (this means if you put it as -ql in the CLI args section, that will affect all renders) People often do not want this to happen, but rather just to change the current render resolution--which is done through a manim.cfg file.

I suppose we could transform this into a feature request for accepting quality changes and so on through the CLI args, but I'd like to hear if you have any other reason than the ones I've mentioned above for configuring quality this way!

Ricky.

lbirkert commented 1 year ago

A solution would also be to switch to using a global manim.cf. It should be noted, that we could also just transform these settings into vscode's builtin settings system (which can also handle local config files provided in .vscode/settings.json).

ksthicke commented 1 year ago

Thank you for the replies. The configuration file works fine for me. I had simply never used it before for Manim (I'm pretty new to Manim).