Class: Google::Apis::TranscoderV1beta1::VideoStream

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

Overview

Video stream resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VideoStream

Returns a new instance of VideoStream.



1663
1664
1665
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1663

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)


1518
1519
1520
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1518

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)


1526
1527
1528
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1526

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 VideoStream.gop_frame_count if set. The default is 0. Corresponds to the JSON property bFrameCount

Returns:

  • (Fixnum)


1532
1533
1534
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1532

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)


1538
1539
1540
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1538

def b_pyramid
  @b_pyramid
end

#bitrate_bpsFixnum

Required. The video bitrate in bits per second. Must be between 1 and 1,000, 000,000. Corresponds to the JSON property bitrateBps

Returns:

  • (Fixnum)


1545
1546
1547
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1545

def bitrate_bps
  @bitrate_bps
end

#codecString

Codec type. The following codecs are supported: * h264 (default) * h265 * vp9 Corresponds to the JSON property codec

Returns:

  • (String)


1551
1552
1553
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1551

def codec
  @codec
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)


1557
1558
1559
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1557

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. VideoStream. rate_control_mode must be "vbr". The default is false. Corresponds to the JSON property enableTwoPass

Returns:

  • (Boolean)


1563
1564
1565
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1563

def enable_two_pass
  @enable_two_pass
end

#entropy_coderString

The entropy coder to use. The default is "cabac". Supported entropy coders: - 'cavlc' - 'cabac' Corresponds to the JSON property entropyCoder

Returns:

  • (String)


1570
1571
1572
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1570

def entropy_coder
  @entropy_coder
end

#frame_rateFloat

Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120. Will default to the input frame rate if larger than the input frame rate. The API will generate an output FPS that is divisible by the input FPS, and smaller or equal to the target FPS. The following table shows the computed video FPS given the target FPS (in parenthesis) and input FPS (in the first column): | | (30) | (60) | (25) | (50) | |--------|--------|--------| ------|------| | 240 | Fail | Fail | Fail | Fail | | 120 | 30 | 60 | 20 | 30 | | 100 | 25 | 50 | 20 | 30 | | 50 | 25 | 50 | 20 | 30 | | 60 | 30 | 60 | 20 | 30 | | 59.94 | 29.97 | 59.94 | 20 | 30 | | 48 | 24 | 48 | 20 | 30 | | 30 | 30 | 30 | 20 | 30 | | 25 | 25 | 25 | 20 | 30 | | 24 | 24 | 24 | 20 | 30 | | 23.976 | 23.976 | 23.976 | 20 | 30 | | 15 | 15 | 15 | 20 | 30 | | 12 | 12 | 12 | 20 | 30 | | 10 | 10 | 10 | 20 | 30 | Corresponds to the JSON property frameRate

Returns:

  • (Float)


1586
1587
1588
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1586

def frame_rate
  @frame_rate
end

#gop_durationString

Select the GOP size based on the specified duration. The default is "3s". Corresponds to the JSON property gopDuration

Returns:

  • (String)


1591
1592
1593
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1591

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)


1597
1598
1599
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1597

def gop_frame_count
  @gop_frame_count
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. Corresponds to the JSON property heightPixels

Returns:

  • (Fixnum)


1604
1605
1606
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1604

def height_pixels
  @height_pixels
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)


1613
1614
1615
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1613

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 VideoStream message. Corresponds to the JSON property preset

Returns:

  • (String)


1621
1622
1623
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1621

def preset
  @preset
end

#profileString

Enforces the specified codec profile. The following profiles are supported: * baseline * main * high (default) 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 VideoStream message. Corresponds to the JSON property profile

Returns:

  • (String)


1629
1630
1631
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1629

def profile
  @profile
end

#rate_control_modeString

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

Returns:

  • (String)


1635
1636
1637
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1635

def rate_control_mode
  @rate_control_mode
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 VideoStream message. Corresponds to the JSON property tune

Returns:

  • (String)


1642
1643
1644
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1642

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 VideoStream.vbv_size_bits. Corresponds to the JSON property vbvFullnessBits

Returns:

  • (Fixnum)


1648
1649
1650
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1648

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)


1654
1655
1656
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1654

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. Corresponds to the JSON property widthPixels

Returns:

  • (Fixnum)


1661
1662
1663
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1661

def width_pixels
  @width_pixels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
# File 'generated/google/apis/transcoder_v1beta1/classes.rb', line 1668

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)
  @codec = args[:codec] if args.key?(:codec)
  @crf_level = args[:crf_level] if args.key?(:crf_level)
  @enable_two_pass = args[:enable_two_pass] if args.key?(:enable_two_pass)
  @entropy_coder = args[:entropy_coder] if args.key?(:entropy_coder)
  @frame_rate = args[:frame_rate] if args.key?(:frame_rate)
  @gop_duration = args[:gop_duration] if args.key?(:gop_duration)
  @gop_frame_count = args[:gop_frame_count] if args.key?(:gop_frame_count)
  @height_pixels = args[:height_pixels] if args.key?(:height_pixels)
  @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)
  @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