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

extension does not recognize pixel_width, pixel_height properties #62

Closed LucasCarvalhodasSilva closed 1 year ago

LucasCarvalhodasSilva commented 1 year ago

I am rendering a video with pixel_height=1920 and pixel_width=1080 (which is not the default reselution). The output is saved by manim automatically in the directory ../1920p60 and not in ../1080p60.

The extension assumes the output directory is 1080p/60.

I use this configuration settings:

[CLI] frame_rate = 60 pixel_width = 1080 pixel_height = 1920

Here are some logs:

Output

Is there any solution to this?

PhilFreeman commented 1 year ago

Able to verify above as a bug.

If the resolution isn't specified in the config file, but the quality is, then the resolution and frame rate are defined by the quality. However if pixel_width, pixel_height, and frame_rate are defined in the config file (the default when using manim init project <project name>), then the output directory will be {pixel_height}p{frame_rate}, not the default quality value.

I tried to track down this bug in the source, but I don't know typescript to fix it. But, the method of relying on the quality key in the config file to indicate the folder name is definitely a bug. It should first try to use pixel_height and frame_rate.

Rickaym commented 1 year ago

This is expected behavior as the extension does not recognize--although manim itself does--the config keys pixel_height and pixel_width to determine the output quality folder.

A quick way to solve this issue is to set an obvious video_dir so that both the extension and manim agree on where the video is saved.

I.e.

[CLI]
frame_rate = 60 
pixel_width = 1080 
pixel_height = 1920
video_dir = {media_dir}/videos/{module_name}/1920p60

However, I will be committing a patch which will let the extension to recognize those keys for quality.

Rickaym commented 1 year ago

The commit e818529 addresses this issue.

Edit: Released in 99bfc57.

LucasCarvalhodasSilva commented 1 year ago

The commit e818529 addresses this issue.

Edit: Released in 99bfc57.

Would you mind explaining to me what to do in this situation? I still can't get the sideview to play the video.

Rickaym commented 1 year ago

The commit e818529 addresses this issue. Edit: Released in 99bfc57.

Would you mind explaining to me what to do in this situation? I still can't get the sideview to play the video.

What is the issue? It works fine on my end.

PhilFreeman commented 1 year ago

Works on my end now. Can't speak for @LucasCarvalhodaSilva. Thanks!

LucasCarvalhodasSilva commented 1 year ago

It works, my bad!