Class: Google::Apis::TranscoderV1::H265CodecSettings

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/transcoder_v1/classes.rb,
lib/google/apis/transcoder_v1/representations.rb,
lib/google/apis/transcoder_v1/representations.rb

Overview

H265 codec settings.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ H265CodecSettings

Returns a new instance of H265CodecSettings.



1175
1176
1177
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1175

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#allow_open_gopBoolean Also known as: allow_open_gop?

Specifies whether an open Group of Pictures (GOP) structure should be allowed or not. The default is false. Corresponds to the JSON property allowOpenGop

Returns:

  • (Boolean)


1014
1015
1016
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1014

def allow_open_gop
  @allow_open_gop
end

#aq_strengthFloat

Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A higher value equals a lower bitrate but smoother image. The default is 0. Corresponds to the JSON property aqStrength

Returns:

  • (Float)


1022
1023
1024
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1022

def aq_strength
  @aq_strength
end

#b_frame_countFixnum

The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than H265CodecSettings.gop_frame_count if set. The default is 0. Corresponds to the JSON property bFrameCount

Returns:

  • (Fixnum)


1028
1029
1030
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1028

def b_frame_count
  @b_frame_count
end

#b_pyramidBoolean Also known as: b_pyramid?

Allow B-pyramid for reference frame selection. This may not be supported on all decoders. The default is false. Corresponds to the JSON property bPyramid

Returns:

  • (Boolean)


1034
1035
1036
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1034

def b_pyramid
  @b_pyramid
end

#bitrate_bpsFixnum

Required. The video bitrate in bits per second. The minimum value is 1,000. The maximum value is 800,000,000. Corresponds to the JSON property bitrateBps

Returns:

  • (Fixnum)


1041
1042
1043
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1041

def bitrate_bps
  @bitrate_bps
end

#crf_levelFixnum

Target CRF level. Must be between 10 and 36, where 10 is the highest quality and 36 is the most efficient compression. The default is 21. Corresponds to the JSON property crfLevel

Returns:

  • (Fixnum)


1047
1048
1049
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1047

def crf_level
  @crf_level
end

#enable_two_passBoolean Also known as: enable_two_pass?

Use two-pass encoding strategy to achieve better video quality. H265CodecSettings.rate_control_mode must be vbr. The default is false. Corresponds to the JSON property enableTwoPass

Returns:

  • (Boolean)


1053
1054
1055
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1053

def enable_two_pass
  @enable_two_pass
end

#frame_rateFloat

Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120. Corresponds to the JSON property frameRate

Returns:

  • (Float)


1060
1061
1062
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1060

def frame_rate
  @frame_rate
end

#frame_rate_conversion_strategyString

Optional. Frame rate conversion strategy for desired frame rate. The default is DOWNSAMPLE. Corresponds to the JSON property frameRateConversionStrategy

Returns:

  • (String)


1066
1067
1068
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1066

def frame_rate_conversion_strategy
  @frame_rate_conversion_strategy
end

#gop_durationString

Select the GOP size based on the specified duration. The default is 3s. Note that gopDuration must be less than or equal to segmentDuration, and segmentDuration must be divisible by gopDuration. Corresponds to the JSON property gopDuration

Returns:

  • (String)


1074
1075
1076
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1074

def gop_duration
  @gop_duration
end

#gop_frame_countFixnum

Select the GOP size based on the specified frame count. Must be greater than zero. Corresponds to the JSON property gopFrameCount

Returns:

  • (Fixnum)


1080
1081
1082
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1080

def gop_frame_count
  @gop_frame_count
end

#hdr10Google::Apis::TranscoderV1::H265ColorFormatHdr10

Convert the input video to a High Dynamic Range 10 (HDR10) video. Corresponds to the JSON property hdr10



1085
1086
1087
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1085

def hdr10
  @hdr10
end

#height_pixelsFixnum

The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output. Corresponds to the JSON property heightPixels

Returns:

  • (Fixnum)


1096
1097
1098
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1096

def height_pixels
  @height_pixels
end

#hlgGoogle::Apis::TranscoderV1::H265ColorFormatHlg

Convert the input video to a Hybrid Log Gamma (HLG) video. Corresponds to the JSON property hlg



1101
1102
1103
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1101

def hlg
  @hlg
end

#pixel_formatString

Pixel format to use. The default is yuv420p. Supported pixel formats: - yuv420p pixel format - yuv422p pixel format - yuv444p pixel format - yuv420p10 10-bit HDR pixel format - yuv422p10 10-bit HDR pixel format - yuv444p10 10-bit HDR pixel format - yuv420p12 12-bit HDR pixel format - yuv422p12 12-bit HDR pixel format - yuv444p12 12-bit HDR pixel format Corresponds to the JSON property pixelFormat

Returns:

  • (String)


1110
1111
1112
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1110

def pixel_format
  @pixel_format
end

#presetString

Enforces the specified codec preset. The default is veryfast. The available options are FFmpeg-compatible. Note that certain values for this field may cause the transcoder to override other fields you set in the H265CodecSettings message. Corresponds to the JSON property preset

Returns:

  • (String)


1118
1119
1120
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1118

def preset
  @preset
end

#profileString

Enforces the specified codec profile. The following profiles are supported: * 8-bit profiles * main (default) * main-intra * mainstillpicture * 10-bit profiles * main10 (default) * main10-intra * main422-10 * main422-10- intra * main444-10 * main444-10-intra * 12-bit profiles * main12 ( default) * main12-intra * main422-12 * main422-12-intra * main444-12 * main444-12-intra The available options are FFmpeg-compatible. Note that certain values for this field may cause the transcoder to override other fields you set in the H265CodecSettings message. Corresponds to the JSON property profile

Returns:

  • (String)


1130
1131
1132
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1130

def profile
  @profile
end

#rate_control_modeString

Specify the mode. The default is vbr. Supported rate control modes: - vbr - variable bitrate - crf - constant rate factor Corresponds to the JSON property rateControlMode

Returns:

  • (String)


1136
1137
1138
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1136

def rate_control_mode
  @rate_control_mode
end

#sdrGoogle::Apis::TranscoderV1::H265ColorFormatSdr

Convert the input video to a Standard Dynamic Range (SDR) video. Corresponds to the JSON property sdr



1141
1142
1143
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1141

def sdr
  @sdr
end

#tuneString

Enforces the specified codec tune. The available options are FFmpeg- compatible. Note that certain values for this field may cause the transcoder to override other fields you set in the H265CodecSettings message. Corresponds to the JSON property tune

Returns:

  • (String)


1149
1150
1151
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1149

def tune
  @tune
end

#vbv_fullness_bitsFixnum

Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of H265CodecSettings. vbv_size_bits. Corresponds to the JSON property vbvFullnessBits

Returns:

  • (Fixnum)


1156
1157
1158
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1156

def vbv_fullness_bits
  @vbv_fullness_bits
end

#vbv_size_bitsFixnum

Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to VideoStream.bitrate_bps. Corresponds to the JSON property vbvSizeBits

Returns:

  • (Fixnum)


1162
1163
1164
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1162

def vbv_size_bits
  @vbv_size_bits
end

#width_pixelsFixnum

The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output. Corresponds to the JSON property widthPixels

Returns:

  • (Fixnum)


1173
1174
1175
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1173

def width_pixels
  @width_pixels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'lib/google/apis/transcoder_v1/classes.rb', line 1180

def update!(**args)
  @allow_open_gop = args[:allow_open_gop] if args.key?(:allow_open_gop)
  @aq_strength = args[:aq_strength] if args.key?(:aq_strength)
  @b_frame_count = args[:b_frame_count] if args.key?(:b_frame_count)
  @b_pyramid = args[:b_pyramid] if args.key?(:b_pyramid)
  @bitrate_bps = args[:bitrate_bps] if args.key?(:bitrate_bps)
  @crf_level = args[:crf_level] if args.key?(:crf_level)
  @enable_two_pass = args[:enable_two_pass] if args.key?(:enable_two_pass)
  @frame_rate = args[:frame_rate] if args.key?(:frame_rate)
  @frame_rate_conversion_strategy = args[:frame_rate_conversion_strategy] if args.key?(:frame_rate_conversion_strategy)
  @gop_duration = args[:gop_duration] if args.key?(:gop_duration)
  @gop_frame_count = args[:gop_frame_count] if args.key?(:gop_frame_count)
  @hdr10 = args[:hdr10] if args.key?(:hdr10)
  @height_pixels = args[:height_pixels] if args.key?(:height_pixels)
  @hlg = args[:hlg] if args.key?(:hlg)
  @pixel_format = args[:pixel_format] if args.key?(:pixel_format)
  @preset = args[:preset] if args.key?(:preset)
  @profile = args[:profile] if args.key?(:profile)
  @rate_control_mode = args[:rate_control_mode] if args.key?(:rate_control_mode)
  @sdr = args[:sdr] if args.key?(:sdr)
  @tune = args[:tune] if args.key?(:tune)
  @vbv_fullness_bits = args[:vbv_fullness_bits] if args.key?(:vbv_fullness_bits)
  @vbv_size_bits = args[:vbv_size_bits] if args.key?(:vbv_size_bits)
  @width_pixels = args[:width_pixels] if args.key?(:width_pixels)
end