This graph illustrates the structure and interactions within the 'File Output & Persistence' subsystem. The core functionality revolves around the `SceneFileWriter` which orchestrates the process of rendering animation frames and audio into various output file formats like video, GIF, and images. It manages file paths, synchronizes audio with video, and provides progress updates during the rendering process. The subsystem initializes output directories and audio handling, manages all output file paths, processes and adds audio segments, encodes video frames using FFmpeg, and finalizes the output by merging audio, saving the last frame, and displaying completion messages. It relies on various utility components for file operations, sound processing, and logging, and interacts with the Camera and Scene components to receive frame data and process the animation.
Components
FileWriterInitializer
Responsible for initializing the SceneFileWriter instance, setting up output directories, and preparing audio handling at the start of the file writing process.
OutputPathManager
Handles the generation and management of all output file paths for movies, images, and temporary partial movie files, ensuring proper directory existence and naming conventions.
AudioProcessor
Manages the creation, manipulation, and addition of audio segments, including loading sound files and overlaying them to be synchronized with the video output.
VideoEncoder
Responsible for opening and managing the video encoding process via an FFmpeg pipe, writing raw frame data, and handling temporary video files for both full and partial movies, as well as inserts.
OutputFinalizer
Orchestrates the finalization steps of the output process, including merging audio with video, saving the last frame as an image, displaying completion messages, and optionally opening the generated files.
ProgressDisplayManager
Provides functionality for updating and managing the progress display during video rendering, including setting descriptions and handling display updates.
FileOperationsUtility
Provides low-level file system operations like creating directories, checking existence, and moving/copying files.
Referenced Source Code
SoundProcessingUtility
Provides utilities for handling and processing audio, such as merging audio files.
Referenced Source Code
LoggingUtility
Handles logging messages and displaying information to the console.
Referenced Source Code
CameraComponent
Represents the camera system responsible for rendering the scene into individual frames.
Referenced Source Code
SceneComponent
Represents the main scene where animations are defined and rendered. SceneFileWriter operates on a Scene.