unreal.MediaCaptureOptions

class unreal.MediaCaptureOptions(overrun_action: MediaCaptureOverrunAction = Ellipsis, crop: MediaCaptureCroppingType = Ellipsis, custom_capture_point: IntPoint = Ellipsis, resize_source_buffer: bool = False, skip_frame_when_running_expensive_tasks: bool = False, convert_to_desired_pixel_format: bool = False, force_alpha_to_one_on_conversion: bool = False, apply_linear_to_srgb_conversion: bool = False, autostop_on_capture: bool = False, number_of_frames_to_capture: int = 0)

Bases: StructBase

Base class of additional data that can be stored for each requested capture.

C++ Source:

  • Plugin: MediaIOFramework

  • Module: MediaIOCore

  • File: MediaCapture.h

Editor Properties: (see get_editor_property/set_editor_property)

  • apply_linear_to_srgb_conversion (bool): [Read-Write] Apply Linear to SRGBConversion: Whether to apply a linear to sRGB conversion to the texture before outputting.

  • autostop_on_capture (bool): [Read-Write] Autostop on Capture: Automatically stop capturing after a predetermined number of images.

  • convert_to_desired_pixel_format (bool): [Read-Write] Convert to Desired Pixel Format: Allows to enable/disable pixel format conversion for the cases where render target is not of the desired pixel format.

  • crop (MediaCaptureCroppingType): [Read-Write] Crop: Crop the captured SceneViewport or TextureRenderTarget2D to the desired size.

  • custom_capture_point (IntPoint): [Read-Write] Custom Capture Point: Crop the captured SceneViewport or TextureRenderTarget2D to the desired size. note: Only valid when Crop is set to Custom.

  • force_alpha_to_one_on_conversion (bool): [Read-Write] Force Alpha to One on Conversion: In some cases when we want to stream irregular render targets containing limited number of channels (for example RG16f), we would like to force Alpha to 1.

  • number_of_frames_to_capture (int32): [Read-Write] Number Of Frames to Capture: The number of images to capture

  • overrun_action (MediaCaptureOverrunAction): [Read-Write] Overrun Action: Action to do when game thread overruns render thread and all frames are in flights being captured / readback.

  • resize_source_buffer (bool): [Read-Write] Resize Source Buffer: When the capture start, resize the source buffer to the desired size. note: Only valid when a size is specified by the MediaOutput. note: For viewport, the window size will not change. Only the viewport will be resized. note: For RenderTarget, the asset will be modified and resized to the desired size. note: Not valid for immediate capture of RHI resource

  • skip_frame_when_running_expensive_tasks (bool): [Read-Write] Skip Frame when Running Expensive Tasks: When the application enters responsive mode, skip the frame capture. The application can enter responsive mode on mouse down, viewport resize, … That is to ensure responsiveness in low FPS situations.

property apply_linear_to_srgb_conversion: bool

[Read-Write] Apply Linear to SRGBConversion: Whether to apply a linear to sRGB conversion to the texture before outputting.

Type:

(bool)

property autostop_on_capture: bool

[Read-Write] Autostop on Capture: Automatically stop capturing after a predetermined number of images.

Type:

(bool)

property convert_to_desired_pixel_format: bool

[Read-Write] Convert to Desired Pixel Format: Allows to enable/disable pixel format conversion for the cases where render target is not of the desired pixel format.

Type:

(bool)

property crop: MediaCaptureCroppingType

[Read-Write] Crop: Crop the captured SceneViewport or TextureRenderTarget2D to the desired size.

Type:

(MediaCaptureCroppingType)

property custom_capture_point: IntPoint

[Read-Write] Custom Capture Point: Crop the captured SceneViewport or TextureRenderTarget2D to the desired size. note: Only valid when Crop is set to Custom.

Type:

(IntPoint)

property force_alpha_to_one_on_conversion: bool

[Read-Write] Force Alpha to One on Conversion: In some cases when we want to stream irregular render targets containing limited number of channels (for example RG16f), we would like to force Alpha to 1.

Type:

(bool)

property number_of_frames_to_capture: int

[Read-Write] Number Of Frames to Capture: The number of images to capture

Type:

(int32)

property overrun_action: MediaCaptureOverrunAction

[Read-Write] Overrun Action: Action to do when game thread overruns render thread and all frames are in flights being captured / readback.

Type:

(MediaCaptureOverrunAction)

property resize_source_buffer: bool

[Read-Write] Resize Source Buffer: When the capture start, resize the source buffer to the desired size. note: Only valid when a size is specified by the MediaOutput. note: For viewport, the window size will not change. Only the viewport will be resized. note: For RenderTarget, the asset will be modified and resized to the desired size. note: Not valid for immediate capture of RHI resource

Type:

(bool)

property skip_frame_when_running_expensive_tasks: bool

[Read-Write] Skip Frame when Running Expensive Tasks: When the application enters responsive mode, skip the frame capture. The application can enter responsive mode on mouse down, viewport resize, … That is to ensure responsiveness in low FPS situations.

Type:

(bool)