- Resource: Channel
- InputAttachment
- AutomaticFailover
- Output
- ElementaryStream
- VideoStream
- H264CodecSettings
- H265CodecSettings
- AudioStream
- AudioMapping
- TextStream
- TextMapping
- MuxStream
- SegmentSettings
- Manifest
- ManifestType
- DistributionStream
- Distribution
- State
- SrtPushOutputEndpoint
- RtmpPushOutputEndpoint
- SpriteSheet
- StreamingState
- LogConfig
- LogSeverity
- TimecodeConfig
- TimecodeSource
- TimeZone
- Encryption
- DrmSystems
- Widevine
- Fairplay
- Playready
- Clearkey
- Aes128Encryption
- SampleAesEncryption
- MpegCommonEncryption
- InputConfig
- InputSwitchMode
- RetentionConfig
- StaticOverlay
- NormalizedResolution
- NormalizedCoordinate
- AutoTranscriptionConfig
- DisplayTiming
- QualityPreset
- Methods
Resource: Channel
Channel resource represents the processor that does a user-defined "streaming" operation, which includes getting an input stream through an input, transcoding it to multiple renditions, and publishing output live streams in certain formats (for example, HLS or DASH) to the specified location.
JSON representation |
---|
{ "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "inputAttachments": [ { object ( |
Fields | |
---|---|
name |
The resource name of the channel, in the form of: |
createTime |
Output only. The creation time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. The update time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
labels |
User-defined key/value metadata. An object containing a list of |
inputAttachments[] |
A list of input attachments that this channel uses. One channel can have multiple inputs as the input sources. Only one input can be selected as the input source at one time. |
activeInput |
Output only. The |
output |
Required. Information about the output (that is, the Cloud Storage bucket to store the generated live stream). |
elementaryStreams[] |
List of elementary streams. |
muxStreams[] |
List of multiplexing settings for output streams. |
manifests[] |
List of output manifests. |
distributionStreams[] |
Optional. List of multiplexing settings of streams for distributions. |
distributions[] |
Optional. List of distributions. |
spriteSheets[] |
List of output sprite sheets. |
streamingState |
Output only. State of the streaming operation. |
streamingError |
Output only. A description of the reason for the streaming error. This property is always present when |
logConfig |
Configuration of platform logs for this channel. |
timecodeConfig |
Configuration of timecode for this channel. |
encryptions[] |
Optional. Encryption configurations for this channel. Each configuration has an ID which is referred to by each MuxStream to indicate which configuration is used for that output. |
inputConfig |
The configuration for input sources defined in |
retentionConfig |
Optional. Configuration for retention of output files for this channel. |
staticOverlays[] |
Optional. List of static overlay images. Those images display over the output content for the whole duration of the live stream. |
autoTranscriptionConfig |
Optional. Advanced configurations for auto-generated text streams. |
InputAttachment
A group of information for attaching an input resource to this channel.
JSON representation |
---|
{
"key": string,
"input": string,
"automaticFailover": {
object ( |
Fields | |
---|---|
key |
A unique key for this input attachment. The key must be 1-63 characters in length. The key must begin and end with a letter (regardless of case) or a number, but can contain dashes or underscores in between. |
input |
The resource name of an existing input, in the form of: |
automaticFailover |
Automatic failover configurations. |
AutomaticFailover
Configurations to follow when automatic failover happens.
JSON representation |
---|
{ "inputKeys": [ string ] } |
Fields | |
---|---|
inputKeys[] |
The |
Output
Location of output file(s) in a Google Cloud Storage bucket.
JSON representation |
---|
{ "uri": string } |
Fields | |
---|---|
uri |
URI for the output file(s). For example, |
ElementaryStream
Encoding of an input element such as an audio, video, or text track. Elementary streams must be packaged before mapping and sharing between different output formats.
JSON representation |
---|
{ "key": string, // Union field |
Fields | |
---|---|
key |
A unique key for this elementary stream. The key must be 1-63 characters in length. The key must begin and end with a letter (regardless of case) or a number, but can contain dashes or underscores in between. |
Union field elementary_stream . Required. Encoding of an audio, video, or text track. elementary_stream can be only one of the following: |
|
videoStream |
Encoding of a video stream. |
audioStream |
Encoding of an audio stream. |
textStream |
Encoding of a text stream. For example, closed captions or subtitles. |
VideoStream
Video stream resource.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field codec_settings . Codec settings. codec_settings can be only one of the following: |
|
h264 |
H264 codec settings. |
h265 |
H265 codec settings. |
H264CodecSettings
H264 codec settings.
JSON representation |
---|
{ "widthPixels": integer, "heightPixels": integer, "frameRate": number, "bitrateBps": integer, "allowOpenGop": boolean, "vbvSizeBits": integer, "vbvFullnessBits": integer, "entropyCoder": string, "bPyramid": boolean, "bFrameCount": integer, "aqStrength": number, "profile": string, "tune": string, // Union field |
Fields | |
---|---|
widthPixels |
Required. The width of the video in pixels. Must be an even integer. Valid range is [320, 4096]. |
heightPixels |
Required. The height of the video in pixels. Must be an even integer. Valid range is [180, 2160]. |
frameRate |
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. |
bitrateBps |
Required. The video bitrate in bits per second. Minimum value is 10,000.
|
allowOpenGop |
Specifies whether an open Group of Pictures (GOP) structure should be allowed or not. The default is |
vbvSizeBits |
Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to |
vbvFullnessBits |
Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of |
entropyCoder |
The entropy coder to use. The default is Supported entropy coders:
|
bPyramid |
Allow B-pyramid for reference frame selection. This may not be supported on all decoders. The default is |
bFrameCount |
The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than |
aqStrength |
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. |
profile |
Enforces the specified codec profile. The following profiles are supported:
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 |
tune |
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 |
Union field gop_mode . GOP mode can be either by frame count or duration. gop_mode can be only one of the following: |
|
gopFrameCount |
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 |
gopDuration |
Select the GOP size based on the specified duration. The default is All video streams in the same channel must have the same GOP size. A duration in seconds with up to nine fractional digits, ending with ' |
H265CodecSettings
H265 codec settings.
JSON representation |
---|
{ "widthPixels": integer, "heightPixels": integer, "frameRate": number, "bitrateBps": integer, "vbvSizeBits": integer, "vbvFullnessBits": integer, "bPyramid": boolean, "bFrameCount": integer, "aqStrength": number, // Union field |
Fields | |
---|---|
widthPixels |
Optional. 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. Valid range is [320, 4096]. |
heightPixels |
Optional. 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. Valid range is [180, 2160]. |
frameRate |
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. See Calculating frame rate for more information. |
bitrateBps |
Required. The video bitrate in bits per second. Minimum value is 10,000.
|
vbvSizeBits |
Optional. Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to |
vbvFullnessBits |
Optional. Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of |
bPyramid |
Optional. Allow B-pyramid for reference frame selection. This may not be supported on all decoders. The default is |
bFrameCount |
Optional. The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than |
aqStrength |
Optional. 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. |
Union field gop_mode . GOP mode can be either by frame count or duration. gop_mode can be only one of the following: |
|
gopFrameCount |
Optional. 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 |
gopDuration |
Optional. Select the GOP size based on the specified duration. The default is All video streams in the same channel must have the same GOP size. A duration in seconds with up to nine fractional digits, ending with ' |
AudioStream
Audio stream resource.
JSON representation |
---|
{
"transmux": boolean,
"codec": string,
"bitrateBps": integer,
"channelCount": integer,
"channelLayout": [
string
],
"mapping": [
{
object ( |
Fields | |
---|---|
transmux |
Specifies whether pass through (transmuxing) is enabled or not. If set to |
codec |
The codec for this audio stream. The default is Supported audio codecs:
|
bitrateBps |
Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000. |
channelCount |
Number of audio channels. Must be between 1 and 6. The default is 2. |
channelLayout[] |
A list of channel names specifying layout of the audio channels. This only affects the metadata embedded in the container headers, if supported by the specified format. The default is Supported channel names:
|
mapping[] |
The mapping for the input streams and audio channels. |
sampleRateHertz |
The audio sample rate in Hertz. The default is 48000 Hertz. |
AudioMapping
The mapping for the input streams and audio channels.
JSON representation |
---|
{ "inputKey": string, "inputTrack": integer, "inputChannel": integer, "outputChannel": integer, "gainDb": number } |
Fields | |
---|---|
inputKey |
Required. The |
inputTrack |
Required. The zero-based index of the track in the input stream. All |
inputChannel |
Required. The zero-based index of the channel in the input stream. |
outputChannel |
Required. The zero-based index of the channel in the output audio stream. Must be consistent with the |
gainDb |
Audio volume control in dB. Negative values decrease volume, positive values increase. The default is 0. |
TextStream
Encoding of a text stream. For example, closed captions or subtitles.
JSON representation |
---|
{
"codec": string,
"languageCode": string,
"displayName": string,
"outputCeaChannel": string,
"mapping": [
{
object ( |
Fields | |
---|---|
codec |
Required. The codec for this text stream. Supported text codecs:
|
languageCode |
Optional. The BCP-47 language code, such as |
displayName |
Optional. The name for this particular text stream that will be added to the HLS/DASH manifest. |
outputCeaChannel |
Optional. The channel of the closed caption in the output stream. This field should only be set when textstream is used for partner distribution. Must be one of |
mapping[] |
Optional. The mapping for the input streams and text tracks. |
TextMapping
The mapping for the input streams and text tracks.
JSON representation |
---|
{ "inputKey": string, "inputTrack": integer, "inputCeaChannel": string, "fromLanguageCode": string } |
Fields | |
---|---|
inputKey |
Optional. The |
inputTrack |
Optional. The zero-based index of the track in the input stream. |
inputCeaChannel |
Optional. The channel of the closed caption in the input stream. If this field is set, the output |
fromLanguageCode |
Optional. The BCP-47 source language code, such as |
MuxStream
Multiplexing settings for output stream.
JSON representation |
---|
{
"key": string,
"container": string,
"elementaryStreams": [
string
],
"segmentSettings": {
object ( |
Fields | |
---|---|
key |
A unique key for this multiplexed stream. The key must be 1-63 characters in length. The key must begin and end with a letter (regardless of case) or a number, but can contain dashes or underscores in between. |
container |
The container format. The default is Supported container formats:
|
elementaryStreams[] |
List of
|
segmentSettings |
Segment settings for |
encryptionId |
Identifier of the encryption configuration to use. If omitted, output will be unencrypted. |
SegmentSettings
Segment settings for fmp4
and ts
.
JSON representation |
---|
{ "segmentDuration": string } |
Fields | |
---|---|
segmentDuration |
Duration of the segments in seconds. The default is All A duration in seconds with up to nine fractional digits, ending with ' |
Manifest
Manifest configuration.
JSON representation |
---|
{
"fileName": string,
"type": enum ( |
Fields | |
---|---|
fileName |
The name of the generated file. The default is |
type |
Required. Type of the manifest, can be |
muxStreams[] |
Required. List of
|
maxSegmentCount |
Maximum number of segments that this manifest holds. Once the manifest reaches this maximum number of segments, whenever a new segment is added to the manifest, the oldest segment will be removed from the manifest. The minimum value is 3 and the default value is 5. |
segmentKeepDuration |
How long to keep a segment on the output Google Cloud Storage bucket after it is removed from the manifest. This field should be large enough to cover the manifest propagation delay. Otherwise, a player could receive 404 errors while accessing segments which are listed in the manifest that the player has, but were already deleted from the output Google Cloud Storage bucket. Default value is If both segmentKeepDuration and A duration in seconds with up to nine fractional digits, ending with ' |
useTimecodeAsTimeline |
Whether to use the timecode, as specified in timecode config, when setting:
If false, ignore the input timecode and use the time from system clock when the manifest is first generated. This is the default behavior. |
key |
Optional. A unique key for this manifest. |
ManifestType
The manifest type can be either HLS
or DASH
.
Enums | |
---|---|
MANIFEST_TYPE_UNSPECIFIED |
The manifest type is not specified. |
HLS |
Create an HLS manifest. The corresponding file extension is .m3u8 . |
DASH |
Create a DASH manifest. The corresponding file extension is .mpd . |
DistributionStream
Multiplexing settings for output streams used in Distribution
.
JSON representation |
---|
{ "key": string, "container": string, "elementaryStreams": [ string ] } |
Fields | |
---|---|
key |
Required. A unique key for this distribution stream. The key must be 1-63 characters in length. The key must begin and end with a letter (regardless of case) or a number, but can contain dashes or underscores in between. |
container |
Required. The container format. Supported container formats:
|
elementaryStreams[] |
Required. List of |
Distribution
Distribution configuration.
JSON representation |
---|
{ "key": string, "distributionStream": string, "state": enum ( |