Class: AWSCDK::MediaLive::CfnChannel::Mpeg2SettingsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
media_live/cfn_channel.rb

Overview

The settings for the MPEG-2 codec in the output.

The parent of this entity is VideoCodecSetting.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(adaptive_quantization: nil, afd_signaling: nil, color_metadata: nil, color_space: nil, display_aspect_ratio: nil, filter_settings: nil, fixed_afd: nil, framerate_denominator: nil, framerate_numerator: nil, gop_closed_cadence: nil, gop_num_b_frames: nil, gop_size: nil, gop_size_units: nil, scan_type: nil, subgop_length: nil, timecode_burnin_settings: nil, timecode_insertion: nil) ⇒ Mpeg2SettingsProperty

Returns a new instance of Mpeg2SettingsProperty.

Parameters:

  • adaptive_quantization (String, nil) (defaults to: nil)

    Choose Off to disable adaptive quantization.

  • afd_signaling (String, nil) (defaults to: nil)

    Indicates the AFD values that MediaLive will write into the video encode.

  • color_metadata (String, nil) (defaults to: nil)

    Specifies whether to include the color space metadata.

  • color_space (String, nil) (defaults to: nil)

    Choose the type of color space conversion to apply to the output.

  • display_aspect_ratio (String, nil) (defaults to: nil)

    Sets the pixel aspect ratio for the encode.

  • filter_settings (AWSCDK::IResolvable, AWSCDK::MediaLive::CfnChannel::Mpeg2FilterSettingsProperty, nil) (defaults to: nil)

    Optionally specify a noise reduction filter, which can improve quality of compressed content.

  • fixed_afd (String, nil) (defaults to: nil)

    Complete this field only when afdSignaling is set to FIXED.

  • framerate_denominator (Numeric, nil) (defaults to: nil)

    description": "The framerate denominator.

  • framerate_numerator (Numeric, nil) (defaults to: nil)

    The framerate numerator.

  • gop_closed_cadence (Numeric, nil) (defaults to: nil)

    MPEG2: default is open GOP.

  • gop_num_b_frames (Numeric, nil) (defaults to: nil)

    Relates to the GOP structure.

  • gop_size (Numeric, nil) (defaults to: nil)

    Relates to the GOP structure.

  • gop_size_units (String, nil) (defaults to: nil)

    Relates to the GOP structure.

  • scan_type (String, nil) (defaults to: nil)

    Set the scan type of the output to PROGRESSIVE or INTERLACED (top field first).

  • subgop_length (String, nil) (defaults to: nil)

    Relates to the GOP structure.

  • timecode_burnin_settings (AWSCDK::IResolvable, AWSCDK::MediaLive::CfnChannel::TimecodeBurninSettingsProperty, nil) (defaults to: nil)
  • timecode_insertion (String, nil) (defaults to: nil)

    Determines how MediaLive inserts timecodes in the output video.



10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
# File 'media_live/cfn_channel.rb', line 10713

def initialize(adaptive_quantization: nil, afd_signaling: nil, color_metadata: nil, color_space: nil, display_aspect_ratio: nil, filter_settings: nil, fixed_afd: nil, framerate_denominator: nil, framerate_numerator: nil, gop_closed_cadence: nil, gop_num_b_frames: nil, gop_size: nil, gop_size_units: nil, scan_type: nil, subgop_length: nil, timecode_burnin_settings: nil, timecode_insertion: nil)
  @adaptive_quantization = adaptive_quantization
  Jsii::Type.check_type(@adaptive_quantization, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "adaptiveQuantization") unless @adaptive_quantization.nil?
  @afd_signaling = afd_signaling
  Jsii::Type.check_type(@afd_signaling, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "afdSignaling") unless @afd_signaling.nil?
  @color_metadata = 
  Jsii::Type.check_type(@color_metadata, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "colorMetadata") unless @color_metadata.nil?
  @color_space = color_space
  Jsii::Type.check_type(@color_space, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "colorSpace") unless @color_space.nil?
  @display_aspect_ratio = display_aspect_ratio
  Jsii::Type.check_type(@display_aspect_ratio, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "displayAspectRatio") unless @display_aspect_ratio.nil?
  @filter_settings = filter_settings.is_a?(Hash) ? ::AWSCDK::MediaLive::CfnChannel::Mpeg2FilterSettingsProperty.new(**filter_settings.transform_keys(&:to_sym)) : filter_settings
  Jsii::Type.check_type(@filter_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19tZWRpYWxpdmUuQ2ZuQ2hhbm5lbC5NcGVnMkZpbHRlclNldHRpbmdzUHJvcGVydHkifV19fQ==")), "filterSettings") unless @filter_settings.nil?
  @fixed_afd = fixed_afd
  Jsii::Type.check_type(@fixed_afd, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fixedAfd") unless @fixed_afd.nil?
  @framerate_denominator = framerate_denominator
  Jsii::Type.check_type(@framerate_denominator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "framerateDenominator") unless @framerate_denominator.nil?
  @framerate_numerator = framerate_numerator
  Jsii::Type.check_type(@framerate_numerator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "framerateNumerator") unless @framerate_numerator.nil?
  @gop_closed_cadence = gop_closed_cadence
  Jsii::Type.check_type(@gop_closed_cadence, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "gopClosedCadence") unless @gop_closed_cadence.nil?
  @gop_num_b_frames = gop_num_b_frames
  Jsii::Type.check_type(@gop_num_b_frames, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "gopNumBFrames") unless @gop_num_b_frames.nil?
  @gop_size = gop_size
  Jsii::Type.check_type(@gop_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "gopSize") unless @gop_size.nil?
  @gop_size_units = gop_size_units
  Jsii::Type.check_type(@gop_size_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "gopSizeUnits") unless @gop_size_units.nil?
  @scan_type = scan_type
  Jsii::Type.check_type(@scan_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scanType") unless @scan_type.nil?
  @subgop_length = subgop_length
  Jsii::Type.check_type(@subgop_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subgopLength") unless @subgop_length.nil?
  @timecode_burnin_settings = timecode_burnin_settings.is_a?(Hash) ? ::AWSCDK::MediaLive::CfnChannel::TimecodeBurninSettingsProperty.new(**timecode_burnin_settings.transform_keys(&:to_sym)) : timecode_burnin_settings
  Jsii::Type.check_type(@timecode_burnin_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19tZWRpYWxpdmUuQ2ZuQ2hhbm5lbC5UaW1lY29kZUJ1cm5pblNldHRpbmdzUHJvcGVydHkifV19fQ==")), "timecodeBurninSettings") unless @timecode_burnin_settings.nil?
  @timecode_insertion = timecode_insertion
  Jsii::Type.check_type(@timecode_insertion, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timecodeInsertion") unless @timecode_insertion.nil?
end

Instance Attribute Details

#adaptive_quantizationString? (readonly)

Choose Off to disable adaptive quantization.

Or choose another value to enable the quantizer and set its strength. The strengths are: Auto, Off, Low, Medium, High. When you enable this field, MediaLive allows intra-frame quantizers to vary, which might improve visual quality.



10756
10757
10758
# File 'media_live/cfn_channel.rb', line 10756

def adaptive_quantization
  @adaptive_quantization
end

#afd_signalingString? (readonly)

Indicates the AFD values that MediaLive will write into the video encode.

If you do not know what AFD signaling is, or if your downstream system has not given you guidance, choose AUTO. AUTO: MediaLive will try to preserve the input AFD value (in cases where multiple AFD values are valid). FIXED: MediaLive will use the value you specify in fixedAFD.



10765
10766
10767
# File 'media_live/cfn_channel.rb', line 10765

def afd_signaling
  @afd_signaling
end

#color_metadataString? (readonly)

Specifies whether to include the color space metadata.

The metadata describes the color space that applies to the video (the colorSpace field). We recommend that you insert the metadata.



10772
10773
10774
# File 'media_live/cfn_channel.rb', line 10772

def 
  @color_metadata
end

#color_spaceString? (readonly)

Choose the type of color space conversion to apply to the output.

For detailed information on setting up both the input and the output to obtain the desired color space in the output, see the section on "MediaLive Features - Video - color space" in the MediaLive User Guide. PASSTHROUGH: Keep the color space of the input content - do not convert it. AUTO:Convert all content that is SD to rec 601, and convert all content that is HD to rec 709.



10781
10782
10783
# File 'media_live/cfn_channel.rb', line 10781

def color_space
  @color_space
end

#display_aspect_ratioString? (readonly)

Sets the pixel aspect ratio for the encode.



10786
10787
10788
# File 'media_live/cfn_channel.rb', line 10786

def display_aspect_ratio
  @display_aspect_ratio
end

#filter_settingsAWSCDK::IResolvable, ... (readonly)

Optionally specify a noise reduction filter, which can improve quality of compressed content.

If you do not choose a filter, no filter will be applied. TEMPORAL: This filter is useful for both source content that is noisy (when it has excessive digital artifacts) and source content that is clean. When the content is noisy, the filter cleans up the source content before the encoding phase, with these two effects: First, it improves the output video quality because the content has been cleaned up. Secondly, it decreases the bandwidth because MediaLive does not waste bits on encoding noise. When the content is reasonably clean, the filter tends to decrease the bitrate.



10796
10797
10798
# File 'media_live/cfn_channel.rb', line 10796

def filter_settings
  @filter_settings
end

#fixed_afdString? (readonly)

Complete this field only when afdSignaling is set to FIXED.

Enter the AFD value (4 bits) to write on all frames of the video encode.



10803
10804
10805
# File 'media_live/cfn_channel.rb', line 10803

def fixed_afd
  @fixed_afd
end

#framerate_denominatorNumeric? (readonly)

description": "The framerate denominator.

For example, 1001. The framerate is the numerator divided by the denominator. For example, 24000 / 1001 = 23.976 FPS.



10810
10811
10812
# File 'media_live/cfn_channel.rb', line 10810

def framerate_denominator
  @framerate_denominator
end

#framerate_numeratorNumeric? (readonly)

The framerate numerator.

For example, 24000. The framerate is the numerator divided by the denominator. For example, 24000 / 1001 = 23.976 FPS.



10817
10818
10819
# File 'media_live/cfn_channel.rb', line 10817

def framerate_numerator
  @framerate_numerator
end

#gop_closed_cadenceNumeric? (readonly)

MPEG2: default is open GOP.



10822
10823
10824
# File 'media_live/cfn_channel.rb', line 10822

def gop_closed_cadence
  @gop_closed_cadence
end

#gop_num_b_framesNumeric? (readonly)

Relates to the GOP structure.

The number of B-frames between reference frames. If you do not know what a B-frame is, use the default.



10829
10830
10831
# File 'media_live/cfn_channel.rb', line 10829

def gop_num_b_frames
  @gop_num_b_frames
end

#gop_sizeNumeric? (readonly)

Relates to the GOP structure.

The GOP size (keyframe interval) in the units specified in gopSizeUnits. If you do not know what GOP is, use the default. If gopSizeUnits is frames, then the gopSize must be an integer and must be greater than or equal to 1. If gopSizeUnits is seconds, the gopSize must be greater than 0, but does not need to be an integer.



10838
10839
10840
# File 'media_live/cfn_channel.rb', line 10838

def gop_size
  @gop_size
end

#gop_size_unitsString? (readonly)

Relates to the GOP structure.

Specifies whether the gopSize is specified in frames or seconds. If you do not plan to change the default gopSize, leave the default. If you specify SECONDS, MediaLive will internally convert the gop size to a frame count.



10845
10846
10847
# File 'media_live/cfn_channel.rb', line 10845

def gop_size_units
  @gop_size_units
end

#scan_typeString? (readonly)

Set the scan type of the output to PROGRESSIVE or INTERLACED (top field first).



10850
10851
10852
# File 'media_live/cfn_channel.rb', line 10850

def scan_type
  @scan_type
end

#subgop_lengthString? (readonly)

Relates to the GOP structure.

If you do not know what GOP is, use the default. FIXED: Set the number of B-frames in each sub-GOP to the value in gopNumBFrames. DYNAMIC: Let MediaLive optimize the number of B-frames in each sub-GOP, to improve visual quality.



10859
10860
10861
# File 'media_live/cfn_channel.rb', line 10859

def subgop_length
  @subgop_length
end

#timecode_burnin_settingsAWSCDK::IResolvable, ... (readonly)



10862
10863
10864
# File 'media_live/cfn_channel.rb', line 10862

def timecode_burnin_settings
  @timecode_burnin_settings
end

#timecode_insertionString? (readonly)

Determines how MediaLive inserts timecodes in the output video.

For detailed information about setting up the input and the output for a timecode, see the section on "MediaLive Features - Timecode configuration" in the MediaLive User Guide. DISABLED: do not include timecodes. GOP_TIMECODE: Include timecode metadata in the GOP header.



10871
10872
10873
# File 'media_live/cfn_channel.rb', line 10871

def timecode_insertion
  @timecode_insertion
end

Class Method Details

.jsii_propertiesObject



10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
# File 'media_live/cfn_channel.rb', line 10873

def self.jsii_properties
  {
    :adaptive_quantization => "adaptiveQuantization",
    :afd_signaling => "afdSignaling",
    :color_metadata => "colorMetadata",
    :color_space => "colorSpace",
    :display_aspect_ratio => "displayAspectRatio",
    :filter_settings => "filterSettings",
    :fixed_afd => "fixedAfd",
    :framerate_denominator => "framerateDenominator",
    :framerate_numerator => "framerateNumerator",
    :gop_closed_cadence => "gopClosedCadence",
    :gop_num_b_frames => "gopNumBFrames",
    :gop_size => "gopSize",
    :gop_size_units => "gopSizeUnits",
    :scan_type => "scanType",
    :subgop_length => "subgopLength",
    :timecode_burnin_settings => "timecodeBurninSettings",
    :timecode_insertion => "timecodeInsertion",
  }
end

Instance Method Details

#to_jsiiObject



10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
# File 'media_live/cfn_channel.rb', line 10895

def to_jsii
  result = {}
  result.merge!({
    "adaptiveQuantization" => @adaptive_quantization,
    "afdSignaling" => @afd_signaling,
    "colorMetadata" => @color_metadata,
    "colorSpace" => @color_space,
    "displayAspectRatio" => @display_aspect_ratio,
    "filterSettings" => @filter_settings,
    "fixedAfd" => @fixed_afd,
    "framerateDenominator" => @framerate_denominator,
    "framerateNumerator" => @framerate_numerator,
    "gopClosedCadence" => @gop_closed_cadence,
    "gopNumBFrames" => @gop_num_b_frames,
    "gopSize" => @gop_size,
    "gopSizeUnits" => @gop_size_units,
    "scanType" => @scan_type,
    "subgopLength" => @subgop_length,
    "timecodeBurninSettings" => @timecode_burnin_settings,
    "timecodeInsertion" => @timecode_insertion,
  })
  result.compact
end