Skip to content

Commit c4e80cd

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added H.265 (HEVC) codec support
feat: Added UHD (4k) resolution support feat: Added Auto Transcription support feat: Added StartDistribution/StopDistribution methods and Distribution/DistributionStream messages used for distributing live streams to external RTMP/SRT endpoints feat: Added PreviewInput method used for the low latency input monitoring feat: Added UpdateEncryptions event to perform key rotation without restarting a channel docs: Update requirements of resource ID fields to be more clear PiperOrigin-RevId: 808091810
1 parent 9f0cd3d commit c4e80cd

File tree

4 files changed

+525
-38
lines changed

4 files changed

+525
-38
lines changed

google/cloud/video/livestream/v1/livestream_grpc_service_config.json

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{
22
"methodConfig": [{
33
"name": [
4-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "ListChannels" },
5-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetChannel" },
4+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetPool" },
5+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "ListAssets" },
6+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetAsset" },
67
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "ListInputs" },
78
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetInput" },
9+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "ListChannels" },
10+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetChannel" },
811
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "ListEvents" },
912
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetEvent" },
1013
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "ListClips" },
1114
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetClip" },
12-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetAsset" },
13-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "ListAssets" },
14-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetPool" }
15+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "ListDvrSessions" },
16+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "GetDvrSession" }
1517
],
1618
"timeout": "60s",
1719
"retryPolicy": {
@@ -24,16 +26,27 @@
2426
},
2527
{
2628
"name": [
29+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "UpdatePool" },
30+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "CreateAsset" },
31+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "DeleteAsset" },
32+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "CreateInput" },
33+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "DeleteInput" },
34+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "UpdateInput" },
35+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "PreviewInput" },
2736
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "CreateChannel" },
2837
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "DeleteChannel" },
2938
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "UpdateChannel" },
3039
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "StartChannel" },
3140
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "StopChannel" },
32-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "CreateInput" },
33-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "DeleteInput" },
34-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "UpdateInput" },
41+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "StartDistribution" },
42+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "StopDistribution" },
3543
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "CreateEvent" },
36-
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "DeleteEvent" }
44+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "DeleteEvent" },
45+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "CreateClip" },
46+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "DeleteClip" },
47+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "CreateDvrSession" },
48+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "DeleteDvrSession" },
49+
{ "service": "google.cloud.video.livestream.v1.LivestreamService", "method": "UpdateDvrSession" }
3750
],
3851
"timeout": "60s"
3952
}]

google/cloud/video/livestream/v1/outputs.proto

Lines changed: 238 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.video.livestream.v1;
1919
import "google/api/field_behavior.proto";
2020
import "google/api/resource.proto";
2121
import "google/protobuf/duration.proto";
22+
import "google/rpc/status.proto";
2223
import "google/type/datetime.proto";
2324

2425
option csharp_namespace = "Google.Cloud.Video.LiveStream.V1";
@@ -148,6 +149,112 @@ message Manifest {
148149
string key = 7 [(google.api.field_behavior) = OPTIONAL];
149150
}
150151

152+
// Multiplexing settings for output streams used in
153+
// [Distribution][google.cloud.video.livestream.v1.Distribution].
154+
message DistributionStream {
155+
// Required. A unique key for this distribution stream. The key must be 1-63
156+
// characters in length. The key must begin and end with a letter (regardless
157+
// of case) or a number, but can contain dashes or underscores in between.
158+
string key = 1 [(google.api.field_behavior) = REQUIRED];
159+
160+
// Required. The container format.
161+
//
162+
// Supported container formats:
163+
//
164+
// - `ts`, must contain exactly one audio stream and up to one video stream.
165+
// - `flv`, must contain at most one audio stream and at most one video
166+
// stream.
167+
string container = 2 [(google.api.field_behavior) = REQUIRED];
168+
169+
// Required. List of `ElementaryStream`
170+
// [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
171+
// in this stream. Must contain at least one audio stream and up to one video
172+
// stream.
173+
repeated string elementary_streams = 3
174+
[(google.api.field_behavior) = REQUIRED];
175+
}
176+
177+
// Distribution configuration.
178+
message Distribution {
179+
// State of this distribution.
180+
enum State {
181+
// State is not specified.
182+
STATE_UNSPECIFIED = 0;
183+
184+
// Distribution has trouble to produce or deliver the output.
185+
ERROR = 5;
186+
187+
// Distribution is not ready to be started.
188+
NOT_READY = 6;
189+
190+
// Distribution is ready to be started.
191+
READY = 7;
192+
193+
// Distribution is already started and is waiting for input.
194+
AWAITING_INPUT = 8;
195+
196+
// Distribution is already started and is generating output.
197+
DISTRIBUTING = 9;
198+
}
199+
200+
// Required. A unique key for this distribution. The key must be 1-63
201+
// characters in length. The key must begin and end with a letter (regardless
202+
// of case) or a number, but can contain dashes or underscores in between.
203+
string key = 1 [(google.api.field_behavior) = REQUIRED];
204+
205+
// Required. `DistributionStream`
206+
// [key][google.cloud.video.livestream.v1.DistributionStream.key]s that should
207+
// appear in this distribution output.
208+
//
209+
// - For SRT protocol, only `ts` distribution streams can be specified.
210+
// - For RTMP protocol, only `flv` distribution streams can be specified.
211+
string distribution_stream = 2 [(google.api.field_behavior) = REQUIRED];
212+
213+
// Output only. State of the distribution.
214+
State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
215+
216+
// Output only. Only present when the `state` is `ERROR`. The reason for the
217+
// error state of the distribution.
218+
google.rpc.Status error = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
219+
220+
// Configurations for the output endpoint by streaming protocols.
221+
oneof endpoint {
222+
// Output endpoint using SRT_PUSH.
223+
SrtPushOutputEndpoint srt_push = 5;
224+
225+
// Output endpoint using RTMP_PUSH.
226+
RtmpPushOutputEndpoint rtmp_push = 6;
227+
}
228+
}
229+
230+
// Configurations for an output endpoint using SRT_PUSH as the streaming
231+
// protocol.
232+
message SrtPushOutputEndpoint {
233+
// Required. The full URI of the remote SRT server.
234+
string uri = 1 [(google.api.field_behavior) = REQUIRED];
235+
236+
// Defines where SRT encryption passphrase are stored.
237+
oneof passphrase_source {
238+
// The name of the Secret Version containing the SRT encryption passphrase,
239+
// which is stored in Google Secret Manager. It should be in the format of
240+
// `projects/{project}/secrets/{secret_id}/versions/{version_number}`.
241+
string passphrase_secret_version = 2 [(google.api.resource_reference) = {
242+
type: "secretmanager.googleapis.com/SecretVersion"
243+
}];
244+
}
245+
}
246+
247+
// Configurations for an output endpoint using RTMP_PUSH as the streaming
248+
// protocol.
249+
message RtmpPushOutputEndpoint {
250+
// Required. The full URI of the remote RTMP server. For example:
251+
// `rtmp://192.168.123.321/live/my-stream` or `rtmp://somedomain.com/someapp`.
252+
string uri = 1 [(google.api.field_behavior) = REQUIRED];
253+
254+
// Required. Stream key for RTMP protocol.
255+
string stream_key = 2 [(google.api.field_behavior) = REQUIRED];
256+
}
257+
151258
// Sprite sheet configuration.
152259
message SpriteSheet {
153260
// Format type. The default is `jpeg`.
@@ -255,11 +362,11 @@ message VideoStream {
255362
// H264 codec settings.
256363
message H264CodecSettings {
257364
// Required. The width of the video in pixels. Must be an even integer.
258-
// Valid range is [320, 1920].
365+
// Valid range is [320, 4096].
259366
int32 width_pixels = 1;
260367

261368
// Required. The height of the video in pixels. Must be an even integer.
262-
// Valid range is [180, 1080].
369+
// Valid range is [180, 2160].
263370
int32 height_pixels = 2;
264371

265372
// Required. The target video frame rate in frames per second (FPS). Must be
@@ -275,6 +382,7 @@ message VideoStream {
275382
//
276383
// - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps).
277384
// - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps).
385+
// - For UHD resolution (<= 2160p), must be <= 25,000,000 (25 Mbps).
278386
int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED];
279387

280388
// Specifies whether an open Group of Pictures (GOP) structure should be
@@ -359,10 +467,91 @@ message VideoStream {
359467
string tune = 16;
360468
}
361469

470+
// H265 codec settings.
471+
message H265CodecSettings {
472+
// Optional. The width of the video in pixels. Must be an even integer.
473+
// When not specified, the width is adjusted to match the specified height
474+
// and input aspect ratio. If both are omitted, the input width is used.
475+
// Valid range is [320, 4096].
476+
int32 width_pixels = 1 [(google.api.field_behavior) = OPTIONAL];
477+
478+
// Optional. The height of the video in pixels. Must be an even integer.
479+
// When not specified, the height is adjusted to match the specified width
480+
// and input aspect ratio. If both are omitted, the input height is used.
481+
// Valid range is [180, 2160].
482+
int32 height_pixels = 2 [(google.api.field_behavior) = OPTIONAL];
483+
484+
// Required. The target video frame rate in frames per second (FPS). Must be
485+
// less than or equal to 120. Will default to the input frame rate if larger
486+
// than the input frame rate. The API will generate an output FPS that is
487+
// divisible by the input FPS, and smaller or equal to the target FPS. See
488+
// [Calculating frame
489+
// rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for
490+
// more information.
491+
double frame_rate = 3 [(google.api.field_behavior) = REQUIRED];
492+
493+
// Required. The video bitrate in bits per second. Minimum value is 10,000.
494+
//
495+
// - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps).
496+
// - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps).
497+
// - For UHD resolution (<= 2160p), must be <= 25,000,000 (25 Mbps).
498+
int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED];
499+
500+
// GOP mode can be either by frame count or duration.
501+
oneof gop_mode {
502+
// Optional. Select the GOP size based on the specified frame count.
503+
// If GOP frame count is set instead of GOP duration, GOP duration will be
504+
// calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration
505+
// must satisfy the limitations on `gopDuration` as well.
506+
// Valid range is [60, 600].
507+
int32 gop_frame_count = 7 [(google.api.field_behavior) = OPTIONAL];
508+
509+
// Optional. Select the GOP size based on the specified duration. The
510+
// default is `2s`. Note that `gopDuration` must be less than or equal to
511+
// [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration],
512+
// and
513+
// [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration]
514+
// must be divisible by `gopDuration`. Valid range is [2s, 20s].
515+
//
516+
// All video streams in the same channel must have the same GOP size.
517+
google.protobuf.Duration gop_duration = 8
518+
[(google.api.field_behavior) = OPTIONAL];
519+
}
520+
521+
// Optional. Size of the Video Buffering Verifier (VBV) buffer in bits. Must
522+
// be greater than zero. The default is equal to
523+
// [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H265CodecSettings.bitrate_bps].
524+
int32 vbv_size_bits = 9 [(google.api.field_behavior) = OPTIONAL];
525+
526+
// Optional. Initial fullness of the Video Buffering Verifier (VBV) buffer
527+
// in bits. Must be greater than zero. The default is equal to 90% of
528+
// [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H265CodecSettings.vbv_size_bits].
529+
int32 vbv_fullness_bits = 10 [(google.api.field_behavior) = OPTIONAL];
530+
531+
// Optional. Allow B-pyramid for reference frame selection. This may not be
532+
// supported on all decoders. The default is `false`.
533+
bool b_pyramid = 11 [(google.api.field_behavior) = OPTIONAL];
534+
535+
// Optional. The number of consecutive B-frames. Must be greater than or
536+
// equal to zero. Must be less than
537+
// [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H265CodecSettings.gop_frame_count]
538+
// if set. The default is 0.
539+
int32 b_frame_count = 12 [(google.api.field_behavior) = OPTIONAL];
540+
541+
// Optional. Specify the intensity of the adaptive quantizer (AQ). Must be
542+
// between 0 and 1, where 0 disables the quantizer and 1 maximizes the
543+
// quantizer. A higher value equals a lower bitrate but smoother image. The
544+
// default is 0.
545+
double aq_strength = 13 [(google.api.field_behavior) = OPTIONAL];
546+
}
547+
362548
// Codec settings.
363549
oneof codec_settings {
364550
// H264 codec settings.
365551
H264CodecSettings h264 = 20;
552+
553+
// H265 codec settings.
554+
H265CodecSettings h265 = 21;
366555
}
367556
}
368557

@@ -438,13 +627,60 @@ message AudioStream {
438627

439628
// Encoding of a text stream. For example, closed captions or subtitles.
440629
message TextStream {
630+
// The mapping for the input streams and text tracks.
631+
message TextMapping {
632+
// Optional. The `Channel`
633+
// [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]
634+
// that identifies the input that this text mapping applies to.
635+
string input_key = 4 [(google.api.field_behavior) = OPTIONAL];
636+
637+
// Optional. The zero-based index of the track in the input stream.
638+
int32 input_track = 2 [(google.api.field_behavior) = OPTIONAL];
639+
640+
// Optional. The channel of the closed caption in the input stream.
641+
// If this field is set, the output
642+
// [codec][google.cloud.video.livestream.v1.TextStream.codec] must be
643+
// `webvtt`. Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the codec of
644+
// the input closed caption is `cea608`; Must be one between `SERVICE1` and
645+
// `SERVICE64`, if the codec of the input closed caption is `cea708`.
646+
string input_cea_channel = 5 [(google.api.field_behavior) = OPTIONAL];
647+
648+
// Optional. The BCP-47 source language code, such as `en-US` or `sr-Latn`.
649+
// If differ from the textStream's language code, enable translation. For
650+
// more information on BCP-47 language codes, see
651+
// https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
652+
string from_language_code = 6 [(google.api.field_behavior) = OPTIONAL];
653+
}
654+
441655
// Required. The codec for this text stream.
442656
//
443657
// Supported text codecs:
444658
//
445659
// - `cea608`
446660
// - `cea708`
661+
// - `webvtt`
447662
string codec = 1 [(google.api.field_behavior) = REQUIRED];
663+
664+
// Optional. The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
665+
// information, see
666+
// https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
667+
string language_code = 2 [(google.api.field_behavior) = OPTIONAL];
668+
669+
// Optional. The name for this particular text stream that will be added to
670+
// the HLS/DASH manifest.
671+
string display_name = 4 [(google.api.field_behavior) = OPTIONAL];
672+
673+
// Optional. The channel of the closed caption in the output stream.
674+
// This field should only be set when textstream is used for partner
675+
// distribution.
676+
// Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the
677+
// [codec][google.cloud.video.livestream.v1.TextStream.codec] is `cea608`;
678+
// Must be one between `SERVICE1` and `SERVICE63`, if the
679+
// [codec][google.cloud.video.livestream.v1.TextStream.codec] is `cea708`.
680+
string output_cea_channel = 5 [(google.api.field_behavior) = OPTIONAL];
681+
682+
// Optional. The mapping for the input streams and text tracks.
683+
repeated TextMapping mapping = 3 [(google.api.field_behavior) = OPTIONAL];
448684
}
449685

450686
// Segment settings for `fmp4` and `ts`.

0 commit comments

Comments
 (0)