google-apis-transcoder_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1816 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module TranscoderV1
24
+
25
+ # Ad break.
26
+ class AdBreak
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Start time in seconds for the ad break, relative to the output file timeline.
30
+ # The default is `0s`.
31
+ # Corresponds to the JSON property `startTimeOffset`
32
+ # @return [String]
33
+ attr_accessor :start_time_offset
34
+
35
+ def initialize(**args)
36
+ update!(**args)
37
+ end
38
+
39
+ # Update properties of this object
40
+ def update!(**args)
41
+ @start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
42
+ end
43
+ end
44
+
45
+ # Animation types.
46
+ class Animation
47
+ include Google::Apis::Core::Hashable
48
+
49
+ # End previous overlay animation from the video. Without AnimationEnd, the
50
+ # overlay object will keep the state of previous animation until the end of the
51
+ # video.
52
+ # Corresponds to the JSON property `animationEnd`
53
+ # @return [Google::Apis::TranscoderV1::AnimationEnd]
54
+ attr_accessor :animation_end
55
+
56
+ # Display overlay object with fade animation.
57
+ # Corresponds to the JSON property `animationFade`
58
+ # @return [Google::Apis::TranscoderV1::AnimationFade]
59
+ attr_accessor :animation_fade
60
+
61
+ # Display static overlay object.
62
+ # Corresponds to the JSON property `animationStatic`
63
+ # @return [Google::Apis::TranscoderV1::AnimationStatic]
64
+ attr_accessor :animation_static
65
+
66
+ def initialize(**args)
67
+ update!(**args)
68
+ end
69
+
70
+ # Update properties of this object
71
+ def update!(**args)
72
+ @animation_end = args[:animation_end] if args.key?(:animation_end)
73
+ @animation_fade = args[:animation_fade] if args.key?(:animation_fade)
74
+ @animation_static = args[:animation_static] if args.key?(:animation_static)
75
+ end
76
+ end
77
+
78
+ # End previous overlay animation from the video. Without AnimationEnd, the
79
+ # overlay object will keep the state of previous animation until the end of the
80
+ # video.
81
+ class AnimationEnd
82
+ include Google::Apis::Core::Hashable
83
+
84
+ # The time to end overlay object, in seconds. Default: 0
85
+ # Corresponds to the JSON property `startTimeOffset`
86
+ # @return [String]
87
+ attr_accessor :start_time_offset
88
+
89
+ def initialize(**args)
90
+ update!(**args)
91
+ end
92
+
93
+ # Update properties of this object
94
+ def update!(**args)
95
+ @start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
96
+ end
97
+ end
98
+
99
+ # Display overlay object with fade animation.
100
+ class AnimationFade
101
+ include Google::Apis::Core::Hashable
102
+
103
+ # The time to end the fade animation, in seconds. Default: `start_time_offset` +
104
+ # 1s
105
+ # Corresponds to the JSON property `endTimeOffset`
106
+ # @return [String]
107
+ attr_accessor :end_time_offset
108
+
109
+ # Required. Type of fade animation: `FADE_IN` or `FADE_OUT`.
110
+ # Corresponds to the JSON property `fadeType`
111
+ # @return [String]
112
+ attr_accessor :fade_type
113
+
114
+ # The time to start the fade animation, in seconds. Default: 0
115
+ # Corresponds to the JSON property `startTimeOffset`
116
+ # @return [String]
117
+ attr_accessor :start_time_offset
118
+
119
+ # 2D normalized coordinates. Default: ``0.0, 0.0``
120
+ # Corresponds to the JSON property `xy`
121
+ # @return [Google::Apis::TranscoderV1::NormalizedCoordinate]
122
+ attr_accessor :xy
123
+
124
+ def initialize(**args)
125
+ update!(**args)
126
+ end
127
+
128
+ # Update properties of this object
129
+ def update!(**args)
130
+ @end_time_offset = args[:end_time_offset] if args.key?(:end_time_offset)
131
+ @fade_type = args[:fade_type] if args.key?(:fade_type)
132
+ @start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
133
+ @xy = args[:xy] if args.key?(:xy)
134
+ end
135
+ end
136
+
137
+ # Display static overlay object.
138
+ class AnimationStatic
139
+ include Google::Apis::Core::Hashable
140
+
141
+ # The time to start displaying the overlay object, in seconds. Default: 0
142
+ # Corresponds to the JSON property `startTimeOffset`
143
+ # @return [String]
144
+ attr_accessor :start_time_offset
145
+
146
+ # 2D normalized coordinates. Default: ``0.0, 0.0``
147
+ # Corresponds to the JSON property `xy`
148
+ # @return [Google::Apis::TranscoderV1::NormalizedCoordinate]
149
+ attr_accessor :xy
150
+
151
+ def initialize(**args)
152
+ update!(**args)
153
+ end
154
+
155
+ # Update properties of this object
156
+ def update!(**args)
157
+ @start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
158
+ @xy = args[:xy] if args.key?(:xy)
159
+ end
160
+ end
161
+
162
+ # Audio preprocessing configuration.
163
+ class Audio
164
+ include Google::Apis::Core::Hashable
165
+
166
+ # Enable boosting high frequency components. The default is `false`.
167
+ # Corresponds to the JSON property `highBoost`
168
+ # @return [Boolean]
169
+ attr_accessor :high_boost
170
+ alias_method :high_boost?, :high_boost
171
+
172
+ # Enable boosting low frequency components. The default is `false`.
173
+ # Corresponds to the JSON property `lowBoost`
174
+ # @return [Boolean]
175
+ attr_accessor :low_boost
176
+ alias_method :low_boost?, :low_boost
177
+
178
+ # Specify audio loudness normalization in loudness units relative to full scale (
179
+ # LUFS). Enter a value between -24 and 0 (the default), where: * -24 is the
180
+ # Advanced Television Systems Committee (ATSC A/85) standard * -23 is the EU
181
+ # R128 broadcast standard * -19 is the prior standard for online mono audio * -
182
+ # 18 is the ReplayGain standard * -16 is the prior standard for stereo audio * -
183
+ # 14 is the new online audio standard recommended by Spotify, as well as Amazon
184
+ # Echo * 0 disables normalization
185
+ # Corresponds to the JSON property `lufs`
186
+ # @return [Float]
187
+ attr_accessor :lufs
188
+
189
+ def initialize(**args)
190
+ update!(**args)
191
+ end
192
+
193
+ # Update properties of this object
194
+ def update!(**args)
195
+ @high_boost = args[:high_boost] if args.key?(:high_boost)
196
+ @low_boost = args[:low_boost] if args.key?(:low_boost)
197
+ @lufs = args[:lufs] if args.key?(:lufs)
198
+ end
199
+ end
200
+
201
+ # The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.
202
+ class AudioMapping
203
+ include Google::Apis::Core::Hashable
204
+
205
+ # Required. The `EditAtom.key` that references the atom with audio inputs in the
206
+ # `Job.edit_list`.
207
+ # Corresponds to the JSON property `atomKey`
208
+ # @return [String]
209
+ attr_accessor :atom_key
210
+
211
+ # Audio volume control in dB. Negative values decrease volume, positive values
212
+ # increase. The default is 0.
213
+ # Corresponds to the JSON property `gainDb`
214
+ # @return [Float]
215
+ attr_accessor :gain_db
216
+
217
+ # Required. The zero-based index of the channel in the input audio stream.
218
+ # Corresponds to the JSON property `inputChannel`
219
+ # @return [Fixnum]
220
+ attr_accessor :input_channel
221
+
222
+ # Required. The `Input.key` that identifies the input file.
223
+ # Corresponds to the JSON property `inputKey`
224
+ # @return [String]
225
+ attr_accessor :input_key
226
+
227
+ # Required. The zero-based index of the track in the input file.
228
+ # Corresponds to the JSON property `inputTrack`
229
+ # @return [Fixnum]
230
+ attr_accessor :input_track
231
+
232
+ # Required. The zero-based index of the channel in the output audio stream.
233
+ # Corresponds to the JSON property `outputChannel`
234
+ # @return [Fixnum]
235
+ attr_accessor :output_channel
236
+
237
+ def initialize(**args)
238
+ update!(**args)
239
+ end
240
+
241
+ # Update properties of this object
242
+ def update!(**args)
243
+ @atom_key = args[:atom_key] if args.key?(:atom_key)
244
+ @gain_db = args[:gain_db] if args.key?(:gain_db)
245
+ @input_channel = args[:input_channel] if args.key?(:input_channel)
246
+ @input_key = args[:input_key] if args.key?(:input_key)
247
+ @input_track = args[:input_track] if args.key?(:input_track)
248
+ @output_channel = args[:output_channel] if args.key?(:output_channel)
249
+ end
250
+ end
251
+
252
+ # Audio stream resource.
253
+ class AudioStream
254
+ include Google::Apis::Core::Hashable
255
+
256
+ # Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000.
257
+ # Corresponds to the JSON property `bitrateBps`
258
+ # @return [Fixnum]
259
+ attr_accessor :bitrate_bps
260
+
261
+ # Number of audio channels. Must be between 1 and 6. The default is 2.
262
+ # Corresponds to the JSON property `channelCount`
263
+ # @return [Fixnum]
264
+ attr_accessor :channel_count
265
+
266
+ # A list of channel names specifying layout of the audio channels. This only
267
+ # affects the metadata embedded in the container headers, if supported by the
268
+ # specified format. The default is `["fl", "fr"]`. Supported channel names: - `
269
+ # fl` - Front left channel - `fr` - Front right channel - `sl` - Side left
270
+ # channel - `sr` - Side right channel - `fc` - Front center channel - `lfe` -
271
+ # Low frequency
272
+ # Corresponds to the JSON property `channelLayout`
273
+ # @return [Array<String>]
274
+ attr_accessor :channel_layout
275
+
276
+ # The codec for this audio stream. The default is `aac`. Supported audio codecs:
277
+ # - `aac` - `aac-he` - `aac-he-v2` - `mp3` - `ac3` - `eac3`
278
+ # Corresponds to the JSON property `codec`
279
+ # @return [String]
280
+ attr_accessor :codec
281
+
282
+ # The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.
283
+ # Corresponds to the JSON property `mapping`
284
+ # @return [Array<Google::Apis::TranscoderV1::AudioMapping>]
285
+ attr_accessor :mapping
286
+
287
+ # The audio sample rate in Hertz. The default is 48000 Hertz.
288
+ # Corresponds to the JSON property `sampleRateHertz`
289
+ # @return [Fixnum]
290
+ attr_accessor :sample_rate_hertz
291
+
292
+ def initialize(**args)
293
+ update!(**args)
294
+ end
295
+
296
+ # Update properties of this object
297
+ def update!(**args)
298
+ @bitrate_bps = args[:bitrate_bps] if args.key?(:bitrate_bps)
299
+ @channel_count = args[:channel_count] if args.key?(:channel_count)
300
+ @channel_layout = args[:channel_layout] if args.key?(:channel_layout)
301
+ @codec = args[:codec] if args.key?(:codec)
302
+ @mapping = args[:mapping] if args.key?(:mapping)
303
+ @sample_rate_hertz = args[:sample_rate_hertz] if args.key?(:sample_rate_hertz)
304
+ end
305
+ end
306
+
307
+ # Color preprocessing configuration.
308
+ class Color
309
+ include Google::Apis::Core::Hashable
310
+
311
+ # Control brightness of the video. Enter a value between -1 and 1, where -1 is
312
+ # minimum brightness and 1 is maximum brightness. 0 is no change. The default is
313
+ # 0.
314
+ # Corresponds to the JSON property `brightness`
315
+ # @return [Float]
316
+ attr_accessor :brightness
317
+
318
+ # Control black and white contrast of the video. Enter a value between -1 and 1,
319
+ # where -1 is minimum contrast and 1 is maximum contrast. 0 is no change. The
320
+ # default is 0.
321
+ # Corresponds to the JSON property `contrast`
322
+ # @return [Float]
323
+ attr_accessor :contrast
324
+
325
+ # Control color saturation of the video. Enter a value between -1 and 1, where -
326
+ # 1 is fully desaturated and 1 is maximum saturation. 0 is no change. The
327
+ # default is 0.
328
+ # Corresponds to the JSON property `saturation`
329
+ # @return [Float]
330
+ attr_accessor :saturation
331
+
332
+ def initialize(**args)
333
+ update!(**args)
334
+ end
335
+
336
+ # Update properties of this object
337
+ def update!(**args)
338
+ @brightness = args[:brightness] if args.key?(:brightness)
339
+ @contrast = args[:contrast] if args.key?(:contrast)
340
+ @saturation = args[:saturation] if args.key?(:saturation)
341
+ end
342
+ end
343
+
344
+ # Video cropping configuration for the input video. The cropped input video is
345
+ # scaled to match the output resolution.
346
+ class Crop
347
+ include Google::Apis::Core::Hashable
348
+
349
+ # The number of pixels to crop from the bottom. The default is 0.
350
+ # Corresponds to the JSON property `bottomPixels`
351
+ # @return [Fixnum]
352
+ attr_accessor :bottom_pixels
353
+
354
+ # The number of pixels to crop from the left. The default is 0.
355
+ # Corresponds to the JSON property `leftPixels`
356
+ # @return [Fixnum]
357
+ attr_accessor :left_pixels
358
+
359
+ # The number of pixels to crop from the right. The default is 0.
360
+ # Corresponds to the JSON property `rightPixels`
361
+ # @return [Fixnum]
362
+ attr_accessor :right_pixels
363
+
364
+ # The number of pixels to crop from the top. The default is 0.
365
+ # Corresponds to the JSON property `topPixels`
366
+ # @return [Fixnum]
367
+ attr_accessor :top_pixels
368
+
369
+ def initialize(**args)
370
+ update!(**args)
371
+ end
372
+
373
+ # Update properties of this object
374
+ def update!(**args)
375
+ @bottom_pixels = args[:bottom_pixels] if args.key?(:bottom_pixels)
376
+ @left_pixels = args[:left_pixels] if args.key?(:left_pixels)
377
+ @right_pixels = args[:right_pixels] if args.key?(:right_pixels)
378
+ @top_pixels = args[:top_pixels] if args.key?(:top_pixels)
379
+ end
380
+ end
381
+
382
+ # Deblock preprocessing configuration.
383
+ class Deblock
384
+ include Google::Apis::Core::Hashable
385
+
386
+ # Enable deblocker. The default is `false`.
387
+ # Corresponds to the JSON property `enabled`
388
+ # @return [Boolean]
389
+ attr_accessor :enabled
390
+ alias_method :enabled?, :enabled
391
+
392
+ # Set strength of the deblocker. Enter a value between 0 and 1. The higher the
393
+ # value, the stronger the block removal. 0 is no deblocking. The default is 0.
394
+ # Corresponds to the JSON property `strength`
395
+ # @return [Float]
396
+ attr_accessor :strength
397
+
398
+ def initialize(**args)
399
+ update!(**args)
400
+ end
401
+
402
+ # Update properties of this object
403
+ def update!(**args)
404
+ @enabled = args[:enabled] if args.key?(:enabled)
405
+ @strength = args[:strength] if args.key?(:strength)
406
+ end
407
+ end
408
+
409
+ # Denoise preprocessing configuration.
410
+ class Denoise
411
+ include Google::Apis::Core::Hashable
412
+
413
+ # Set strength of the denoise. Enter a value between 0 and 1. The higher the
414
+ # value, the smoother the image. 0 is no denoising. The default is 0.
415
+ # Corresponds to the JSON property `strength`
416
+ # @return [Float]
417
+ attr_accessor :strength
418
+
419
+ # Set the denoiser mode. The default is `standard`. Supported denoiser modes: - `
420
+ # standard` - `grain`
421
+ # Corresponds to the JSON property `tune`
422
+ # @return [String]
423
+ attr_accessor :tune
424
+
425
+ def initialize(**args)
426
+ update!(**args)
427
+ end
428
+
429
+ # Update properties of this object
430
+ def update!(**args)
431
+ @strength = args[:strength] if args.key?(:strength)
432
+ @tune = args[:tune] if args.key?(:tune)
433
+ end
434
+ end
435
+
436
+ # Edit atom.
437
+ class EditAtom
438
+ include Google::Apis::Core::Hashable
439
+
440
+ # End time in seconds for the atom, relative to the input file timeline. When `
441
+ # end_time_offset` is not specified, the `inputs` are used until the end of the
442
+ # atom.
443
+ # Corresponds to the JSON property `endTimeOffset`
444
+ # @return [String]
445
+ attr_accessor :end_time_offset
446
+
447
+ # List of `Input.key`s identifying files that should be used in this atom. The
448
+ # listed `inputs` must have the same timeline.
449
+ # Corresponds to the JSON property `inputs`
450
+ # @return [Array<String>]
451
+ attr_accessor :inputs
452
+
453
+ # A unique key for this atom. Must be specified when using advanced mapping.
454
+ # Corresponds to the JSON property `key`
455
+ # @return [String]
456
+ attr_accessor :key
457
+
458
+ # Start time in seconds for the atom, relative to the input file timeline. The
459
+ # default is `0s`.
460
+ # Corresponds to the JSON property `startTimeOffset`
461
+ # @return [String]
462
+ attr_accessor :start_time_offset
463
+
464
+ def initialize(**args)
465
+ update!(**args)
466
+ end
467
+
468
+ # Update properties of this object
469
+ def update!(**args)
470
+ @end_time_offset = args[:end_time_offset] if args.key?(:end_time_offset)
471
+ @inputs = args[:inputs] if args.key?(:inputs)
472
+ @key = args[:key] if args.key?(:key)
473
+ @start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
474
+ end
475
+ end
476
+
477
+ # Encoding of an input file such as an audio, video, or text track. Elementary
478
+ # streams must be packaged before mapping and sharing between different output
479
+ # formats.
480
+ class ElementaryStream
481
+ include Google::Apis::Core::Hashable
482
+
483
+ # Audio stream resource.
484
+ # Corresponds to the JSON property `audioStream`
485
+ # @return [Google::Apis::TranscoderV1::AudioStream]
486
+ attr_accessor :audio_stream
487
+
488
+ # A unique key for this elementary stream.
489
+ # Corresponds to the JSON property `key`
490
+ # @return [String]
491
+ attr_accessor :key
492
+
493
+ # Encoding of a text stream. For example, closed captions or subtitles.
494
+ # Corresponds to the JSON property `textStream`
495
+ # @return [Google::Apis::TranscoderV1::TextStream]
496
+ attr_accessor :text_stream
497
+
498
+ # Video stream resource.
499
+ # Corresponds to the JSON property `videoStream`
500
+ # @return [Google::Apis::TranscoderV1::VideoStream]
501
+ attr_accessor :video_stream
502
+
503
+ def initialize(**args)
504
+ update!(**args)
505
+ end
506
+
507
+ # Update properties of this object
508
+ def update!(**args)
509
+ @audio_stream = args[:audio_stream] if args.key?(:audio_stream)
510
+ @key = args[:key] if args.key?(:key)
511
+ @text_stream = args[:text_stream] if args.key?(:text_stream)
512
+ @video_stream = args[:video_stream] if args.key?(:video_stream)
513
+ end
514
+ end
515
+
516
+ # A generic empty message that you can re-use to avoid defining duplicated empty
517
+ # messages in your APIs. A typical example is to use it as the request or the
518
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
519
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
520
+ # `Empty` is empty JSON object ````.
521
+ class Empty
522
+ include Google::Apis::Core::Hashable
523
+
524
+ def initialize(**args)
525
+ update!(**args)
526
+ end
527
+
528
+ # Update properties of this object
529
+ def update!(**args)
530
+ end
531
+ end
532
+
533
+ # H264 codec settings.
534
+ class H264CodecSettings
535
+ include Google::Apis::Core::Hashable
536
+
537
+ # Specifies whether an open Group of Pictures (GOP) structure should be allowed
538
+ # or not. The default is `false`.
539
+ # Corresponds to the JSON property `allowOpenGop`
540
+ # @return [Boolean]
541
+ attr_accessor :allow_open_gop
542
+ alias_method :allow_open_gop?, :allow_open_gop
543
+
544
+ # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and 1,
545
+ # where 0 disables the quantizer and 1 maximizes the quantizer. A higher value
546
+ # equals a lower bitrate but smoother image. The default is 0.
547
+ # Corresponds to the JSON property `aqStrength`
548
+ # @return [Float]
549
+ attr_accessor :aq_strength
550
+
551
+ # The number of consecutive B-frames. Must be greater than or equal to zero.
552
+ # Must be less than `VideoStream.gop_frame_count` if set. The default is 0.
553
+ # Corresponds to the JSON property `bFrameCount`
554
+ # @return [Fixnum]
555
+ attr_accessor :b_frame_count
556
+
557
+ # Allow B-pyramid for reference frame selection. This may not be supported on
558
+ # all decoders. The default is `false`.
559
+ # Corresponds to the JSON property `bPyramid`
560
+ # @return [Boolean]
561
+ attr_accessor :b_pyramid
562
+ alias_method :b_pyramid?, :b_pyramid
563
+
564
+ # Required. The video bitrate in bits per second. The minimum value is 1,000.
565
+ # The maximum value is 800,000,000.
566
+ # Corresponds to the JSON property `bitrateBps`
567
+ # @return [Fixnum]
568
+ attr_accessor :bitrate_bps
569
+
570
+ # Target CRF level. Must be between 10 and 36, where 10 is the highest quality
571
+ # and 36 is the most efficient compression. The default is 21.
572
+ # Corresponds to the JSON property `crfLevel`
573
+ # @return [Fixnum]
574
+ attr_accessor :crf_level
575
+
576
+ # Use two-pass encoding strategy to achieve better video quality. `VideoStream.
577
+ # rate_control_mode` must be `vbr`. The default is `false`.
578
+ # Corresponds to the JSON property `enableTwoPass`
579
+ # @return [Boolean]
580
+ attr_accessor :enable_two_pass
581
+ alias_method :enable_two_pass?, :enable_two_pass
582
+
583
+ # The entropy coder to use. The default is `cabac`. Supported entropy coders: - `
584
+ # cavlc` - `cabac`
585
+ # Corresponds to the JSON property `entropyCoder`
586
+ # @return [String]
587
+ attr_accessor :entropy_coder
588
+
589
+ # Required. The target video frame rate in frames per second (FPS). Must be less
590
+ # than or equal to 120. Will default to the input frame rate if larger than the
591
+ # input frame rate. The API will generate an output FPS that is divisible by the
592
+ # input FPS, and smaller or equal to the target FPS. See [Calculating frame rate]
593
+ # (https://cloud.google.com/transcoder/docs/concepts/frame-rate) for more
594
+ # information.
595
+ # Corresponds to the JSON property `frameRate`
596
+ # @return [Float]
597
+ attr_accessor :frame_rate
598
+
599
+ # Select the GOP size based on the specified duration. The default is `3s`. Note
600
+ # that `gopDuration` must be less than or equal to [`segmentDuration`](#
601
+ # SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible
602
+ # by `gopDuration`.
603
+ # Corresponds to the JSON property `gopDuration`
604
+ # @return [String]
605
+ attr_accessor :gop_duration
606
+
607
+ # Select the GOP size based on the specified frame count. Must be greater than
608
+ # zero.
609
+ # Corresponds to the JSON property `gopFrameCount`
610
+ # @return [Fixnum]
611
+ attr_accessor :gop_frame_count
612
+
613
+ # The height of the video in pixels. Must be an even integer. When not specified,
614
+ # the height is adjusted to match the specified width and input aspect ratio.
615
+ # If both are omitted, the input height is used.
616
+ # Corresponds to the JSON property `heightPixels`
617
+ # @return [Fixnum]
618
+ attr_accessor :height_pixels
619
+
620
+ # Pixel format to use. The default is `yuv420p`. Supported pixel formats: - `
621
+ # yuv420p` pixel format - `yuv422p` pixel format - `yuv444p` pixel format - `
622
+ # yuv420p10` 10-bit HDR pixel format - `yuv422p10` 10-bit HDR pixel format - `
623
+ # yuv444p10` 10-bit HDR pixel format - `yuv420p12` 12-bit HDR pixel format - `
624
+ # yuv422p12` 12-bit HDR pixel format - `yuv444p12` 12-bit HDR pixel format
625
+ # Corresponds to the JSON property `pixelFormat`
626
+ # @return [String]
627
+ attr_accessor :pixel_format
628
+
629
+ # Enforces the specified codec preset. The default is `veryfast`. The available
630
+ # options are [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#
631
+ # Preset). Note that certain values for this field may cause the transcoder to
632
+ # override other fields you set in the `H264CodecSettings` message.
633
+ # Corresponds to the JSON property `preset`
634
+ # @return [String]
635
+ attr_accessor :preset
636
+
637
+ # Enforces the specified codec profile. The following profiles are supported: * `
638
+ # baseline` * `main` * `high` (default) The available options are [FFmpeg-
639
+ # compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). Note that certain
640
+ # values for this field may cause the transcoder to override other fields you
641
+ # set in the `H264CodecSettings` message.
642
+ # Corresponds to the JSON property `profile`
643
+ # @return [String]
644
+ attr_accessor :profile
645
+
646
+ # Specify the `rate_control_mode`. The default is `vbr`. Supported rate control
647
+ # modes: - `vbr` - variable bitrate - `crf` - constant rate factor
648
+ # Corresponds to the JSON property `rateControlMode`
649
+ # @return [String]
650
+ attr_accessor :rate_control_mode
651
+
652
+ # Enforces the specified codec tune. The available options are [FFmpeg-
653
+ # compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). Note that certain
654
+ # values for this field may cause the transcoder to override other fields you
655
+ # set in the `H264CodecSettings` message.
656
+ # Corresponds to the JSON property `tune`
657
+ # @return [String]
658
+ attr_accessor :tune
659
+
660
+ # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be
661
+ # greater than zero. The default is equal to 90% of `VideoStream.vbv_size_bits`.
662
+ # Corresponds to the JSON property `vbvFullnessBits`
663
+ # @return [Fixnum]
664
+ attr_accessor :vbv_fullness_bits
665
+
666
+ # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater
667
+ # than zero. The default is equal to `VideoStream.bitrate_bps`.
668
+ # Corresponds to the JSON property `vbvSizeBits`
669
+ # @return [Fixnum]
670
+ attr_accessor :vbv_size_bits
671
+
672
+ # The width of the video in pixels. Must be an even integer. When not specified,
673
+ # the width is adjusted to match the specified height and input aspect ratio. If
674
+ # both are omitted, the input width is used.
675
+ # Corresponds to the JSON property `widthPixels`
676
+ # @return [Fixnum]
677
+ attr_accessor :width_pixels
678
+
679
+ def initialize(**args)
680
+ update!(**args)
681
+ end
682
+
683
+ # Update properties of this object
684
+ def update!(**args)
685
+ @allow_open_gop = args[:allow_open_gop] if args.key?(:allow_open_gop)
686
+ @aq_strength = args[:aq_strength] if args.key?(:aq_strength)
687
+ @b_frame_count = args[:b_frame_count] if args.key?(:b_frame_count)
688
+ @b_pyramid = args[:b_pyramid] if args.key?(:b_pyramid)
689
+ @bitrate_bps = args[:bitrate_bps] if args.key?(:bitrate_bps)
690
+ @crf_level = args[:crf_level] if args.key?(:crf_level)
691
+ @enable_two_pass = args[:enable_two_pass] if args.key?(:enable_two_pass)
692
+ @entropy_coder = args[:entropy_coder] if args.key?(:entropy_coder)
693
+ @frame_rate = args[:frame_rate] if args.key?(:frame_rate)
694
+ @gop_duration = args[:gop_duration] if args.key?(:gop_duration)
695
+ @gop_frame_count = args[:gop_frame_count] if args.key?(:gop_frame_count)
696
+ @height_pixels = args[:height_pixels] if args.key?(:height_pixels)
697
+ @pixel_format = args[:pixel_format] if args.key?(:pixel_format)
698
+ @preset = args[:preset] if args.key?(:preset)
699
+ @profile = args[:profile] if args.key?(:profile)
700
+ @rate_control_mode = args[:rate_control_mode] if args.key?(:rate_control_mode)
701
+ @tune = args[:tune] if args.key?(:tune)
702
+ @vbv_fullness_bits = args[:vbv_fullness_bits] if args.key?(:vbv_fullness_bits)
703
+ @vbv_size_bits = args[:vbv_size_bits] if args.key?(:vbv_size_bits)
704
+ @width_pixels = args[:width_pixels] if args.key?(:width_pixels)
705
+ end
706
+ end
707
+
708
+ # H265 codec settings.
709
+ class H265CodecSettings
710
+ include Google::Apis::Core::Hashable
711
+
712
+ # Specifies whether an open Group of Pictures (GOP) structure should be allowed
713
+ # or not. The default is `false`.
714
+ # Corresponds to the JSON property `allowOpenGop`
715
+ # @return [Boolean]
716
+ attr_accessor :allow_open_gop
717
+ alias_method :allow_open_gop?, :allow_open_gop
718
+
719
+ # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and 1,
720
+ # where 0 disables the quantizer and 1 maximizes the quantizer. A higher value
721
+ # equals a lower bitrate but smoother image. The default is 0.
722
+ # Corresponds to the JSON property `aqStrength`
723
+ # @return [Float]
724
+ attr_accessor :aq_strength
725
+
726
+ # The number of consecutive B-frames. Must be greater than or equal to zero.
727
+ # Must be less than `VideoStream.gop_frame_count` if set. The default is 0.
728
+ # Corresponds to the JSON property `bFrameCount`
729
+ # @return [Fixnum]
730
+ attr_accessor :b_frame_count
731
+
732
+ # Allow B-pyramid for reference frame selection. This may not be supported on
733
+ # all decoders. The default is `false`.
734
+ # Corresponds to the JSON property `bPyramid`
735
+ # @return [Boolean]
736
+ attr_accessor :b_pyramid
737
+ alias_method :b_pyramid?, :b_pyramid
738
+
739
+ # Required. The video bitrate in bits per second. The minimum value is 1,000.
740
+ # The maximum value is 800,000,000.
741
+ # Corresponds to the JSON property `bitrateBps`
742
+ # @return [Fixnum]
743
+ attr_accessor :bitrate_bps
744
+
745
+ # Target CRF level. Must be between 10 and 36, where 10 is the highest quality
746
+ # and 36 is the most efficient compression. The default is 21.
747
+ # Corresponds to the JSON property `crfLevel`
748
+ # @return [Fixnum]
749
+ attr_accessor :crf_level
750
+
751
+ # Use two-pass encoding strategy to achieve better video quality. `VideoStream.
752
+ # rate_control_mode` must be `vbr`. The default is `false`.
753
+ # Corresponds to the JSON property `enableTwoPass`
754
+ # @return [Boolean]
755
+ attr_accessor :enable_two_pass
756
+ alias_method :enable_two_pass?, :enable_two_pass
757
+
758
+ # Required. The target video frame rate in frames per second (FPS). Must be less
759
+ # than or equal to 120. Will default to the input frame rate if larger than the
760
+ # input frame rate. The API will generate an output FPS that is divisible by the
761
+ # input FPS, and smaller or equal to the target FPS. See [Calculating frame rate]
762
+ # (https://cloud.google.com/transcoder/docs/concepts/frame-rate) for more
763
+ # information.
764
+ # Corresponds to the JSON property `frameRate`
765
+ # @return [Float]
766
+ attr_accessor :frame_rate
767
+
768
+ # Select the GOP size based on the specified duration. The default is `3s`. Note
769
+ # that `gopDuration` must be less than or equal to [`segmentDuration`](#
770
+ # SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible
771
+ # by `gopDuration`.
772
+ # Corresponds to the JSON property `gopDuration`
773
+ # @return [String]
774
+ attr_accessor :gop_duration
775
+
776
+ # Select the GOP size based on the specified frame count. Must be greater than
777
+ # zero.
778
+ # Corresponds to the JSON property `gopFrameCount`
779
+ # @return [Fixnum]
780
+ attr_accessor :gop_frame_count
781
+
782
+ # The height of the video in pixels. Must be an even integer. When not specified,
783
+ # the height is adjusted to match the specified width and input aspect ratio.
784
+ # If both are omitted, the input height is used.
785
+ # Corresponds to the JSON property `heightPixels`
786
+ # @return [Fixnum]
787
+ attr_accessor :height_pixels
788
+
789
+ # Pixel format to use. The default is `yuv420p`. Supported pixel formats: - `
790
+ # yuv420p` pixel format - `yuv422p` pixel format - `yuv444p` pixel format - `
791
+ # yuv420p10` 10-bit HDR pixel format - `yuv422p10` 10-bit HDR pixel format - `
792
+ # yuv444p10` 10-bit HDR pixel format - `yuv420p12` 12-bit HDR pixel format - `
793
+ # yuv422p12` 12-bit HDR pixel format - `yuv444p12` 12-bit HDR pixel format
794
+ # Corresponds to the JSON property `pixelFormat`
795
+ # @return [String]
796
+ attr_accessor :pixel_format
797
+
798
+ # Enforces the specified codec preset. The default is `veryfast`. The available
799
+ # options are [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265).
800
+ # Note that certain values for this field may cause the transcoder to override
801
+ # other fields you set in the `H265CodecSettings` message.
802
+ # Corresponds to the JSON property `preset`
803
+ # @return [String]
804
+ attr_accessor :preset
805
+
806
+ # Enforces the specified codec profile. The following profiles are supported: *
807
+ # 8-bit profiles * `main` (default) * `main-intra` * `mainstillpicture` * 10-bit
808
+ # profiles * `main10` (default) * `main10-intra` * `main422-10` * `main422-10-
809
+ # intra` * `main444-10` * `main444-10-intra` * 12-bit profiles * `main12` (
810
+ # default) * `main12-intra` * `main422-12` * `main422-12-intra` * `main444-12` *
811
+ # `main444-12-intra` The available options are [FFmpeg-compatible](https://x265.
812
+ # readthedocs.io/). Note that certain values for this field may cause the
813
+ # transcoder to override other fields you set in the `H265CodecSettings` message.
814
+ # Corresponds to the JSON property `profile`
815
+ # @return [String]
816
+ attr_accessor :profile
817
+
818
+ # Specify the `rate_control_mode`. The default is `vbr`. Supported rate control
819
+ # modes: - `vbr` - variable bitrate - `crf` - constant rate factor
820
+ # Corresponds to the JSON property `rateControlMode`
821
+ # @return [String]
822
+ attr_accessor :rate_control_mode
823
+
824
+ # Enforces the specified codec tune. The available options are [FFmpeg-
825
+ # compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). Note that certain
826
+ # values for this field may cause the transcoder to override other fields you
827
+ # set in the `H265CodecSettings` message.
828
+ # Corresponds to the JSON property `tune`
829
+ # @return [String]
830
+ attr_accessor :tune
831
+
832
+ # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be
833
+ # greater than zero. The default is equal to 90% of `VideoStream.vbv_size_bits`.
834
+ # Corresponds to the JSON property `vbvFullnessBits`
835
+ # @return [Fixnum]
836
+ attr_accessor :vbv_fullness_bits
837
+
838
+ # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater
839
+ # than zero. The default is equal to `VideoStream.bitrate_bps`.
840
+ # Corresponds to the JSON property `vbvSizeBits`
841
+ # @return [Fixnum]
842
+ attr_accessor :vbv_size_bits
843
+
844
+ # The width of the video in pixels. Must be an even integer. When not specified,
845
+ # the width is adjusted to match the specified height and input aspect ratio. If
846
+ # both are omitted, the input width is used.
847
+ # Corresponds to the JSON property `widthPixels`
848
+ # @return [Fixnum]
849
+ attr_accessor :width_pixels
850
+
851
+ def initialize(**args)
852
+ update!(**args)
853
+ end
854
+
855
+ # Update properties of this object
856
+ def update!(**args)
857
+ @allow_open_gop = args[:allow_open_gop] if args.key?(:allow_open_gop)
858
+ @aq_strength = args[:aq_strength] if args.key?(:aq_strength)
859
+ @b_frame_count = args[:b_frame_count] if args.key?(:b_frame_count)
860
+ @b_pyramid = args[:b_pyramid] if args.key?(:b_pyramid)
861
+ @bitrate_bps = args[:bitrate_bps] if args.key?(:bitrate_bps)
862
+ @crf_level = args[:crf_level] if args.key?(:crf_level)
863
+ @enable_two_pass = args[:enable_two_pass] if args.key?(:enable_two_pass)
864
+ @frame_rate = args[:frame_rate] if args.key?(:frame_rate)
865
+ @gop_duration = args[:gop_duration] if args.key?(:gop_duration)
866
+ @gop_frame_count = args[:gop_frame_count] if args.key?(:gop_frame_count)
867
+ @height_pixels = args[:height_pixels] if args.key?(:height_pixels)
868
+ @pixel_format = args[:pixel_format] if args.key?(:pixel_format)
869
+ @preset = args[:preset] if args.key?(:preset)
870
+ @profile = args[:profile] if args.key?(:profile)
871
+ @rate_control_mode = args[:rate_control_mode] if args.key?(:rate_control_mode)
872
+ @tune = args[:tune] if args.key?(:tune)
873
+ @vbv_fullness_bits = args[:vbv_fullness_bits] if args.key?(:vbv_fullness_bits)
874
+ @vbv_size_bits = args[:vbv_size_bits] if args.key?(:vbv_size_bits)
875
+ @width_pixels = args[:width_pixels] if args.key?(:width_pixels)
876
+ end
877
+ end
878
+
879
+ # Overlaid jpeg image.
880
+ class Image
881
+ include Google::Apis::Core::Hashable
882
+
883
+ # Target image opacity. Valid values are from `1.0` (solid, default) to `0.0` (
884
+ # transparent), exclusive. Set this to a value greater than `0.0`.
885
+ # Corresponds to the JSON property `alpha`
886
+ # @return [Float]
887
+ attr_accessor :alpha
888
+
889
+ # 2D normalized coordinates. Default: ``0.0, 0.0``
890
+ # Corresponds to the JSON property `resolution`
891
+ # @return [Google::Apis::TranscoderV1::NormalizedCoordinate]
892
+ attr_accessor :resolution
893
+
894
+ # Required. URI of the JPEG image in Cloud Storage. For example, `gs://bucket/
895
+ # inputs/image.jpeg`. JPEG is the only supported image type.
896
+ # Corresponds to the JSON property `uri`
897
+ # @return [String]
898
+ attr_accessor :uri
899
+
900
+ def initialize(**args)
901
+ update!(**args)
902
+ end
903
+
904
+ # Update properties of this object
905
+ def update!(**args)
906
+ @alpha = args[:alpha] if args.key?(:alpha)
907
+ @resolution = args[:resolution] if args.key?(:resolution)
908
+ @uri = args[:uri] if args.key?(:uri)
909
+ end
910
+ end
911
+
912
+ # Input asset.
913
+ class Input
914
+ include Google::Apis::Core::Hashable
915
+
916
+ # A unique key for this input. Must be specified when using advanced mapping and
917
+ # edit lists.
918
+ # Corresponds to the JSON property `key`
919
+ # @return [String]
920
+ attr_accessor :key
921
+
922
+ # Preprocessing configurations.
923
+ # Corresponds to the JSON property `preprocessingConfig`
924
+ # @return [Google::Apis::TranscoderV1::PreprocessingConfig]
925
+ attr_accessor :preprocessing_config
926
+
927
+ # URI of the media. Input files must be at least 5 seconds in duration and
928
+ # stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). If empty,
929
+ # the value will be populated from `Job.input_uri`.
930
+ # Corresponds to the JSON property `uri`
931
+ # @return [String]
932
+ attr_accessor :uri
933
+
934
+ def initialize(**args)
935
+ update!(**args)
936
+ end
937
+
938
+ # Update properties of this object
939
+ def update!(**args)
940
+ @key = args[:key] if args.key?(:key)
941
+ @preprocessing_config = args[:preprocessing_config] if args.key?(:preprocessing_config)
942
+ @uri = args[:uri] if args.key?(:uri)
943
+ end
944
+ end
945
+
946
+ # Transcoding job resource.
947
+ class Job
948
+ include Google::Apis::Core::Hashable
949
+
950
+ # Job configuration
951
+ # Corresponds to the JSON property `config`
952
+ # @return [Google::Apis::TranscoderV1::JobConfig]
953
+ attr_accessor :config
954
+
955
+ # Output only. The time the job was created.
956
+ # Corresponds to the JSON property `createTime`
957
+ # @return [String]
958
+ attr_accessor :create_time
959
+
960
+ # Output only. The time the transcoding finished.
961
+ # Corresponds to the JSON property `endTime`
962
+ # @return [String]
963
+ attr_accessor :end_time
964
+
965
+ # The `Status` type defines a logical error model that is suitable for different
966
+ # programming environments, including REST APIs and RPC APIs. It is used by [
967
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
968
+ # data: error code, error message, and error details. You can find out more
969
+ # about this error model and how to work with it in the [API Design Guide](https:
970
+ # //cloud.google.com/apis/design/errors).
971
+ # Corresponds to the JSON property `error`
972
+ # @return [Google::Apis::TranscoderV1::Status]
973
+ attr_accessor :error
974
+
975
+ # Input only. Specify the `input_uri` to populate empty `uri` fields in each
976
+ # element of `Job.config.inputs` or `JobTemplate.config.inputs` when using
977
+ # template. URI of the media. Input files must be at least 5 seconds in duration
978
+ # and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
979
+ # Corresponds to the JSON property `inputUri`
980
+ # @return [String]
981
+ attr_accessor :input_uri
982
+
983
+ # The resource name of the job. Format: `projects/`project_number`/locations/`
984
+ # location`/jobs/`job``
985
+ # Corresponds to the JSON property `name`
986
+ # @return [String]
987
+ attr_accessor :name
988
+
989
+ # Input only. Specify the `output_uri` to populate an empty `Job.config.output.
990
+ # uri` or `JobTemplate.config.output.uri` when using template. URI for the
991
+ # output file(s). For example, `gs://my-bucket/outputs/`.
992
+ # Corresponds to the JSON property `outputUri`
993
+ # @return [String]
994
+ attr_accessor :output_uri
995
+
996
+ # Output only. The time the transcoding started.
997
+ # Corresponds to the JSON property `startTime`
998
+ # @return [String]
999
+ attr_accessor :start_time
1000
+
1001
+ # Output only. The current state of the job.
1002
+ # Corresponds to the JSON property `state`
1003
+ # @return [String]
1004
+ attr_accessor :state
1005
+
1006
+ # Input only. Specify the `template_id` to use for populating `Job.config`. The
1007
+ # default is `preset/web-hd`. Preset Transcoder templates: - `preset/`preset_id``
1008
+ # - User defined JobTemplate: ``job_template_id``
1009
+ # Corresponds to the JSON property `templateId`
1010
+ # @return [String]
1011
+ attr_accessor :template_id
1012
+
1013
+ # Job time to live value in days, which will be effective after job completion.
1014
+ # Job should be deleted automatically after the given TTL. Enter a value between
1015
+ # 1 and 90. The default is 30.
1016
+ # Corresponds to the JSON property `ttlAfterCompletionDays`
1017
+ # @return [Fixnum]
1018
+ attr_accessor :ttl_after_completion_days
1019
+
1020
+ def initialize(**args)
1021
+ update!(**args)
1022
+ end
1023
+
1024
+ # Update properties of this object
1025
+ def update!(**args)
1026
+ @config = args[:config] if args.key?(:config)
1027
+ @create_time = args[:create_time] if args.key?(:create_time)
1028
+ @end_time = args[:end_time] if args.key?(:end_time)
1029
+ @error = args[:error] if args.key?(:error)
1030
+ @input_uri = args[:input_uri] if args.key?(:input_uri)
1031
+ @name = args[:name] if args.key?(:name)
1032
+ @output_uri = args[:output_uri] if args.key?(:output_uri)
1033
+ @start_time = args[:start_time] if args.key?(:start_time)
1034
+ @state = args[:state] if args.key?(:state)
1035
+ @template_id = args[:template_id] if args.key?(:template_id)
1036
+ @ttl_after_completion_days = args[:ttl_after_completion_days] if args.key?(:ttl_after_completion_days)
1037
+ end
1038
+ end
1039
+
1040
+ # Job configuration
1041
+ class JobConfig
1042
+ include Google::Apis::Core::Hashable
1043
+
1044
+ # List of ad breaks. Specifies where to insert ad break tags in the output
1045
+ # manifests.
1046
+ # Corresponds to the JSON property `adBreaks`
1047
+ # @return [Array<Google::Apis::TranscoderV1::AdBreak>]
1048
+ attr_accessor :ad_breaks
1049
+
1050
+ # List of `Edit atom`s. Defines the ultimate timeline of the resulting file or
1051
+ # manifest.
1052
+ # Corresponds to the JSON property `editList`
1053
+ # @return [Array<Google::Apis::TranscoderV1::EditAtom>]
1054
+ attr_accessor :edit_list
1055
+
1056
+ # List of elementary streams.
1057
+ # Corresponds to the JSON property `elementaryStreams`
1058
+ # @return [Array<Google::Apis::TranscoderV1::ElementaryStream>]
1059
+ attr_accessor :elementary_streams
1060
+
1061
+ # List of input assets stored in Cloud Storage.
1062
+ # Corresponds to the JSON property `inputs`
1063
+ # @return [Array<Google::Apis::TranscoderV1::Input>]
1064
+ attr_accessor :inputs
1065
+
1066
+ # List of output manifests.
1067
+ # Corresponds to the JSON property `manifests`
1068
+ # @return [Array<Google::Apis::TranscoderV1::Manifest>]
1069
+ attr_accessor :manifests
1070
+
1071
+ # List of multiplexing settings for output streams.
1072
+ # Corresponds to the JSON property `muxStreams`
1073
+ # @return [Array<Google::Apis::TranscoderV1::MuxStream>]
1074
+ attr_accessor :mux_streams
1075
+
1076
+ # Location of output file(s) in a Cloud Storage bucket.
1077
+ # Corresponds to the JSON property `output`
1078
+ # @return [Google::Apis::TranscoderV1::Output]
1079
+ attr_accessor :output
1080
+
1081
+ # List of overlays on the output video, in descending Z-order.
1082
+ # Corresponds to the JSON property `overlays`
1083
+ # @return [Array<Google::Apis::TranscoderV1::Overlay>]
1084
+ attr_accessor :overlays
1085
+
1086
+ # A Pub/Sub destination.
1087
+ # Corresponds to the JSON property `pubsubDestination`
1088
+ # @return [Google::Apis::TranscoderV1::PubsubDestination]
1089
+ attr_accessor :pubsub_destination
1090
+
1091
+ # List of output sprite sheets.
1092
+ # Corresponds to the JSON property `spriteSheets`
1093
+ # @return [Array<Google::Apis::TranscoderV1::SpriteSheet>]
1094
+ attr_accessor :sprite_sheets
1095
+
1096
+ def initialize(**args)
1097
+ update!(**args)
1098
+ end
1099
+
1100
+ # Update properties of this object
1101
+ def update!(**args)
1102
+ @ad_breaks = args[:ad_breaks] if args.key?(:ad_breaks)
1103
+ @edit_list = args[:edit_list] if args.key?(:edit_list)
1104
+ @elementary_streams = args[:elementary_streams] if args.key?(:elementary_streams)
1105
+ @inputs = args[:inputs] if args.key?(:inputs)
1106
+ @manifests = args[:manifests] if args.key?(:manifests)
1107
+ @mux_streams = args[:mux_streams] if args.key?(:mux_streams)
1108
+ @output = args[:output] if args.key?(:output)
1109
+ @overlays = args[:overlays] if args.key?(:overlays)
1110
+ @pubsub_destination = args[:pubsub_destination] if args.key?(:pubsub_destination)
1111
+ @sprite_sheets = args[:sprite_sheets] if args.key?(:sprite_sheets)
1112
+ end
1113
+ end
1114
+
1115
+ # Transcoding job template resource.
1116
+ class JobTemplate
1117
+ include Google::Apis::Core::Hashable
1118
+
1119
+ # Job configuration
1120
+ # Corresponds to the JSON property `config`
1121
+ # @return [Google::Apis::TranscoderV1::JobConfig]
1122
+ attr_accessor :config
1123
+
1124
+ # The resource name of the job template. Format: `projects/`project_number`/
1125
+ # locations/`location`/jobTemplates/`job_template``
1126
+ # Corresponds to the JSON property `name`
1127
+ # @return [String]
1128
+ attr_accessor :name
1129
+
1130
+ def initialize(**args)
1131
+ update!(**args)
1132
+ end
1133
+
1134
+ # Update properties of this object
1135
+ def update!(**args)
1136
+ @config = args[:config] if args.key?(:config)
1137
+ @name = args[:name] if args.key?(:name)
1138
+ end
1139
+ end
1140
+
1141
+ # Response message for `TranscoderService.ListJobTemplates`.
1142
+ class ListJobTemplatesResponse
1143
+ include Google::Apis::Core::Hashable
1144
+
1145
+ # List of job templates in the specified region.
1146
+ # Corresponds to the JSON property `jobTemplates`
1147
+ # @return [Array<Google::Apis::TranscoderV1::JobTemplate>]
1148
+ attr_accessor :job_templates
1149
+
1150
+ # The pagination token.
1151
+ # Corresponds to the JSON property `nextPageToken`
1152
+ # @return [String]
1153
+ attr_accessor :next_page_token
1154
+
1155
+ # List of regions that could not be reached.
1156
+ # Corresponds to the JSON property `unreachable`
1157
+ # @return [Array<String>]
1158
+ attr_accessor :unreachable
1159
+
1160
+ def initialize(**args)
1161
+ update!(**args)
1162
+ end
1163
+
1164
+ # Update properties of this object
1165
+ def update!(**args)
1166
+ @job_templates = args[:job_templates] if args.key?(:job_templates)
1167
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1168
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
1169
+ end
1170
+ end
1171
+
1172
+ # Response message for `TranscoderService.ListJobs`.
1173
+ class ListJobsResponse
1174
+ include Google::Apis::Core::Hashable
1175
+
1176
+ # List of jobs in the specified region.
1177
+ # Corresponds to the JSON property `jobs`
1178
+ # @return [Array<Google::Apis::TranscoderV1::Job>]
1179
+ attr_accessor :jobs
1180
+
1181
+ # The pagination token.
1182
+ # Corresponds to the JSON property `nextPageToken`
1183
+ # @return [String]
1184
+ attr_accessor :next_page_token
1185
+
1186
+ # List of regions that could not be reached.
1187
+ # Corresponds to the JSON property `unreachable`
1188
+ # @return [Array<String>]
1189
+ attr_accessor :unreachable
1190
+
1191
+ def initialize(**args)
1192
+ update!(**args)
1193
+ end
1194
+
1195
+ # Update properties of this object
1196
+ def update!(**args)
1197
+ @jobs = args[:jobs] if args.key?(:jobs)
1198
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1199
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
1200
+ end
1201
+ end
1202
+
1203
+ # Manifest configuration.
1204
+ class Manifest
1205
+ include Google::Apis::Core::Hashable
1206
+
1207
+ # The name of the generated file. The default is `manifest` with the extension
1208
+ # suffix corresponding to the `Manifest.type`.
1209
+ # Corresponds to the JSON property `fileName`
1210
+ # @return [String]
1211
+ attr_accessor :file_name
1212
+
1213
+ # Required. List of user given `MuxStream.key`s that should appear in this
1214
+ # manifest. When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.
1215
+ # key` and `.m3u8` extension is generated for each element of the `Manifest.
1216
+ # mux_streams`.
1217
+ # Corresponds to the JSON property `muxStreams`
1218
+ # @return [Array<String>]
1219
+ attr_accessor :mux_streams
1220
+
1221
+ # Required. Type of the manifest, can be `HLS` or `DASH`.
1222
+ # Corresponds to the JSON property `type`
1223
+ # @return [String]
1224
+ attr_accessor :type
1225
+
1226
+ def initialize(**args)
1227
+ update!(**args)
1228
+ end
1229
+
1230
+ # Update properties of this object
1231
+ def update!(**args)
1232
+ @file_name = args[:file_name] if args.key?(:file_name)
1233
+ @mux_streams = args[:mux_streams] if args.key?(:mux_streams)
1234
+ @type = args[:type] if args.key?(:type)
1235
+ end
1236
+ end
1237
+
1238
+ # Multiplexing settings for output stream.
1239
+ class MuxStream
1240
+ include Google::Apis::Core::Hashable
1241
+
1242
+ # The container format. The default is `mp4` Supported container formats: - `ts`
1243
+ # - `fmp4`- the corresponding file extension is `.m4s` - `mp4` - `vtt`
1244
+ # Corresponds to the JSON property `container`
1245
+ # @return [String]
1246
+ attr_accessor :container
1247
+
1248
+ # List of `ElementaryStream.key`s multiplexed in this stream.
1249
+ # Corresponds to the JSON property `elementaryStreams`
1250
+ # @return [Array<String>]
1251
+ attr_accessor :elementary_streams
1252
+
1253
+ # The name of the generated file. The default is `MuxStream.key` with the
1254
+ # extension suffix corresponding to the `MuxStream.container`. Individual
1255
+ # segments also have an incremental 10-digit zero-padded suffix starting from 0
1256
+ # before the extension, such as `mux_stream0000000123.ts`.
1257
+ # Corresponds to the JSON property `fileName`
1258
+ # @return [String]
1259
+ attr_accessor :file_name
1260
+
1261
+ # A unique key for this multiplexed stream. HLS media manifests will be named `
1262
+ # MuxStream.key` with the `.m3u8` extension suffix.
1263
+ # Corresponds to the JSON property `key`
1264
+ # @return [String]
1265
+ attr_accessor :key
1266
+
1267
+ # Segment settings for `ts`, `fmp4` and `vtt`.
1268
+ # Corresponds to the JSON property `segmentSettings`
1269
+ # @return [Google::Apis::TranscoderV1::SegmentSettings]
1270
+ attr_accessor :segment_settings
1271
+
1272
+ def initialize(**args)
1273
+ update!(**args)
1274
+ end
1275
+
1276
+ # Update properties of this object
1277
+ def update!(**args)
1278
+ @container = args[:container] if args.key?(:container)
1279
+ @elementary_streams = args[:elementary_streams] if args.key?(:elementary_streams)
1280
+ @file_name = args[:file_name] if args.key?(:file_name)
1281
+ @key = args[:key] if args.key?(:key)
1282
+ @segment_settings = args[:segment_settings] if args.key?(:segment_settings)
1283
+ end
1284
+ end
1285
+
1286
+ # 2D normalized coordinates. Default: ``0.0, 0.0``
1287
+ class NormalizedCoordinate
1288
+ include Google::Apis::Core::Hashable
1289
+
1290
+ # Normalized x coordinate.
1291
+ # Corresponds to the JSON property `x`
1292
+ # @return [Float]
1293
+ attr_accessor :x
1294
+
1295
+ # Normalized y coordinate.
1296
+ # Corresponds to the JSON property `y`
1297
+ # @return [Float]
1298
+ attr_accessor :y
1299
+
1300
+ def initialize(**args)
1301
+ update!(**args)
1302
+ end
1303
+
1304
+ # Update properties of this object
1305
+ def update!(**args)
1306
+ @x = args[:x] if args.key?(:x)
1307
+ @y = args[:y] if args.key?(:y)
1308
+ end
1309
+ end
1310
+
1311
+ # Location of output file(s) in a Cloud Storage bucket.
1312
+ class Output
1313
+ include Google::Apis::Core::Hashable
1314
+
1315
+ # URI for the output file(s). For example, `gs://my-bucket/outputs/`. If empty
1316
+ # the value is populated from `Job.output_uri`.
1317
+ # Corresponds to the JSON property `uri`
1318
+ # @return [String]
1319
+ attr_accessor :uri
1320
+
1321
+ def initialize(**args)
1322
+ update!(**args)
1323
+ end
1324
+
1325
+ # Update properties of this object
1326
+ def update!(**args)
1327
+ @uri = args[:uri] if args.key?(:uri)
1328
+ end
1329
+ end
1330
+
1331
+ # Overlay configuration.
1332
+ class Overlay
1333
+ include Google::Apis::Core::Hashable
1334
+
1335
+ # List of Animations. The list should be chronological, without any time overlap.
1336
+ # Corresponds to the JSON property `animations`
1337
+ # @return [Array<Google::Apis::TranscoderV1::Animation>]
1338
+ attr_accessor :animations
1339
+
1340
+ # Overlaid jpeg image.
1341
+ # Corresponds to the JSON property `image`
1342
+ # @return [Google::Apis::TranscoderV1::Image]
1343
+ attr_accessor :image
1344
+
1345
+ def initialize(**args)
1346
+ update!(**args)
1347
+ end
1348
+
1349
+ # Update properties of this object
1350
+ def update!(**args)
1351
+ @animations = args[:animations] if args.key?(:animations)
1352
+ @image = args[:image] if args.key?(:image)
1353
+ end
1354
+ end
1355
+
1356
+ # Pad filter configuration for the input video. The padded input video is scaled
1357
+ # after padding with black to match the output resolution.
1358
+ class Pad
1359
+ include Google::Apis::Core::Hashable
1360
+
1361
+ # The number of pixels to add to the bottom. The default is 0.
1362
+ # Corresponds to the JSON property `bottomPixels`
1363
+ # @return [Fixnum]
1364
+ attr_accessor :bottom_pixels
1365
+
1366
+ # The number of pixels to add to the left. The default is 0.
1367
+ # Corresponds to the JSON property `leftPixels`
1368
+ # @return [Fixnum]
1369
+ attr_accessor :left_pixels
1370
+
1371
+ # The number of pixels to add to the right. The default is 0.
1372
+ # Corresponds to the JSON property `rightPixels`
1373
+ # @return [Fixnum]
1374
+ attr_accessor :right_pixels
1375
+
1376
+ # The number of pixels to add to the top. The default is 0.
1377
+ # Corresponds to the JSON property `topPixels`
1378
+ # @return [Fixnum]
1379
+ attr_accessor :top_pixels
1380
+
1381
+ def initialize(**args)
1382
+ update!(**args)
1383
+ end
1384
+
1385
+ # Update properties of this object
1386
+ def update!(**args)
1387
+ @bottom_pixels = args[:bottom_pixels] if args.key?(:bottom_pixels)
1388
+ @left_pixels = args[:left_pixels] if args.key?(:left_pixels)
1389
+ @right_pixels = args[:right_pixels] if args.key?(:right_pixels)
1390
+ @top_pixels = args[:top_pixels] if args.key?(:top_pixels)
1391
+ end
1392
+ end
1393
+
1394
+ # Preprocessing configurations.
1395
+ class PreprocessingConfig
1396
+ include Google::Apis::Core::Hashable
1397
+
1398
+ # Audio preprocessing configuration.
1399
+ # Corresponds to the JSON property `audio`
1400
+ # @return [Google::Apis::TranscoderV1::Audio]
1401
+ attr_accessor :audio
1402
+
1403
+ # Color preprocessing configuration.
1404
+ # Corresponds to the JSON property `color`
1405
+ # @return [Google::Apis::TranscoderV1::Color]
1406
+ attr_accessor :color
1407
+
1408
+ # Video cropping configuration for the input video. The cropped input video is
1409
+ # scaled to match the output resolution.
1410
+ # Corresponds to the JSON property `crop`
1411
+ # @return [Google::Apis::TranscoderV1::Crop]
1412
+ attr_accessor :crop
1413
+
1414
+ # Deblock preprocessing configuration.
1415
+ # Corresponds to the JSON property `deblock`
1416
+ # @return [Google::Apis::TranscoderV1::Deblock]
1417
+ attr_accessor :deblock
1418
+
1419
+ # Denoise preprocessing configuration.
1420
+ # Corresponds to the JSON property `denoise`
1421
+ # @return [Google::Apis::TranscoderV1::Denoise]
1422
+ attr_accessor :denoise
1423
+
1424
+ # Pad filter configuration for the input video. The padded input video is scaled
1425
+ # after padding with black to match the output resolution.
1426
+ # Corresponds to the JSON property `pad`
1427
+ # @return [Google::Apis::TranscoderV1::Pad]
1428
+ attr_accessor :pad
1429
+
1430
+ def initialize(**args)
1431
+ update!(**args)
1432
+ end
1433
+
1434
+ # Update properties of this object
1435
+ def update!(**args)
1436
+ @audio = args[:audio] if args.key?(:audio)
1437
+ @color = args[:color] if args.key?(:color)
1438
+ @crop = args[:crop] if args.key?(:crop)
1439
+ @deblock = args[:deblock] if args.key?(:deblock)
1440
+ @denoise = args[:denoise] if args.key?(:denoise)
1441
+ @pad = args[:pad] if args.key?(:pad)
1442
+ end
1443
+ end
1444
+
1445
+ # A Pub/Sub destination.
1446
+ class PubsubDestination
1447
+ include Google::Apis::Core::Hashable
1448
+
1449
+ # The name of the Pub/Sub topic to publish job completion notification to. For
1450
+ # example: `projects/`project`/topics/`topic``.
1451
+ # Corresponds to the JSON property `topic`
1452
+ # @return [String]
1453
+ attr_accessor :topic
1454
+
1455
+ def initialize(**args)
1456
+ update!(**args)
1457
+ end
1458
+
1459
+ # Update properties of this object
1460
+ def update!(**args)
1461
+ @topic = args[:topic] if args.key?(:topic)
1462
+ end
1463
+ end
1464
+
1465
+ # Segment settings for `ts`, `fmp4` and `vtt`.
1466
+ class SegmentSettings
1467
+ include Google::Apis::Core::Hashable
1468
+
1469
+ # Required. Create an individual segment file. The default is `false`.
1470
+ # Corresponds to the JSON property `individualSegments`
1471
+ # @return [Boolean]
1472
+ attr_accessor :individual_segments
1473
+ alias_method :individual_segments?, :individual_segments
1474
+
1475
+ # Duration of the segments in seconds. The default is `6.0s`. Note that `
1476
+ # segmentDuration` must be greater than or equal to [`gopDuration`](#videostream)
1477
+ # , and `segmentDuration` must be divisible by [`gopDuration`](#videostream).
1478
+ # Corresponds to the JSON property `segmentDuration`
1479
+ # @return [String]
1480
+ attr_accessor :segment_duration
1481
+
1482
+ def initialize(**args)
1483
+ update!(**args)
1484
+ end
1485
+
1486
+ # Update properties of this object
1487
+ def update!(**args)
1488
+ @individual_segments = args[:individual_segments] if args.key?(:individual_segments)
1489
+ @segment_duration = args[:segment_duration] if args.key?(:segment_duration)
1490
+ end
1491
+ end
1492
+
1493
+ # Sprite sheet configuration.
1494
+ class SpriteSheet
1495
+ include Google::Apis::Core::Hashable
1496
+
1497
+ # The maximum number of sprites per row in a sprite sheet. The default is 0,
1498
+ # which indicates no maximum limit.
1499
+ # Corresponds to the JSON property `columnCount`
1500
+ # @return [Fixnum]
1501
+ attr_accessor :column_count
1502
+
1503
+ # End time in seconds, relative to the output file timeline. When `
1504
+ # end_time_offset` is not specified, the sprites are generated until the end of
1505
+ # the output file.
1506
+ # Corresponds to the JSON property `endTimeOffset`
1507
+ # @return [String]
1508
+ attr_accessor :end_time_offset
1509
+
1510
+ # Required. File name prefix for the generated sprite sheets. Each sprite sheet
1511
+ # has an incremental 10-digit zero-padded suffix starting from 0 before the
1512
+ # extension, such as `sprite_sheet0000000123.jpeg`.
1513
+ # Corresponds to the JSON property `filePrefix`
1514
+ # @return [String]
1515
+ attr_accessor :file_prefix
1516
+
1517
+ # Format type. The default is `jpeg`. Supported formats: - `jpeg`
1518
+ # Corresponds to the JSON property `format`
1519
+ # @return [String]
1520
+ attr_accessor :format
1521
+
1522
+ # Starting from `0s`, create sprites at regular intervals. Specify the interval
1523
+ # value in seconds.
1524
+ # Corresponds to the JSON property `interval`
1525
+ # @return [String]
1526
+ attr_accessor :interval
1527
+
1528
+ # The quality of the generated sprite sheet. Enter a value between 1 and 100,
1529
+ # where 1 is the lowest quality and 100 is the highest quality. The default is
1530
+ # 100. A high quality value corresponds to a low image data compression ratio.
1531
+ # Corresponds to the JSON property `quality`
1532
+ # @return [Fixnum]
1533
+ attr_accessor :quality
1534
+
1535
+ # The maximum number of rows per sprite sheet. When the sprite sheet is full, a
1536
+ # new sprite sheet is created. The default is 0, which indicates no maximum
1537
+ # limit.
1538
+ # Corresponds to the JSON property `rowCount`
1539
+ # @return [Fixnum]
1540
+ attr_accessor :row_count
1541
+
1542
+ # Required. The height of sprite in pixels. Must be an even integer. To preserve
1543
+ # the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the
1544
+ # SpriteSheet.sprite_width_pixels field, but not both (the API will
1545
+ # automatically calculate the missing field).
1546
+ # Corresponds to the JSON property `spriteHeightPixels`
1547
+ # @return [Fixnum]
1548
+ attr_accessor :sprite_height_pixels
1549
+
1550
+ # Required. The width of sprite in pixels. Must be an even integer. To preserve
1551
+ # the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the
1552
+ # SpriteSheet.sprite_height_pixels field, but not both (the API will
1553
+ # automatically calculate the missing field).
1554
+ # Corresponds to the JSON property `spriteWidthPixels`
1555
+ # @return [Fixnum]
1556
+ attr_accessor :sprite_width_pixels
1557
+
1558
+ # Start time in seconds, relative to the output file timeline. Determines the
1559
+ # first sprite to pick. The default is `0s`.
1560
+ # Corresponds to the JSON property `startTimeOffset`
1561
+ # @return [String]
1562
+ attr_accessor :start_time_offset
1563
+
1564
+ # Total number of sprites. Create the specified number of sprites distributed
1565
+ # evenly across the timeline of the output media. The default is 100.
1566
+ # Corresponds to the JSON property `totalCount`
1567
+ # @return [Fixnum]
1568
+ attr_accessor :total_count
1569
+
1570
+ def initialize(**args)
1571
+ update!(**args)
1572
+ end
1573
+
1574
+ # Update properties of this object
1575
+ def update!(**args)
1576
+ @column_count = args[:column_count] if args.key?(:column_count)
1577
+ @end_time_offset = args[:end_time_offset] if args.key?(:end_time_offset)
1578
+ @file_prefix = args[:file_prefix] if args.key?(:file_prefix)
1579
+ @format = args[:format] if args.key?(:format)
1580
+ @interval = args[:interval] if args.key?(:interval)
1581
+ @quality = args[:quality] if args.key?(:quality)
1582
+ @row_count = args[:row_count] if args.key?(:row_count)
1583
+ @sprite_height_pixels = args[:sprite_height_pixels] if args.key?(:sprite_height_pixels)
1584
+ @sprite_width_pixels = args[:sprite_width_pixels] if args.key?(:sprite_width_pixels)
1585
+ @start_time_offset = args[:start_time_offset] if args.key?(:start_time_offset)
1586
+ @total_count = args[:total_count] if args.key?(:total_count)
1587
+ end
1588
+ end
1589
+
1590
+ # The `Status` type defines a logical error model that is suitable for different
1591
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1592
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1593
+ # data: error code, error message, and error details. You can find out more
1594
+ # about this error model and how to work with it in the [API Design Guide](https:
1595
+ # //cloud.google.com/apis/design/errors).
1596
+ class Status
1597
+ include Google::Apis::Core::Hashable
1598
+
1599
+ # The status code, which should be an enum value of google.rpc.Code.
1600
+ # Corresponds to the JSON property `code`
1601
+ # @return [Fixnum]
1602
+ attr_accessor :code
1603
+
1604
+ # A list of messages that carry the error details. There is a common set of
1605
+ # message types for APIs to use.
1606
+ # Corresponds to the JSON property `details`
1607
+ # @return [Array<Hash<String,Object>>]
1608
+ attr_accessor :details
1609
+
1610
+ # A developer-facing error message, which should be in English. Any user-facing
1611
+ # error message should be localized and sent in the google.rpc.Status.details
1612
+ # field, or localized by the client.
1613
+ # Corresponds to the JSON property `message`
1614
+ # @return [String]
1615
+ attr_accessor :message
1616
+
1617
+ def initialize(**args)
1618
+ update!(**args)
1619
+ end
1620
+
1621
+ # Update properties of this object
1622
+ def update!(**args)
1623
+ @code = args[:code] if args.key?(:code)
1624
+ @details = args[:details] if args.key?(:details)
1625
+ @message = args[:message] if args.key?(:message)
1626
+ end
1627
+ end
1628
+
1629
+ # The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
1630
+ class TextMapping
1631
+ include Google::Apis::Core::Hashable
1632
+
1633
+ # Required. The `EditAtom.key` that references atom with text inputs in the `Job.
1634
+ # edit_list`.
1635
+ # Corresponds to the JSON property `atomKey`
1636
+ # @return [String]
1637
+ attr_accessor :atom_key
1638
+
1639
+ # Required. The `Input.key` that identifies the input file.
1640
+ # Corresponds to the JSON property `inputKey`
1641
+ # @return [String]
1642
+ attr_accessor :input_key
1643
+
1644
+ # Required. The zero-based index of the track in the input file.
1645
+ # Corresponds to the JSON property `inputTrack`
1646
+ # @return [Fixnum]
1647
+ attr_accessor :input_track
1648
+
1649
+ def initialize(**args)
1650
+ update!(**args)
1651
+ end
1652
+
1653
+ # Update properties of this object
1654
+ def update!(**args)
1655
+ @atom_key = args[:atom_key] if args.key?(:atom_key)
1656
+ @input_key = args[:input_key] if args.key?(:input_key)
1657
+ @input_track = args[:input_track] if args.key?(:input_track)
1658
+ end
1659
+ end
1660
+
1661
+ # Encoding of a text stream. For example, closed captions or subtitles.
1662
+ class TextStream
1663
+ include Google::Apis::Core::Hashable
1664
+
1665
+ # The codec for this text stream. The default is `webvtt`. Supported text codecs:
1666
+ # - `srt` - `ttml` - `cea608` - `cea708` - `webvtt`
1667
+ # Corresponds to the JSON property `codec`
1668
+ # @return [String]
1669
+ attr_accessor :codec
1670
+
1671
+ # The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
1672
+ # Corresponds to the JSON property `mapping`
1673
+ # @return [Array<Google::Apis::TranscoderV1::TextMapping>]
1674
+ attr_accessor :mapping
1675
+
1676
+ def initialize(**args)
1677
+ update!(**args)
1678
+ end
1679
+
1680
+ # Update properties of this object
1681
+ def update!(**args)
1682
+ @codec = args[:codec] if args.key?(:codec)
1683
+ @mapping = args[:mapping] if args.key?(:mapping)
1684
+ end
1685
+ end
1686
+
1687
+ # Video stream resource.
1688
+ class VideoStream
1689
+ include Google::Apis::Core::Hashable
1690
+
1691
+ # H264 codec settings.
1692
+ # Corresponds to the JSON property `h264`
1693
+ # @return [Google::Apis::TranscoderV1::H264CodecSettings]
1694
+ attr_accessor :h264
1695
+
1696
+ # H265 codec settings.
1697
+ # Corresponds to the JSON property `h265`
1698
+ # @return [Google::Apis::TranscoderV1::H265CodecSettings]
1699
+ attr_accessor :h265
1700
+
1701
+ # VP9 codec settings.
1702
+ # Corresponds to the JSON property `vp9`
1703
+ # @return [Google::Apis::TranscoderV1::Vp9CodecSettings]
1704
+ attr_accessor :vp9
1705
+
1706
+ def initialize(**args)
1707
+ update!(**args)
1708
+ end
1709
+
1710
+ # Update properties of this object
1711
+ def update!(**args)
1712
+ @h264 = args[:h264] if args.key?(:h264)
1713
+ @h265 = args[:h265] if args.key?(:h265)
1714
+ @vp9 = args[:vp9] if args.key?(:vp9)
1715
+ end
1716
+ end
1717
+
1718
+ # VP9 codec settings.
1719
+ class Vp9CodecSettings
1720
+ include Google::Apis::Core::Hashable
1721
+
1722
+ # Required. The video bitrate in bits per second. The minimum value is 1,000.
1723
+ # The maximum value is 480,000,000.
1724
+ # Corresponds to the JSON property `bitrateBps`
1725
+ # @return [Fixnum]
1726
+ attr_accessor :bitrate_bps
1727
+
1728
+ # Target CRF level. Must be between 10 and 36, where 10 is the highest quality
1729
+ # and 36 is the most efficient compression. The default is 21.
1730
+ # Corresponds to the JSON property `crfLevel`
1731
+ # @return [Fixnum]
1732
+ attr_accessor :crf_level
1733
+
1734
+ # Required. The target video frame rate in frames per second (FPS). Must be less
1735
+ # than or equal to 120. Will default to the input frame rate if larger than the
1736
+ # input frame rate. The API will generate an output FPS that is divisible by the
1737
+ # input FPS, and smaller or equal to the target FPS. See [Calculating frame rate]
1738
+ # (https://cloud.google.com/transcoder/docs/concepts/frame-rate) for more
1739
+ # information.
1740
+ # Corresponds to the JSON property `frameRate`
1741
+ # @return [Float]
1742
+ attr_accessor :frame_rate
1743
+
1744
+ # Select the GOP size based on the specified duration. The default is `3s`. Note
1745
+ # that `gopDuration` must be less than or equal to [`segmentDuration`](#
1746
+ # SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible
1747
+ # by `gopDuration`.
1748
+ # Corresponds to the JSON property `gopDuration`
1749
+ # @return [String]
1750
+ attr_accessor :gop_duration
1751
+
1752
+ # Select the GOP size based on the specified frame count. Must be greater than
1753
+ # zero.
1754
+ # Corresponds to the JSON property `gopFrameCount`
1755
+ # @return [Fixnum]
1756
+ attr_accessor :gop_frame_count
1757
+
1758
+ # The height of the video in pixels. Must be an even integer. When not specified,
1759
+ # the height is adjusted to match the specified width and input aspect ratio.
1760
+ # If both are omitted, the input height is used.
1761
+ # Corresponds to the JSON property `heightPixels`
1762
+ # @return [Fixnum]
1763
+ attr_accessor :height_pixels
1764
+
1765
+ # Pixel format to use. The default is `yuv420p`. Supported pixel formats: - `
1766
+ # yuv420p` pixel format - `yuv422p` pixel format - `yuv444p` pixel format - `
1767
+ # yuv420p10` 10-bit HDR pixel format - `yuv422p10` 10-bit HDR pixel format - `
1768
+ # yuv444p10` 10-bit HDR pixel format - `yuv420p12` 12-bit HDR pixel format - `
1769
+ # yuv422p12` 12-bit HDR pixel format - `yuv444p12` 12-bit HDR pixel format
1770
+ # Corresponds to the JSON property `pixelFormat`
1771
+ # @return [String]
1772
+ attr_accessor :pixel_format
1773
+
1774
+ # Enforces the specified codec profile. The following profiles are supported: * `
1775
+ # profile0` (default) * `profile1` * `profile2` * `profile3` The available
1776
+ # options are [WebM-compatible](https://www.webmproject.org/vp9/profiles/). Note
1777
+ # that certain values for this field may cause the transcoder to override other
1778
+ # fields you set in the `Vp9CodecSettings` message.
1779
+ # Corresponds to the JSON property `profile`
1780
+ # @return [String]
1781
+ attr_accessor :profile
1782
+
1783
+ # Specify the `rate_control_mode`. The default is `vbr`. Supported rate control
1784
+ # modes: - `vbr` - variable bitrate - `crf` - constant rate factor
1785
+ # Corresponds to the JSON property `rateControlMode`
1786
+ # @return [String]
1787
+ attr_accessor :rate_control_mode
1788
+
1789
+ # The width of the video in pixels. Must be an even integer. When not specified,
1790
+ # the width is adjusted to match the specified height and input aspect ratio. If
1791
+ # both are omitted, the input width is used.
1792
+ # Corresponds to the JSON property `widthPixels`
1793
+ # @return [Fixnum]
1794
+ attr_accessor :width_pixels
1795
+
1796
+ def initialize(**args)
1797
+ update!(**args)
1798
+ end
1799
+
1800
+ # Update properties of this object
1801
+ def update!(**args)
1802
+ @bitrate_bps = args[:bitrate_bps] if args.key?(:bitrate_bps)
1803
+ @crf_level = args[:crf_level] if args.key?(:crf_level)
1804
+ @frame_rate = args[:frame_rate] if args.key?(:frame_rate)
1805
+ @gop_duration = args[:gop_duration] if args.key?(:gop_duration)
1806
+ @gop_frame_count = args[:gop_frame_count] if args.key?(:gop_frame_count)
1807
+ @height_pixels = args[:height_pixels] if args.key?(:height_pixels)
1808
+ @pixel_format = args[:pixel_format] if args.key?(:pixel_format)
1809
+ @profile = args[:profile] if args.key?(:profile)
1810
+ @rate_control_mode = args[:rate_control_mode] if args.key?(:rate_control_mode)
1811
+ @width_pixels = args[:width_pixels] if args.key?(:width_pixels)
1812
+ end
1813
+ end
1814
+ end
1815
+ end
1816
+ end