Skip to content

Refactor: media output path resolution + removal of --custom_folders CLI flag and config option - #4969

Open
behackl wants to merge 26 commits into
ManimCommunity:mainfrom
behackl:refactor/media-layout-output-plan
Open

Refactor: media output path resolution + removal of --custom_folders CLI flag and config option#4969
behackl wants to merge 26 commits into
ManimCommunity:mainfrom
behackl:refactor/media-layout-output-plan

Conversation

@behackl

@behackl behackl commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Stacked on #4966, actual diff: behackl/manim@refactor/output-session-config...refactor/media-layout-output-plan

This moves media layout and output-path decisions out of SceneFileWriter. Each scene now resolves one immutable OutputPlan before renderer initialization, covering the primary artifact, fallback PNG, image sequence, silent segment cache, sections, subtitles, and concat manifest.

The writer receives this plan explicitly and creates directories only when an operation actually writes to them. File-log path setup also moves out of the writer.

Behavior changes

  • --output_file is accepted only when rendering exactly one scene. Combining it with --write_all or multiple selected scenes now fails clearly.
  • The resolved format supplies the final suffix without replacing user-provided suffixes: movie.mp4 remains movie.mp4, while movie.mov with MP4 output becomes movie.mov.mp4.
  • Nested or absolute output names can relocate the primary artifact without moving section or cache output outside their configured directories.
  • --custom_folders, config.custom_folders, and the [custom_folders] preset are removed. Configure the existing media_dir, video_dir, images_dir, sections_dir, partial_movie_dir, and related options directly instead.
  • Custom SceneFileWriter implementations must accept the new explicit output_plan argument.

This does not change codecs, encoder settings, cache identity, audio handling, or render scheduling. Those remain follow-up work once the writer has been detached from renderer and global configuration state.

@behackl behackl added refactor Refactor or redesign of existing code breaking changes This PR introduces breaking changes labels Aug 28, 2026
Comment thread manim/_config/output_plan.py Dismissed
Comment thread manim/utils/docbuild/manim_directive.py Fixed
behackl and others added 7 commits August 28, 2026 23:38
Co-authored-by: nikolajmunk <28557236+nikolajmunk@users.noreply.github.com>
…out-output-plan

# Conflicts:
#	docs/source/guides/deep_dive.rst
#	tests/test_scene_rendering/opengl/test_cli_flags_opengl.py
#	tests/test_scene_rendering/test_file_writer.py
@behackl

behackl commented Aug 29, 2026

Copy link
Copy Markdown
Member Author

Improved documentation etc. in the same spirit as #4966 in the latest commits; also merged the newer version of this PR into here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changes This PR introduces breaking changes refactor Refactor or redesign of existing code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants