Skip to main content

Module render

Module render 

Source
Expand description

Frame rendering coordinator — sequential, parallel, and streaming pipeline modes.

§Render Modes

ModeI/OParallelismBest for
render_all_framesPNG files on diskSequentialDebugging, inspection
render_parallelPNG files on diskRayon (N cores)Large renders with disk I/O
render_to_ffmpeg_pipeFFmpeg stdinRayon + pipeFastest — zero PNG overhead

§Pipeline comparison

Sequential PNG:   [frame 0] → PNG → [frame 1] → PNG → … → FFmpeg
Parallel PNG:     [frame 0]
                  [frame 1]  (all at once, Rayon)
                  [frame 2] → disk → FFmpeg

Pipe (fastest):   bounded Rayon batch → ordered RGBA frames → FFmpeg → MP4
                  Zero disk I/O, zero PNG compression overhead

Structs§

NativeRenderConfig
Configuration for a native render job.
PipeConfig
Piped encoding configuration (no intermediate PNG files).
RenderCancellationToken
RenderControl
RenderProgress

Enums§

StillImageFormat
VideoCodec
Video codec used by the FFmpeg pipe encoder.

Functions§

build_pipe_ffmpeg_args
Build FFmpeg arguments for rawvideo stdin pipe and the selected codec.
render_all_frames
Render all frames sequentially to PNG files.
render_frame_timed
Render a single frame and return elapsed time (for benchmarking).
render_parallel
Render all frames in parallel using Rayon, then write PNGs.
render_still_fallible
Render one composition frame directly to PNG, JPEG, or WebP.
render_to_ffmpeg_pipe
Render frames in bounded parallel batches and stream raw RGBA to FFmpeg stdin.
render_to_ffmpeg_pipe_fallible
Fallible variant of render_to_ffmpeg_pipe.
save_frame
Save a single RgbaImage frame to disk.