RenderKit
renderkit.api.processor.RenderKit
Main public API for image and video processing.
Source code in src/renderkit/api/processor.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
__init__()
Initialize RenderKit.
Source code in src/renderkit/api/processor.py
18 19 20 21 | |
convert_exr_sequence_to_mp4(input_pattern, output_path, prefetch_workers=1, fps=None, color_space_preset=ColorSpacePreset.LINEAR_TO_SRGB, width=None, height=None, codec='libx264', quality=10, layer=None, start_frame=None, end_frame=None, contact_sheet=False, contact_sheet_config=None)
Convert an EXR sequence to MP4 video.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_pattern
|
str
|
Input file pattern (e.g., "render.%04d.exr") |
required |
output_path
|
str
|
Output video file path |
required |
prefetch_workers
|
int
|
Number of concurrent frame reads (1 disables prefetch) |
1
|
fps
|
Optional[float]
|
Frame rate (optional, will try to auto-detect if not provided) |
None
|
color_space_preset
|
ColorSpacePreset
|
Color space conversion preset |
LINEAR_TO_SRGB
|
width
|
Optional[int]
|
Output width (optional, uses source width if not provided) |
None
|
height
|
Optional[int]
|
Output height (optional, uses source height if not provided) |
None
|
codec
|
str
|
Video codec (default: "libx264") |
'libx264'
|
quality
|
int
|
Video quality (0-10), 10 is best (default: 10) |
10
|
layer
|
Optional[str]
|
Optional EXR layer to extract (default: None) |
None
|
start_frame
|
Optional[int]
|
Start frame number (optional) |
None
|
end_frame
|
Optional[int]
|
End frame number (optional) |
None
|
Example
processor = RenderKit() processor.convert_exr_sequence_to_mp4( ... "render.%04d.exr", ... "output.mp4", ... fps=24.0, ... quality=10, ... layer="diffuse" ... )
Source code in src/renderkit/api/processor.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
convert_with_config(config)
Convert using a ConversionConfig object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
ConversionConfig
|
Conversion configuration object |
required |
Example
from renderkit.core.config import ConversionConfigBuilder config = ConversionConfigBuilder()\ ... .with_input_pattern("render.%04d.exr")\ ... .with_output_path("output.mp4")\ ... .with_fps(24.0)\ ... .build() processor = RenderKit() processor.convert_with_config(config)
Source code in src/renderkit/api/processor.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |