Live Stream v1 API - Class VideoStream.Types.H264CodecSettings (1.7.0)

public sealed class VideoStream.Types.H264CodecSettings : IMessage<VideoStream.Types.H264CodecSettings>, IEquatable<VideoStream.Types.H264CodecSettings>, IDeepCloneable<VideoStream.Types.H264CodecSettings>, IBufferMessage, IMessage

Reference documentation and code samples for the Live Stream v1 API class VideoStream.Types.H264CodecSettings.

H264 codec settings.

Inheritance

object > VideoStream.Types.H264CodecSettings

Namespace

Google.Cloud.Video.LiveStream.V1

Assembly

Google.Cloud.Video.LiveStream.V1.dll

Constructors

H264CodecSettings()

public H264CodecSettings()

H264CodecSettings(H264CodecSettings)

public H264CodecSettings(VideoStream.Types.H264CodecSettings other)
Parameter
Name Description
other VideoStreamTypesH264CodecSettings

Properties

AllowOpenGop

public bool AllowOpenGop { get; set; }

Specifies whether an open Group of Pictures (GOP) structure should be allowed or not. The default is false.

Property Value
Type Description
bool

AqStrength

public double AqStrength { get; set; }

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.

Property Value
Type Description
double

BFrameCount

public int BFrameCount { get; set; }

The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] if set. The default is 0.

Property Value
Type Description
int

BPyramid

public bool BPyramid { get; set; }

Allow B-pyramid for reference frame selection. This may not be supported on all decoders. The default is false.

Property Value
Type Description
bool

BitrateBps

public int BitrateBps { get; set; }

Required. The video bitrate in bits per second. Minimum value is 10,000.

  • For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps).
  • For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps).
Property Value
Type Description
int

EntropyCoder

public string EntropyCoder { get; set; }

The entropy coder to use. The default is cabac.

Supported entropy coders:

  • cavlc
  • cabac
Property Value
Type Description
string

FrameRate

public double FrameRate { get; set; }

Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 60. 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. See Calculating frame rate for more information.

Property Value
Type Description
double

GopDuration

public Duration GopDuration { get; set; }

Select the GOP size based on the specified duration. The default is 2s. Note that gopDuration must be less than or equal to [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], and [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] must be divisible by gopDuration. Valid range is [2s, 20s].

All video streams in the same channel must have the same GOP size.

Property Value
Type Description
Duration

GopFrameCount

public int GopFrameCount { get; set; }

Select the GOP size based on the specified frame count. If GOP frame count is set instead of GOP duration, GOP duration will be calculated by gopFrameCount/frameRate. The calculated GOP duration must satisfy the limitations on gopDuration as well. Valid range is [60, 600].

Property Value
Type Description
int

GopModeCase

public VideoStream.Types.H264CodecSettings.GopModeOneofCase GopModeCase { get; }
Property Value
Type Description
VideoStreamTypesH264CodecSettingsGopModeOneofCase

HasGopFrameCount

public bool HasGopFrameCount { get; }

Gets whether the "gop_frame_count" field is set

Property Value
Type Description
bool

HeightPixels

public int HeightPixels { get; set; }

Required. The height of the video in pixels. Must be an even integer. Valid range is [180, 1080].

Property Value
Type Description
int

Profile

public string Profile { get; set; }

Enforces the specified codec profile. The following profiles are supported:

  • baseline
  • main (default)
  • high

The available options are FFmpeg-compatible Profile Options. Note that certain values for this field may cause the transcoder to override other fields you set in the [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] message.

Property Value
Type Description
string

Tune

public string Tune { get; set; }

Enforces the specified codec tune. The available options are FFmpeg-compatible Encode Options Note that certain values for this field may cause the transcoder to override other fields you set in the [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] message.

Property Value
Type Description
string

VbvFullnessBits

public int VbvFullnessBits { get; set; }

Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits].

Property Value
Type Description
int

VbvSizeBits

public int VbvSizeBits { get; set; }

Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps].

Property Value
Type Description
int

WidthPixels

public int WidthPixels { get; set; }

Required. The width of the video in pixels. Must be an even integer. Valid range is [320, 1920].

Property Value
Type Description
int