resources.proto 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874
  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. syntax = "proto3";
  15. package google.cloud.video.transcoder.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "ResourcesProto";
  23. option java_package = "com.google.cloud.video.transcoder.v1beta1";
  24. // Transcoding job resource.
  25. message Job {
  26. option (google.api.resource) = {
  27. type: "transcoder.googleapis.com/Job"
  28. pattern: "projects/{project}/locations/{location}/jobs/{job}"
  29. };
  30. // The origin URI.
  31. message OriginUri {
  32. // HLS master manifest URI. If multiple HLS master manifests are created
  33. // only first one is listed.
  34. string hls = 1;
  35. // Dash manifest URI. If multiple Dash manifests are created, only the first
  36. // one is listed.
  37. string dash = 2;
  38. }
  39. // The current state of the job.
  40. enum ProcessingState {
  41. // The processing state is not specified.
  42. PROCESSING_STATE_UNSPECIFIED = 0;
  43. // The job is enqueued and will be picked up for processing soon.
  44. PENDING = 1;
  45. // The job is being processed.
  46. RUNNING = 2;
  47. // The job has been completed successfully.
  48. SUCCEEDED = 3;
  49. // The job has failed. For additional information, see `failure_reason` and
  50. // `failure_details`
  51. FAILED = 4;
  52. }
  53. // The resource name of the job.
  54. // Format: `projects/{project}/locations/{location}/jobs/{job}`
  55. string name = 1;
  56. // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of
  57. // `Job.config.inputs` or `JobTemplate.config.inputs` when using template.
  58. // URI of the media. It must be stored in Cloud Storage. For example,
  59. // `gs://bucket/inputs/file.mp4`.
  60. string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY];
  61. // Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
  62. // `JobTemplate.config.output.uri` when using template.
  63. // URI for the output file(s). For example, `gs://my-bucket/outputs/`.
  64. string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY];
  65. // Specify the `job_config` for transcoding job. When you use a `template_id`
  66. // to create a job, the `Job.config` is populated by the `JobTemplate.config`.
  67. oneof job_config {
  68. // Input only. Specify the `template_id` to use for populating `Job.config`. The default
  69. // is `preset/web-hd`.
  70. //
  71. // Preset Transcoder templates:
  72. // - `preset/{preset_id}`
  73. //
  74. // - User defined JobTemplate:
  75. // `{job_template_id}`
  76. string template_id = 4 [(google.api.field_behavior) = INPUT_ONLY];
  77. // The configuration for this job.
  78. JobConfig config = 5;
  79. }
  80. // Specify the priority of the job. Enter a value between 0 and 100, where 0
  81. // is the lowest priority and 100 is the highest priority. The default is 0.
  82. int32 priority = 6;
  83. // Output only. The origin URI.
  84. OriginUri origin_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  85. // Output only. The current state of the job.
  86. ProcessingState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  87. // Output only. Estimated fractional progress, from `0` to `1` for each
  88. // step.
  89. Progress progress = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  90. // Output only. A description of the reason for the failure. This property is
  91. // always present when `state` is `FAILED`.
  92. string failure_reason = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  93. // Output only. List of failure details. This property may contain additional
  94. // information about the failure when `failure_reason` is present.
  95. repeated FailureDetail failure_details = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  96. // Output only. The time the job was created.
  97. google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  98. // Output only. The time the transcoding started.
  99. google.protobuf.Timestamp start_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  100. // Output only. The time the transcoding finished.
  101. google.protobuf.Timestamp end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  102. }
  103. // Transcoding job template resource.
  104. message JobTemplate {
  105. option (google.api.resource) = {
  106. type: "transcoder.googleapis.com/JobTemplate"
  107. pattern: "projects/{project}/locations/{location}/jobTemplates/{job_template}"
  108. };
  109. // The resource name of the job template.
  110. // Format:
  111. // `projects/{project}/locations/{location}/jobTemplates/{job_template}`
  112. string name = 1;
  113. // The configuration for this template.
  114. JobConfig config = 2;
  115. }
  116. // Job configuration
  117. message JobConfig {
  118. // List of input assets stored in Cloud Storage.
  119. repeated Input inputs = 1;
  120. // List of `Edit atom`s. Defines the ultimate timeline of the resulting
  121. // file or manifest.
  122. repeated EditAtom edit_list = 2;
  123. // List of elementary streams.
  124. repeated ElementaryStream elementary_streams = 3;
  125. // List of multiplexing settings for output streams.
  126. repeated MuxStream mux_streams = 4;
  127. // List of output manifests.
  128. repeated Manifest manifests = 5;
  129. // Output configuration.
  130. Output output = 6;
  131. // List of ad breaks. Specifies where to insert ad break tags in the output
  132. // manifests.
  133. repeated AdBreak ad_breaks = 7;
  134. // Destination on Pub/Sub.
  135. PubsubDestination pubsub_destination = 8;
  136. // List of output sprite sheets.
  137. repeated SpriteSheet sprite_sheets = 9;
  138. // List of overlays on the output video, in descending Z-order.
  139. repeated Overlay overlays = 10;
  140. }
  141. // Input asset.
  142. message Input {
  143. // A unique key for this input. Must be specified when using advanced
  144. // mapping and edit lists.
  145. string key = 1;
  146. // URI of the media. It must be stored in Cloud Storage. Example
  147. // `gs://bucket/inputs/file.mp4`.
  148. // If empty the value will be populated from `Job.input_uri`.
  149. string uri = 2;
  150. // Preprocessing configurations.
  151. PreprocessingConfig preprocessing_config = 3;
  152. }
  153. // Location of output file(s) in a Cloud Storage bucket.
  154. message Output {
  155. // URI for the output file(s). For example, `gs://my-bucket/outputs/`.
  156. // If empty the value is populated from `Job.output_uri`.
  157. string uri = 1;
  158. }
  159. // Edit atom.
  160. message EditAtom {
  161. // A unique key for this atom. Must be specified when using advanced
  162. // mapping.
  163. string key = 1;
  164. // List of `Input.key`s identifying files that should be used in this atom.
  165. // The listed `inputs` must have the same timeline.
  166. repeated string inputs = 2;
  167. // End time in seconds for the atom, relative to the input file timeline.
  168. // When `end_time_offset` is not specified, the `inputs` are used until
  169. // the end of the atom.
  170. google.protobuf.Duration end_time_offset = 3;
  171. // Start time in seconds for the atom, relative to the input file timeline.
  172. // The default is `0s`.
  173. google.protobuf.Duration start_time_offset = 4;
  174. }
  175. // Ad break.
  176. message AdBreak {
  177. // Start time in seconds for the ad break, relative to the output file
  178. // timeline. The default is `0s`.
  179. google.protobuf.Duration start_time_offset = 1;
  180. }
  181. // Encoding of an input file such as an audio, video, or text track.
  182. // Elementary streams must be packaged before
  183. // mapping and sharing between different output formats.
  184. message ElementaryStream {
  185. // A unique key for this elementary stream.
  186. string key = 4;
  187. // Encoding of an audio, video, or text track.
  188. oneof elementary_stream {
  189. // Encoding of a video stream.
  190. VideoStream video_stream = 1;
  191. // Encoding of an audio stream.
  192. AudioStream audio_stream = 2;
  193. // Encoding of a text stream. For example, closed captions or subtitles.
  194. TextStream text_stream = 3;
  195. }
  196. }
  197. // Multiplexing settings for output stream.
  198. message MuxStream {
  199. // A unique key for this multiplexed stream. HLS media manifests will be
  200. // named `MuxStream.key` with the `".m3u8"` extension suffix.
  201. string key = 1;
  202. // The name of the generated file. The default is `MuxStream.key` with the
  203. // extension suffix corresponding to the `MuxStream.container`.
  204. //
  205. // Individual segments also have an incremental 10-digit zero-padded suffix
  206. // starting from 0 before the extension, such as `"mux_stream0000000123.ts"`.
  207. string file_name = 2;
  208. // The container format. The default is `"mp4"`
  209. //
  210. // Supported container formats:
  211. // - 'ts'
  212. // - 'fmp4'- the corresponding file extension is `".m4s"`
  213. // - 'mp4'
  214. // - 'vtt'
  215. string container = 3;
  216. // List of `ElementaryStream.key`s multiplexed in this stream.
  217. repeated string elementary_streams = 4;
  218. // Segment settings for `"ts"`, `"fmp4"` and `"vtt"`.
  219. SegmentSettings segment_settings = 5;
  220. // Encryption settings.
  221. Encryption encryption = 6;
  222. }
  223. // Manifest configuration.
  224. message Manifest {
  225. // The manifest type can be either `"HLS"` or `"DASH"`.
  226. enum ManifestType {
  227. // The manifest type is not specified.
  228. MANIFEST_TYPE_UNSPECIFIED = 0;
  229. // Create `"HLS"` manifest. The corresponding file extension is `".m3u8"`.
  230. HLS = 1;
  231. // Create `"DASH"` manifest. The corresponding file extension is `".mpd"`.
  232. DASH = 2;
  233. }
  234. // The name of the generated file. The default is `"manifest"` with the
  235. // extension suffix corresponding to the `Manifest.type`.
  236. string file_name = 1;
  237. // Required. Type of the manifest, can be "HLS" or "DASH".
  238. ManifestType type = 2 [(google.api.field_behavior) = REQUIRED];
  239. // Required. List of user given `MuxStream.key`s that should appear in this manifest.
  240. //
  241. // When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key`
  242. // and `.m3u8` extension is generated for each element of the
  243. // `Manifest.mux_streams`.
  244. repeated string mux_streams = 3 [(google.api.field_behavior) = REQUIRED];
  245. }
  246. // A Pub/Sub destination.
  247. message PubsubDestination {
  248. // The name of the Pub/Sub topic to publish job completion notification
  249. // to. For example: `projects/{project}/topics/{topic}`.
  250. string topic = 1;
  251. }
  252. // Sprite sheet configuration.
  253. message SpriteSheet {
  254. // Format type. The default is `"jpeg"`.
  255. //
  256. // Supported formats:
  257. // - 'jpeg'
  258. string format = 1;
  259. // Required. File name prefix for the generated sprite sheets.
  260. //
  261. // Each sprite sheet has an incremental 10-digit zero-padded suffix starting
  262. // from 0 before the extension, such as `"sprite_sheet0000000123.jpeg"`.
  263. string file_prefix = 2 [(google.api.field_behavior) = REQUIRED];
  264. // Required. The width of sprite in pixels. Must be an even integer.
  265. int32 sprite_width_pixels = 3 [(google.api.field_behavior) = REQUIRED];
  266. // Required. The height of sprite in pixels. Must be an even integer.
  267. int32 sprite_height_pixels = 4 [(google.api.field_behavior) = REQUIRED];
  268. // The maximum number of sprites per row in a sprite sheet. The default is 0,
  269. // which indicates no maximum limit.
  270. int32 column_count = 5;
  271. // The maximum number of rows per sprite sheet. When the sprite sheet is full,
  272. // a new sprite sheet is created. The default is 0, which indicates no maximum
  273. // limit.
  274. int32 row_count = 6;
  275. // Start time in seconds, relative to the output file timeline. Determines the
  276. // first sprite to pick. The default is `0s`.
  277. google.protobuf.Duration start_time_offset = 7;
  278. // End time in seconds, relative to the output file timeline. When
  279. // `end_time_offset` is not specified, the sprites are generated until the end
  280. // of the output file.
  281. google.protobuf.Duration end_time_offset = 8;
  282. // Specify either total number of sprites or interval to create sprites.
  283. oneof extraction_strategy {
  284. // Total number of sprites. Create the specified number of sprites
  285. // distributed evenly across the timeline of the output media. The default
  286. // is 100.
  287. int32 total_count = 9;
  288. // Starting from `0s`, create sprites at regular intervals. Specify the
  289. // interval value in seconds.
  290. google.protobuf.Duration interval = 10;
  291. }
  292. }
  293. // Overlay configuration.
  294. message Overlay {
  295. // 2D normalized coordinates. Default: `{0.0, 0.0}`
  296. message NormalizedCoordinate {
  297. // Normalized x coordinate.
  298. double x = 1;
  299. // Normalized y coordinate.
  300. double y = 2;
  301. }
  302. // Overlaid jpeg image.
  303. message Image {
  304. // Required. URI of the image in Cloud Storage. For example,
  305. // `gs://bucket/inputs/image.jpeg`.
  306. string uri = 1 [(google.api.field_behavior) = REQUIRED];
  307. // Normalized image resolution, based on output video resolution. Valid
  308. // values: `0.0`–`1.0`. To respect the original image aspect ratio, set
  309. // either `x` or `y` to `0.0`. To use the original image resolution, set
  310. // both `x` and `y` to `0.0`.
  311. NormalizedCoordinate resolution = 2;
  312. // Target image opacity. Valid values: `1` (solid, default),
  313. // `0` (transparent).
  314. double alpha = 3;
  315. }
  316. // Display static overlay object.
  317. message AnimationStatic {
  318. // Normalized coordinates based on output video resolution. Valid
  319. // values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay
  320. // object.
  321. NormalizedCoordinate xy = 1;
  322. // The time to start displaying the overlay object, in seconds. Default: 0
  323. google.protobuf.Duration start_time_offset = 2;
  324. }
  325. // Display overlay object with fade animation.
  326. message AnimationFade {
  327. // Required. Type of fade animation: `FADE_IN` or `FADE_OUT`.
  328. FadeType fade_type = 1 [(google.api.field_behavior) = REQUIRED];
  329. // Normalized coordinates based on output video resolution. Valid
  330. // values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay
  331. // object.
  332. NormalizedCoordinate xy = 2;
  333. // The time to start the fade animation, in seconds. Default: 0
  334. google.protobuf.Duration start_time_offset = 3;
  335. // The time to end the fade animation, in seconds. Default:
  336. // `start_time_offset` + 1s
  337. google.protobuf.Duration end_time_offset = 4;
  338. }
  339. // End previous overlay animation from the video. Without AnimationEnd, the
  340. // overlay object will keep the state of previous animation until the end of
  341. // the video.
  342. message AnimationEnd {
  343. // The time to end overlay object, in seconds. Default: 0
  344. google.protobuf.Duration start_time_offset = 1;
  345. }
  346. // Animation types.
  347. message Animation {
  348. // Animations can be static or fade, or they can end the previous animation.
  349. oneof animation_type {
  350. // Display static overlay object.
  351. AnimationStatic animation_static = 1;
  352. // Display overlay object with fade animation.
  353. AnimationFade animation_fade = 2;
  354. // End previous animation.
  355. AnimationEnd animation_end = 3;
  356. }
  357. }
  358. // Fade type for the overlay: `FADE_IN` or `FADE_OUT`.
  359. enum FadeType {
  360. // The fade type is not specified.
  361. FADE_TYPE_UNSPECIFIED = 0;
  362. // Fade the overlay object into view.
  363. FADE_IN = 1;
  364. // Fade the overlay object out of view.
  365. FADE_OUT = 2;
  366. }
  367. // Image overlay.
  368. Image image = 1;
  369. // List of Animations. The list should be chronological, without any time
  370. // overlap.
  371. repeated Animation animations = 2;
  372. }
  373. // Preprocessing configurations.
  374. message PreprocessingConfig {
  375. // Color preprocessing configuration.
  376. message Color {
  377. // Control color saturation of the video. Enter a value between -1 and 1,
  378. // where -1 is fully desaturated and 1 is maximum saturation. 0 is no
  379. // change. The default is 0.
  380. double saturation = 1;
  381. // Control black and white contrast of the video. Enter a value between -1
  382. // and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no
  383. // change. The default is 0.
  384. double contrast = 2;
  385. // Control brightness of the video. Enter a value between -1 and 1, where -1
  386. // is minimum brightness and 1 is maximum brightness. 0 is no change. The
  387. // default is 0.
  388. double brightness = 3;
  389. }
  390. // Denoise preprocessing configuration.
  391. message Denoise {
  392. // Set strength of the denoise. Enter a value between 0 and 1. The higher
  393. // the value, the smoother the image. 0 is no denoising. The default is 0.
  394. double strength = 1;
  395. // Set the denoiser mode. The default is `"standard"`.
  396. //
  397. // Supported denoiser modes:
  398. // - 'standard'
  399. // - 'grain'
  400. string tune = 2;
  401. }
  402. // Deblock preprocessing configuration.
  403. message Deblock {
  404. // Set strength of the deblocker. Enter a value between 0 and 1. The higher
  405. // the value, the stronger the block removal. 0 is no deblocking. The
  406. // default is 0.
  407. double strength = 1;
  408. // Enable deblocker. The default is `false`.
  409. bool enabled = 2;
  410. }
  411. // Audio preprocessing configuration.
  412. message Audio {
  413. // Specify audio loudness normalization in loudness units relative to full
  414. // scale (LUFS). Enter a value between -24 and 0, where -24 is the Advanced
  415. // Television Systems Committee (ATSC A/85), -23 is the EU R128 broadcast
  416. // standard, -19 is the prior standard for online mono audio, -18 is the
  417. // ReplayGain standard, -16 is the prior standard for stereo audio, -14 is
  418. // the new online audio standard recommended by Spotify, as well as Amazon
  419. // Echo, and 0 disables normalization. The default is 0.
  420. double lufs = 1;
  421. // Enable boosting high frequency components. The default is `false`.
  422. bool high_boost = 2;
  423. // Enable boosting low frequency components. The default is `false`.
  424. bool low_boost = 3;
  425. }
  426. // Color preprocessing configuration.
  427. Color color = 1;
  428. // Denoise preprocessing configuration.
  429. Denoise denoise = 2;
  430. // Deblock preprocessing configuration.
  431. Deblock deblock = 3;
  432. // Audio preprocessing configuration.
  433. Audio audio = 4;
  434. }
  435. // Video stream resource.
  436. message VideoStream {
  437. // Codec type. The default is `"h264"`.
  438. //
  439. // Supported codecs:
  440. // - 'h264'
  441. // - 'h265'
  442. // - 'vp9'
  443. string codec = 1;
  444. // Enforce specified codec profile. The default is `"high"`.
  445. //
  446. // Supported codec profiles:
  447. // - 'baseline'
  448. // - 'main'
  449. // - 'high'
  450. string profile = 2;
  451. // Enforce specified codec tune.
  452. string tune = 3;
  453. // Enforce specified codec preset. The default is `"veryfast"`.
  454. string preset = 4;
  455. // The height of the video in pixels. Must be an even integer.
  456. // When not specified, the height is adjusted to match the specified width and
  457. // input aspect ratio. If both are omitted, the input height is used.
  458. int32 height_pixels = 5;
  459. // The width of the video in pixels. Must be an even integer.
  460. // When not specified, the width is adjusted to match the specified height and
  461. // input aspect ratio. If both are omitted, the input width is used.
  462. int32 width_pixels = 6;
  463. // Pixel format to use. The default is `"yuv420p"`.
  464. //
  465. // Supported pixel formats:
  466. // - 'yuv420p' pixel format.
  467. // - 'yuv422p' pixel format.
  468. // - 'yuv444p' pixel format.
  469. // - 'yuv420p10' 10-bit HDR pixel format.
  470. // - 'yuv422p10' 10-bit HDR pixel format.
  471. // - 'yuv444p10' 10-bit HDR pixel format.
  472. // - 'yuv420p12' 12-bit HDR pixel format.
  473. // - 'yuv422p12' 12-bit HDR pixel format.
  474. // - 'yuv444p12' 12-bit HDR pixel format.
  475. string pixel_format = 7;
  476. // Required. The video bitrate in bits per second. Must be between 1 and 1,000,000,000.
  477. int32 bitrate_bps = 8 [(google.api.field_behavior) = REQUIRED];
  478. // Specify the `rate_control_mode`. The default is `"vbr"`.
  479. //
  480. // Supported rate control modes:
  481. // - 'vbr' - variable bitrate
  482. // - 'crf' - constant rate factor
  483. string rate_control_mode = 9;
  484. // Use two-pass encoding strategy to achieve better video quality.
  485. // `VideoStream.rate_control_mode` must be `"vbr"`. The default is `false`.
  486. bool enable_two_pass = 10;
  487. // Target CRF level. Must be between 10 and 36, where 10 is the highest
  488. // quality and 36 is the most efficient compression. The default is 21.
  489. int32 crf_level = 11;
  490. // Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater
  491. // than zero. The default is equal to `VideoStream.bitrate_bps`.
  492. int32 vbv_size_bits = 12;
  493. // Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must
  494. // be greater than zero. The default is equal to 90% of
  495. // `VideoStream.vbv_size_bits`.
  496. int32 vbv_fullness_bits = 13;
  497. // Specifies whether an open Group of Pictures (GOP) structure should be
  498. // allowed or not. The default is `false`.
  499. bool allow_open_gop = 14;
  500. // GOP mode can be either by frame count or duration.
  501. oneof gop_mode {
  502. // Select the GOP size based on the specified frame count. Must be greater
  503. // than zero.
  504. int32 gop_frame_count = 15;
  505. // Select the GOP size based on the specified duration. The default is
  506. // `"3s"`.
  507. google.protobuf.Duration gop_duration = 16;
  508. }
  509. // The entropy coder to use. The default is `"cabac"`.
  510. //
  511. // Supported entropy coders:
  512. // - 'cavlc'
  513. // - 'cabac'
  514. string entropy_coder = 17;
  515. // Allow B-pyramid for reference frame selection. This may not be supported
  516. // on all decoders. The default is `false`.
  517. bool b_pyramid = 18;
  518. // The number of consecutive B-frames. Must be greater than or equal to zero.
  519. // Must be less than `VideoStream.gop_frame_count` if set. The default is 0.
  520. int32 b_frame_count = 19;
  521. // Required. The target video frame rate in frames per second (FPS). Must be less than
  522. // or equal to 120. Will default to the input frame rate if larger than the
  523. // input frame rate. The API will generate an output FPS that is divisible by
  524. // the input FPS, and smaller or equal to the target FPS.
  525. //
  526. // The following table shows the computed video FPS given the target FPS (in
  527. // parenthesis) and input FPS (in the first column):
  528. // ```
  529. // | | (30) | (60) | (25) | (50) |
  530. // |--------|--------|--------|------|------|
  531. // | 240 | Fail | Fail | Fail | Fail |
  532. // | 120 | 30 | 60 | 20 | 30 |
  533. // | 100 | 25 | 50 | 20 | 30 |
  534. // | 50 | 25 | 50 | 20 | 30 |
  535. // | 60 | 30 | 60 | 20 | 30 |
  536. // | 59.94 | 29.97 | 59.94 | 20 | 30 |
  537. // | 48 | 24 | 48 | 20 | 30 |
  538. // | 30 | 30 | 30 | 20 | 30 |
  539. // | 25 | 25 | 25 | 20 | 30 |
  540. // | 24 | 24 | 24 | 20 | 30 |
  541. // | 23.976 | 23.976 | 23.976 | 20 | 30 |
  542. // | 15 | 15 | 15 | 20 | 30 |
  543. // | 12 | 12 | 12 | 20 | 30 |
  544. // | 10 | 10 | 10 | 20 | 30 |
  545. // ```
  546. double frame_rate = 20 [(google.api.field_behavior) = REQUIRED];
  547. // Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and
  548. // 1, where 0 disables the quantizer and 1 maximizes the quantizer. A
  549. // higher value equals a lower bitrate but smoother image. The default is 0.
  550. double aq_strength = 21;
  551. }
  552. // Audio stream resource.
  553. message AudioStream {
  554. // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.
  555. message AudioAtom {
  556. // The audio channel.
  557. message AudioChannel {
  558. // Identifies which input file, track, and channel should be used.
  559. message AudioChannelInput {
  560. // Required. The `Input.key` that identifies the input file.
  561. string key = 1 [(google.api.field_behavior) = REQUIRED];
  562. // Required. The zero-based index of the track in the input file.
  563. int32 track = 2 [(google.api.field_behavior) = REQUIRED];
  564. // Required. The zero-based index of the channel in the input file.
  565. int32 channel = 3 [(google.api.field_behavior) = REQUIRED];
  566. // Audio volume control in dB. Negative values decrease volume,
  567. // positive values increase. The default is 0.
  568. double gain_db = 4;
  569. }
  570. // List of `Job.inputs` for this audio channel.
  571. repeated AudioChannelInput inputs = 2;
  572. }
  573. // Required. The `EditAtom.key` that references the atom with audio inputs in the
  574. // `Job.edit_list`.
  575. string key = 1 [(google.api.field_behavior) = REQUIRED];
  576. // List of `Channel`s for this audio stream.
  577. // for in-depth explanation.
  578. repeated AudioChannel channels = 2;
  579. }
  580. // The codec for this audio stream. The default is `"aac"`.
  581. //
  582. // Supported audio codecs:
  583. // - 'aac'
  584. // - 'aac-he'
  585. // - 'aac-he-v2'
  586. // - 'mp3'
  587. // - 'ac3'
  588. // - 'eac3'
  589. string codec = 1;
  590. // Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000.
  591. int32 bitrate_bps = 2 [(google.api.field_behavior) = REQUIRED];
  592. // Number of audio channels. Must be between 1 and 6. The default is 2.
  593. int32 channel_count = 3;
  594. // A list of channel names specifying layout of the audio channels.
  595. // This only affects the metadata embedded in the container headers, if
  596. // supported by the specified format. The default is `["fl", "fr"]`.
  597. //
  598. // Supported channel names:
  599. // - 'fl' - Front left channel
  600. // - 'fr' - Front right channel
  601. // - 'sl' - Side left channel
  602. // - 'sr' - Side right channel
  603. // - 'fc' - Front center channel
  604. // - 'lfe' - Low frequency
  605. repeated string channel_layout = 4;
  606. // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.
  607. repeated AudioAtom mapping = 5;
  608. // The audio sample rate in Hertz. The default is 48000 Hertz.
  609. int32 sample_rate_hertz = 6;
  610. }
  611. // Encoding of a text stream. For example, closed captions or subtitles.
  612. message TextStream {
  613. // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
  614. message TextAtom {
  615. // Identifies which input file and track should be used.
  616. message TextInput {
  617. // Required. The `Input.key` that identifies the input file.
  618. string key = 1 [(google.api.field_behavior) = REQUIRED];
  619. // Required. The zero-based index of the track in the input file.
  620. int32 track = 2 [(google.api.field_behavior) = REQUIRED];
  621. }
  622. // Required. The `EditAtom.key` that references atom with text inputs in the
  623. // `Job.edit_list`.
  624. string key = 1 [(google.api.field_behavior) = REQUIRED];
  625. // List of `Job.inputs` that should be embedded in this atom. Only one
  626. // input is supported.
  627. repeated TextInput inputs = 2;
  628. }
  629. // The codec for this text stream. The default is `"webvtt"`.
  630. //
  631. // Supported text codecs:
  632. // - 'srt'
  633. // - 'ttml'
  634. // - 'cea608'
  635. // - 'cea708'
  636. // - 'webvtt'
  637. string codec = 1;
  638. // Required. The BCP-47 language code, such as `"en-US"` or `"sr-Latn"`. For more
  639. // information, see
  640. // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
  641. string language_code = 2 [(google.api.field_behavior) = REQUIRED];
  642. // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
  643. repeated TextAtom mapping = 3;
  644. }
  645. // Segment settings for `"ts"`, `"fmp4"` and `"vtt"`.
  646. message SegmentSettings {
  647. // Duration of the segments in seconds. The default is `"6.0s"`.
  648. google.protobuf.Duration segment_duration = 1;
  649. // Required. Create an individual segment file. The default is `false`.
  650. bool individual_segments = 3 [(google.api.field_behavior) = REQUIRED];
  651. }
  652. // Encryption settings.
  653. message Encryption {
  654. // Configuration for AES-128 encryption.
  655. message Aes128Encryption {
  656. // Required. URI of the key delivery service. This URI is inserted into the M3U8
  657. // header.
  658. string key_uri = 1 [(google.api.field_behavior) = REQUIRED];
  659. }
  660. // Configuration for SAMPLE-AES encryption.
  661. message SampleAesEncryption {
  662. // Required. URI of the key delivery service. This URI is inserted into the M3U8
  663. // header.
  664. string key_uri = 1 [(google.api.field_behavior) = REQUIRED];
  665. }
  666. // Configuration for MPEG Common Encryption (MPEG-CENC).
  667. message MpegCommonEncryption {
  668. // Required. 128 bit Key ID represented as lowercase hexadecimal digits for use with
  669. // common encryption.
  670. string key_id = 1 [(google.api.field_behavior) = REQUIRED];
  671. // Required. Specify the encryption scheme.
  672. //
  673. // Supported encryption schemes:
  674. // - 'cenc'
  675. // - 'cbcs'
  676. string scheme = 2 [(google.api.field_behavior) = REQUIRED];
  677. }
  678. // Required. 128 bit encryption key represented as lowercase hexadecimal digits.
  679. string key = 1 [(google.api.field_behavior) = REQUIRED];
  680. // Required. 128 bit Initialization Vector (IV) represented as lowercase hexadecimal
  681. // digits.
  682. string iv = 2 [(google.api.field_behavior) = REQUIRED];
  683. // Encryption mode can be either `aes` or `cenc`.
  684. oneof encryption_mode {
  685. // Configuration for AES-128 encryption.
  686. Aes128Encryption aes_128 = 3;
  687. // Configuration for SAMPLE-AES encryption.
  688. SampleAesEncryption sample_aes = 4;
  689. // Configuration for MPEG Common Encryption (MPEG-CENC).
  690. MpegCommonEncryption mpeg_cenc = 5;
  691. }
  692. }
  693. // Estimated fractional progress for each step, from `0` to `1`.
  694. message Progress {
  695. // Estimated fractional progress for `analyzing` step.
  696. double analyzed = 1;
  697. // Estimated fractional progress for `encoding` step.
  698. double encoded = 2;
  699. // Estimated fractional progress for `uploading` step.
  700. double uploaded = 3;
  701. // Estimated fractional progress for `notifying` step.
  702. double notified = 4;
  703. }
  704. // Additional information about the reasons for the failure.
  705. message FailureDetail {
  706. // A description of the failure.
  707. string description = 1;
  708. }