unreal.MovieGraphMP4EncoderNode

class unreal.MovieGraphMP4EncoderNode(outer: Object | None = None, name: Name | str = 'None')

Bases: MovieGraphVideoOutputNode

A node which can output H264 mp4 files.

C++ Source:

  • Plugin: MovieRenderPipeline

  • Module: MovieRenderPipelineMP4Encoder

  • File: MovieGraphMP4EncoderNode.h

Editor Properties: (see get_editor_property/set_editor_property)

  • average_bitrate_in_mbps (float): [Read-Write] What is the average bitrate the encoder should target per second? Value is in Megabits per Second, so a value of 8 will become 8192Kbps (kilobits per second). Higher resolutions and higher framerates need higher bitrates, reasonable starting values are 8 for 1080p30, 45 for 4k.

    Only applies to encoding modes not related to Quality.

  • burn_in_class (SoftClassPath): [Read-Write] The widget that the burn-in should use.

  • burn_in_file_name_format (str): [Read-Write] The file name format used for writing out the burn-in video (if not composited).

  • composite_onto_final_image (bool): [Read-Write] If true, the burn-in that’s generated will be composited onto this output. Otherwise, the burn-in will be written to a different file.

  • constant_rate_factor (int32): [Read-Write] What is the Constant Rate Factor (CRF) when targeting a specific quality. Values of 17-18 are generally considered perceptually lossless, while higher values produce smaller files with lower quality results. There is an absolute maximum value range of [16-51], where 16 is the highest quality possible and 51 is the lowest quality. This scale is logarithmic, so small changes can result in large differences in quality, and filesize cost.

    Only applies to Quality encoding rate control mode.

  • dynamic_properties (InstancedPropertyBag): [Read-Write] Properties which can be dynamically declared on the node (vs. native properties which are always present).

  • enable_burn_in (bool): [Read-Write] If true, this output node will also generate a burn-in.

  • encoding_level (MoviePipelineMP4EncodeLevel): [Read-Write] A higher encode level generally results in a better quality video for the same bitrate, but may not be supported for playback on old devices. Auto will let the encoder automatically select the best level given the resolution, profile, and bitrate.

    Not exposed to the UI because it is expected most users do not need to change this, but is still available to be scripted.

  • encoding_profile (MoviePipelineMP4EncodeProfile): [Read-Write] A higher profile generally results in a better quality video for the same bitrate, but may not be supported for playback on old devices.

    Not exposed to the UI because it is expected most users do not need to change this, but is still available to be scripted.

  • encoding_rate_control (MoviePipelineMP4EncodeRateControlMode): [Read-Write] Specifies the bitrate control method used by the encoder. Quality lets the user target a given quality without concern to the filesize, while Variable targets an average bit rate per frame.

  • file_name_format (str): [Read-Write] What format string should the final files use? Can include folder prefixes, and format string ({shot_name}, etc.)

  • include_audio (bool): [Read-Write] If true, audio will be included in the video file.

  • max_bitrate_in_mbps (float): [Read-Write] When using VariableBitRate_Constrained, what is the maximum bitrate that the encoder can briefly use for more complex scenes, while still trying to maintain the average set in AverageBitrateInMbps. In theory the maximum should be twice the average, but often in practice a smaller difference of 3-6Mbps is sufficient.

    Only applies to constrained max bit rate.

    Not exposed to the UI because it is expected most users do not need to change this, but is still available to be scripted.

  • ocio_configuration (OpenColorIODisplayConfiguration): [Read-Write] OCIO configuration/transform settings.

    Note: There are differences from the previous implementation in MRQ given that we are now doing CPU-side processing. 1) This feature only works on desktop platforms when the OpenColorIO library is available. 2) Users are now responsible for setting the renderer output space to Final Color (HDR) in Linear Working Color Space (SCS_FinalColorHDR) by

    disabling the Tone Curve setting on the renderer node.

  • ocio_context (Map[str, str]): [Read-Write] OCIO context of key-value string pairs, typically used to apply shot-specific looks (such as a CDL color correction, or a 1D grade LUT).

    Notes: 1) If a configuration asset base context was set, it remains active but can be overridden here with new key-values. 2) Format tokens such as {shot_name} are supported and will get resolved before submission.

  • override_average_bitrate_in_mbps (bool): [Read-Write]

  • override_b_composite_onto_final_image (bool): [Read-Write]

  • override_b_enable_burn_in (bool): [Read-Write]

  • override_b_include_audio (bool): [Read-Write]

  • override_burn_in_class (bool): [Read-Write]

  • override_burn_in_file_name_format (bool): [Read-Write]

  • override_constant_rate_factor (bool): [Read-Write]

  • override_encoding_level (bool): [Read-Write]

  • override_encoding_profile (bool): [Read-Write]

  • override_encoding_rate_control (bool): [Read-Write]

  • override_file_name_format (bool): [Read-Write]

  • override_max_bitrate_in_mbps (bool): [Read-Write]

  • override_ocio_configuration (bool): [Read-Write]

  • override_ocio_context (bool): [Read-Write]

  • script_tags (Array[str]): [Read-Write] Tags that can be used to identify this node within a pre/post render script. Tags can be unique in order to identify this specific node, or the same tag can be applied to multiple nodes in order to identify a grouping of nodes.

property average_bitrate_in_mbps: float

[Read-Write] What is the average bitrate the encoder should target per second? Value is in Megabits per Second, so a value of 8 will become 8192Kbps (kilobits per second). Higher resolutions and higher framerates need higher bitrates, reasonable starting values are 8 for 1080p30, 45 for 4k.

Only applies to encoding modes not related to Quality.

Type:

(float)

property burn_in_class: SoftClassPath

[Read-Write] The widget that the burn-in should use.

Type:

(SoftClassPath)

property burn_in_file_name_format: str

[Read-Write] The file name format used for writing out the burn-in video (if not composited).

Type:

(str)

property composite_onto_final_image: bool

[Read-Write] If true, the burn-in that’s generated will be composited onto this output. Otherwise, the burn-in will be written to a different file.

Type:

(bool)

property constant_rate_factor: int

[Read-Write] What is the Constant Rate Factor (CRF) when targeting a specific quality. Values of 17-18 are generally considered perceptually lossless, while higher values produce smaller files with lower quality results. There is an absolute maximum value range of [16-51], where 16 is the highest quality possible and 51 is the lowest quality. This scale is logarithmic, so small changes can result in large differences in quality, and filesize cost.

Only applies to Quality encoding rate control mode.

Type:

(int32)

property enable_burn_in: bool

[Read-Write] If true, this output node will also generate a burn-in.

Type:

(bool)

property encoding_level: MoviePipelineMP4EncodeLevel

[Read-Write] A higher encode level generally results in a better quality video for the same bitrate, but may not be supported for playback on old devices. Auto will let the encoder automatically select the best level given the resolution, profile, and bitrate.

Not exposed to the UI because it is expected most users do not need to change this, but is still available to be scripted.

Type:

(MoviePipelineMP4EncodeLevel)

property encoding_profile: MoviePipelineMP4EncodeProfile

[Read-Write] A higher profile generally results in a better quality video for the same bitrate, but may not be supported for playback on old devices.

Not exposed to the UI because it is expected most users do not need to change this, but is still available to be scripted.

Type:

(MoviePipelineMP4EncodeProfile)

property encoding_rate_control: MoviePipelineMP4EncodeRateControlMode

[Read-Write] Specifies the bitrate control method used by the encoder. Quality lets the user target a given quality without concern to the filesize, while Variable targets an average bit rate per frame.

Type:

(MoviePipelineMP4EncodeRateControlMode)

property include_audio: bool

[Read-Write] If true, audio will be included in the video file.

Type:

(bool)

inject_nodes_post_evaluation(branch_name, evaluated_config) Array[MovieGraphSettingNode]

Injects nodes into the EVALUATED graph. Called on the fully evaluated node. All new nodes should be outered to InEvaluatedConfig. Because these nodes are injected post-evaluation, the movie pipeline will be immediately shut down if any of the returned nodes already exist in the branch (having two nodes of the same type in the same branch post-evaluation is not allowed). Note that modifying the Globals branch is not typically advised because at this stage, it has already been merged into all other branches.

Parameters:
Returns:

out_injected_nodes (Array[MovieGraphSettingNode]):

Return type:

Array[MovieGraphSettingNode]

property max_bitrate_in_mbps: float

[Read-Write] When using VariableBitRate_Constrained, what is the maximum bitrate that the encoder can briefly use for more complex scenes, while still trying to maintain the average set in AverageBitrateInMbps. In theory the maximum should be twice the average, but often in practice a smaller difference of 3-6Mbps is sufficient.

Only applies to constrained max bit rate.

Not exposed to the UI because it is expected most users do not need to change this, but is still available to be scripted.

Type:

(float)

property ocio_configuration: OpenColorIODisplayConfiguration

[Read-Write] OCIO configuration/transform settings.

Note: There are differences from the previous implementation in MRQ given that we are now doing CPU-side processing. 1) This feature only works on desktop platforms when the OpenColorIO library is available. 2) Users are now responsible for setting the renderer output space to Final Color (HDR) in Linear Working Color Space (SCS_FinalColorHDR) by

disabling the Tone Curve setting on the renderer node.

Type:

(OpenColorIODisplayConfiguration)

property ocio_context: None

[Read-Write] OCIO context of key-value string pairs, typically used to apply shot-specific looks (such as a CDL color correction, or a 1D grade LUT).

Notes: 1) If a configuration asset base context was set, it remains active but can be overridden here with new key-values. 2) Format tokens such as {shot_name} are supported and will get resolved before submission.

Type:

(Map[str, str])

property override_average_bitrate_in_mbps: bool

[Read-Write]

Type:

(bool)

property override_b_composite_onto_final_image: bool

[Read-Write]

Type:

(bool)

property override_b_enable_burn_in: bool

[Read-Write]

Type:

(bool)

property override_b_include_audio: bool

[Read-Write]

Type:

(bool)

property override_burn_in_class: bool

[Read-Write]

Type:

(bool)

property override_burn_in_file_name_format: bool

[Read-Write]

Type:

(bool)

property override_constant_rate_factor: bool

[Read-Write]

Type:

(bool)

property override_encoding_level: bool

[Read-Write]

Type:

(bool)

property override_encoding_profile: bool

[Read-Write]

Type:

(bool)

property override_encoding_rate_control: bool

[Read-Write]

Type:

(bool)

property override_max_bitrate_in_mbps: bool

[Read-Write]

Type:

(bool)

property override_ocio_configuration: bool

[Read-Write]

Type:

(bool)

property override_ocio_context: bool

[Read-Write]

Type:

(bool)