Interface CodecMetadata.Builder

  • Method Details

    • bitDepth

      CodecMetadata.Builder bitDepth(Integer bitDepth)
      The number of bits used per color component in the video essence such as 8, 10, or 12 bits. Standard range (SDR) video typically uses 8-bit, while 10-bit is common for high dynamic range (HDR).
      Parameters:
      bitDepth - The number of bits used per color component in the video essence such as 8, 10, or 12 bits. Standard range (SDR) video typically uses 8-bit, while 10-bit is common for high dynamic range (HDR).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • chromaSubsampling

      CodecMetadata.Builder chromaSubsampling(String chromaSubsampling)
      The chroma subsampling format used in the video encoding, such as "4:2:0" or "4:4:4". This describes how color information is sampled relative to brightness information. Different subsampling ratios affect video quality and file size, with "4:4:4" providing the highest color fidelity and "4:2:0" being most common for standard video.
      Parameters:
      chromaSubsampling - The chroma subsampling format used in the video encoding, such as "4:2:0" or "4:4:4". This describes how color information is sampled relative to brightness information. Different subsampling ratios affect video quality and file size, with "4:4:4" providing the highest color fidelity and "4:2:0" being most common for standard video.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • codedFrameRate

      CodecMetadata.Builder codedFrameRate(FrameRate codedFrameRate)
      The frame rate of the video or audio track, expressed as a fraction with numerator and denominator values.
      Parameters:
      codedFrameRate - The frame rate of the video or audio track, expressed as a fraction with numerator and denominator values.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • codedFrameRate

      default CodecMetadata.Builder codedFrameRate(Consumer<FrameRate.Builder> codedFrameRate)
      The frame rate of the video or audio track, expressed as a fraction with numerator and denominator values. This is a convenience method that creates an instance of the FrameRate.Builder avoiding the need to create one manually via FrameRate.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to codedFrameRate(FrameRate).

      Parameters:
      codedFrameRate - a consumer that will call methods on FrameRate.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • colorPrimaries

      CodecMetadata.Builder colorPrimaries(String colorPrimaries)
      The color space primaries of the video track, defining the red, green, and blue color coordinates used for the video. This information helps ensure accurate color reproduction during playback and transcoding.
      Parameters:
      colorPrimaries - The color space primaries of the video track, defining the red, green, and blue color coordinates used for the video. This information helps ensure accurate color reproduction during playback and transcoding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • colorPrimaries

      CodecMetadata.Builder colorPrimaries(ColorPrimaries colorPrimaries)
      The color space primaries of the video track, defining the red, green, and blue color coordinates used for the video. This information helps ensure accurate color reproduction during playback and transcoding.
      Parameters:
      colorPrimaries - The color space primaries of the video track, defining the red, green, and blue color coordinates used for the video. This information helps ensure accurate color reproduction during playback and transcoding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • contentLightLevel

      CodecMetadata.Builder contentLightLevel(ContentLightLevel contentLightLevel)
      Content light level information (CTA-861.3). Describes the light level characteristics of the content.
      Parameters:
      contentLightLevel - Content light level information (CTA-861.3). Describes the light level characteristics of the content.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contentLightLevel

      default CodecMetadata.Builder contentLightLevel(Consumer<ContentLightLevel.Builder> contentLightLevel)
      Content light level information (CTA-861.3). Describes the light level characteristics of the content. This is a convenience method that creates an instance of the ContentLightLevel.Builder avoiding the need to create one manually via ContentLightLevel.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to contentLightLevel(ContentLightLevel).

      Parameters:
      contentLightLevel - a consumer that will call methods on ContentLightLevel.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • displayAspectRatio

      CodecMetadata.Builder displayAspectRatio(AspectRatio displayAspectRatio)
      An aspect ratio expressed as a fraction with numerator and denominator values, reduced to lowest terms. Used for the sample (pixel) aspect ratio and the display aspect ratio of a video track. For example, a 720x576 anamorphic track has a sample aspect ratio of 64 / 45 and a display aspect ratio of 16 / 9. A video track can declare an aspect ratio in two independent places, and MediaConvert reports each one where it was found rather than choosing between them. The ratio declared by the container appears on the video track itself, and the ratio declared by the video essence appears under codecMetadata. When a file declares an aspect ratio in only one of the two places, the other is null; when it declares both and they disagree, you can compare them and decide which to use.
      Parameters:
      displayAspectRatio - An aspect ratio expressed as a fraction with numerator and denominator values, reduced to lowest terms. Used for the sample (pixel) aspect ratio and the display aspect ratio of a video track. For example, a 720x576 anamorphic track has a sample aspect ratio of 64 / 45 and a display aspect ratio of 16 / 9. A video track can declare an aspect ratio in two independent places, and MediaConvert reports each one where it was found rather than choosing between them. The ratio declared by the container appears on the video track itself, and the ratio declared by the video essence appears under codecMetadata. When a file declares an aspect ratio in only one of the two places, the other is null; when it declares both and they disagree, you can compare them and decide which to use.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • displayAspectRatio

      default CodecMetadata.Builder displayAspectRatio(Consumer<AspectRatio.Builder> displayAspectRatio)
      An aspect ratio expressed as a fraction with numerator and denominator values, reduced to lowest terms. Used for the sample (pixel) aspect ratio and the display aspect ratio of a video track. For example, a 720x576 anamorphic track has a sample aspect ratio of 64 / 45 and a display aspect ratio of 16 / 9. A video track can declare an aspect ratio in two independent places, and MediaConvert reports each one where it was found rather than choosing between them. The ratio declared by the container appears on the video track itself, and the ratio declared by the video essence appears under codecMetadata. When a file declares an aspect ratio in only one of the two places, the other is null; when it declares both and they disagree, you can compare them and decide which to use. This is a convenience method that creates an instance of the AspectRatio.Builder avoiding the need to create one manually via AspectRatio.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to displayAspectRatio(AspectRatio).

      Parameters:
      displayAspectRatio - a consumer that will call methods on AspectRatio.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • dolbyVision

      CodecMetadata.Builder dolbyVision(DolbyVisionMetadata dolbyVision)
      Dolby Vision characteristics of the video track: the profile and level, and whether the RPU (dynamic metadata), base layer, and enhancement layer are present. Use this to distinguish Dolby Vision content from standard HEVC and to choose your encoding or passthrough settings. Omitted when the content is not Dolby Vision.
      Parameters:
      dolbyVision - Dolby Vision characteristics of the video track: the profile and level, and whether the RPU (dynamic metadata), base layer, and enhancement layer are present. Use this to distinguish Dolby Vision content from standard HEVC and to choose your encoding or passthrough settings. Omitted when the content is not Dolby Vision.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dolbyVision

      default CodecMetadata.Builder dolbyVision(Consumer<DolbyVisionMetadata.Builder> dolbyVision)
      Dolby Vision characteristics of the video track: the profile and level, and whether the RPU (dynamic metadata), base layer, and enhancement layer are present. Use this to distinguish Dolby Vision content from standard HEVC and to choose your encoding or passthrough settings. Omitted when the content is not Dolby Vision. This is a convenience method that creates an instance of the DolbyVisionMetadata.Builder avoiding the need to create one manually via DolbyVisionMetadata.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to dolbyVision(DolbyVisionMetadata).

      Parameters:
      dolbyVision - a consumer that will call methods on DolbyVisionMetadata.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • fieldOrder

      CodecMetadata.Builder fieldOrder(String fieldOrder)
      The field order of interlaced video, which indicates whether the top or bottom field is displayed first. Use this to select the correct deinterlacing behavior. One of "TopFieldFirst" or "BottomFieldFirst". This field is present only for interlaced video; it is omitted for progressive video and when the field order is not indicated by the source.
      Parameters:
      fieldOrder - The field order of interlaced video, which indicates whether the top or bottom field is displayed first. Use this to select the correct deinterlacing behavior. One of "TopFieldFirst" or "BottomFieldFirst". This field is present only for interlaced video; it is omitted for progressive video and when the field order is not indicated by the source.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • hdr10PlusPresence

      CodecMetadata.Builder hdr10PlusPresence(String hdr10PlusPresence)
      Indicates that HDR10+ (SMPTE ST 2094-40) dynamic metadata was detected in the HEVC bitstream. Present only when detected.
      Parameters:
      hdr10PlusPresence - Indicates that HDR10+ (SMPTE ST 2094-40) dynamic metadata was detected in the HEVC bitstream. Present only when detected.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • hdr10PlusPresence

      CodecMetadata.Builder hdr10PlusPresence(Hdr10PlusPresence hdr10PlusPresence)
      Indicates that HDR10+ (SMPTE ST 2094-40) dynamic metadata was detected in the HEVC bitstream. Present only when detected.
      Parameters:
      hdr10PlusPresence - Indicates that HDR10+ (SMPTE ST 2094-40) dynamic metadata was detected in the HEVC bitstream. Present only when detected.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • height

      The height in pixels as coded by the codec. This represents the actual encoded video height as specified in the video stream headers.
      Parameters:
      height - The height in pixels as coded by the codec. This represents the actual encoded video height as specified in the video stream headers.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • level

      The codec level or tier that specifies the maximum processing requirements and capabilities. Levels define constraints such as maximum bit rate, frame rate, and resolution.
      Parameters:
      level - The codec level or tier that specifies the maximum processing requirements and capabilities. Levels define constraints such as maximum bit rate, frame rate, and resolution.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • matrixCoefficients

      CodecMetadata.Builder matrixCoefficients(String matrixCoefficients)
      The color space matrix coefficients of the video track, defining how RGB color values are converted to and from YUV color space. This affects color accuracy during encoding and decoding processes.
      Parameters:
      matrixCoefficients - The color space matrix coefficients of the video track, defining how RGB color values are converted to and from YUV color space. This affects color accuracy during encoding and decoding processes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • matrixCoefficients

      CodecMetadata.Builder matrixCoefficients(MatrixCoefficients matrixCoefficients)
      The color space matrix coefficients of the video track, defining how RGB color values are converted to and from YUV color space. This affects color accuracy during encoding and decoding processes.
      Parameters:
      matrixCoefficients - The color space matrix coefficients of the video track, defining how RGB color values are converted to and from YUV color space. This affects color accuracy during encoding and decoding processes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • profile

      CodecMetadata.Builder profile(String profile)
      The codec profile used to encode the video. Profiles define specific feature sets and capabilities within a codec standard. For example, H.264 profiles include Baseline, Main, and High, each supporting different encoding features and complexity levels.
      Parameters:
      profile - The codec profile used to encode the video. Profiles define specific feature sets and capabilities within a codec standard. For example, H.264 profiles include Baseline, Main, and High, each supporting different encoding features and complexity levels.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • rotation

      CodecMetadata.Builder rotation(Integer rotation)
      The clockwise rotation angle of the video, in degrees, as specified in the codec bitstream via a Display Orientation SEI message (payload type 47 for both H.264 and H.265). This field is null when the video essence does not contain a Display Orientation SEI message or when the rotation is 0 degrees.
      Parameters:
      rotation - The clockwise rotation angle of the video, in degrees, as specified in the codec bitstream via a Display Orientation SEI message (payload type 47 for both H.264 and H.265). This field is null when the video essence does not contain a Display Orientation SEI message or when the rotation is 0 degrees.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sampleAspectRatio

      CodecMetadata.Builder sampleAspectRatio(AspectRatio sampleAspectRatio)
      An aspect ratio expressed as a fraction with numerator and denominator values, reduced to lowest terms. Used for the sample (pixel) aspect ratio and the display aspect ratio of a video track. For example, a 720x576 anamorphic track has a sample aspect ratio of 64 / 45 and a display aspect ratio of 16 / 9. A video track can declare an aspect ratio in two independent places, and MediaConvert reports each one where it was found rather than choosing between them. The ratio declared by the container appears on the video track itself, and the ratio declared by the video essence appears under codecMetadata. When a file declares an aspect ratio in only one of the two places, the other is null; when it declares both and they disagree, you can compare them and decide which to use.
      Parameters:
      sampleAspectRatio - An aspect ratio expressed as a fraction with numerator and denominator values, reduced to lowest terms. Used for the sample (pixel) aspect ratio and the display aspect ratio of a video track. For example, a 720x576 anamorphic track has a sample aspect ratio of 64 / 45 and a display aspect ratio of 16 / 9. A video track can declare an aspect ratio in two independent places, and MediaConvert reports each one where it was found rather than choosing between them. The ratio declared by the container appears on the video track itself, and the ratio declared by the video essence appears under codecMetadata. When a file declares an aspect ratio in only one of the two places, the other is null; when it declares both and they disagree, you can compare them and decide which to use.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sampleAspectRatio

      default CodecMetadata.Builder sampleAspectRatio(Consumer<AspectRatio.Builder> sampleAspectRatio)
      An aspect ratio expressed as a fraction with numerator and denominator values, reduced to lowest terms. Used for the sample (pixel) aspect ratio and the display aspect ratio of a video track. For example, a 720x576 anamorphic track has a sample aspect ratio of 64 / 45 and a display aspect ratio of 16 / 9. A video track can declare an aspect ratio in two independent places, and MediaConvert reports each one where it was found rather than choosing between them. The ratio declared by the container appears on the video track itself, and the ratio declared by the video essence appears under codecMetadata. When a file declares an aspect ratio in only one of the two places, the other is null; when it declares both and they disagree, you can compare them and decide which to use. This is a convenience method that creates an instance of the AspectRatio.Builder avoiding the need to create one manually via AspectRatio.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to sampleAspectRatio(AspectRatio).

      Parameters:
      sampleAspectRatio - a consumer that will call methods on AspectRatio.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • scanType

      CodecMetadata.Builder scanType(String scanType)
      The scanning method specified in the video essence, indicating whether the video uses progressive or interlaced scanning.
      Parameters:
      scanType - The scanning method specified in the video essence, indicating whether the video uses progressive or interlaced scanning.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • transferCharacteristics

      CodecMetadata.Builder transferCharacteristics(String transferCharacteristics)
      The color space transfer characteristics of the video track, defining the relationship between linear light values and the encoded signal values. This affects brightness and contrast reproduction.
      Parameters:
      transferCharacteristics - The color space transfer characteristics of the video track, defining the relationship between linear light values and the encoded signal values. This affects brightness and contrast reproduction.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • transferCharacteristics

      CodecMetadata.Builder transferCharacteristics(TransferCharacteristics transferCharacteristics)
      The color space transfer characteristics of the video track, defining the relationship between linear light values and the encoded signal values. This affects brightness and contrast reproduction.
      Parameters:
      transferCharacteristics - The color space transfer characteristics of the video track, defining the relationship between linear light values and the encoded signal values. This affects brightness and contrast reproduction.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • width

      The width in pixels as coded by the codec. This represents the actual encoded video width as specified in the video stream headers.
      Parameters:
      width - The width in pixels as coded by the codec. This represents the actual encoded video width as specified in the video stream headers.
      Returns:
      Returns a reference to this object so that method calls can be chained together.