forked from aws/aws-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVideoParameters.java
More file actions
4051 lines (3946 loc) · 175 KB
/
VideoParameters.java
File metadata and controls
4051 lines (3946 loc) · 175 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. A copy of the License is
* located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.elastictranscoder.model;
import java.io.Serializable;
/**
* <p>
* The <code>VideoParameters</code> structure.
* </p>
*/
public class VideoParameters implements Serializable, Cloneable {
/**
* <p>
* The video codec for the output file. Valid values include
* <code>gif</code>, <code>H.264</code>, <code>mpeg2</code>, and
* <code>vp8</code>. You can only specify <code>vp8</code> when the
* container type is <code>webm</code>, <code>gif</code> when the container
* type is <code>gif</code>, and <code>mpeg2</code> when the container type
* is <code>mpg</code>.
* </p>
*/
private String codec;
/**
* <p>
* <b>Profile (H.264/VP8 Only)</b>
* </p>
* <p>
* The H.264 profile that you want to use for the output file. Elastic
* Transcoder supports the following profiles:
* </p>
* <ul>
* <li><code>baseline</code>: The profile most commonly used for
* videoconferencing and for mobile applications.</li>
* <li><code>main</code>: The profile used for standard-definition digital
* TV broadcasts.</li>
* <li><code>high</code>: The profile used for high-definition digital TV
* broadcasts and for Blu-ray discs.</li>
* </ul>
* <p>
* <b>Level (H.264 Only)</b>
* </p>
* <p>
* The H.264 level that you want to use for the output file. Elastic
* Transcoder supports the following levels:
* </p>
* <p>
* <code>1</code>, <code>1b</code>, <code>1.1</code>, <code>1.2</code>,
* <code>1.3</code>, <code>2</code>, <code>2.1</code>, <code>2.2</code>,
* <code>3</code>, <code>3.1</code>, <code>3.2</code>, <code>4</code>,
* <code>4.1</code>
* </p>
* <p>
* <b>MaxReferenceFrames (H.264 Only)</b>
* </p>
* <p>
* Applicable only when the value of Video:Codec is H.264. The maximum
* number of previously decoded frames to use as a reference for decoding
* future frames. Valid values are integers 0 through 16, but we recommend
* that you not use a value greater than the following:
* </p>
* <p>
* <code>Min(Floor(Maximum decoded picture buffer in macroblocks * 256 / (Width in pixels * Height in pixels)), 16)</code>
* </p>
* <p>
* where <i>Width in pixels</i> and <i>Height in pixels</i> represent either
* MaxWidth and MaxHeight, or Resolution. <i>Maximum decoded picture buffer
* in macroblocks</i> depends on the value of the <code>Level</code> object.
* See the list below. (A macroblock is a block of pixels measuring 16x16.)
* </p>
* <ul>
* <li>1 - 396</li>
* <li>1b - 396</li>
* <li>1.1 - 900</li>
* <li>1.2 - 2376</li>
* <li>1.3 - 2376</li>
* <li>2 - 2376</li>
* <li>2.1 - 4752</li>
* <li>2.2 - 8100</li>
* <li>3 - 8100</li>
* <li>3.1 - 18000</li>
* <li>3.2 - 20480</li>
* <li>4 - 32768</li>
* <li>4.1 - 32768</li>
* </ul>
* <p>
* <b>MaxBitRate (Optional, H.264/MPEG2/VP8 only)</b>
* </p>
* <p>
* The maximum number of bits per second in a video buffer; the size of the
* buffer is specified by <code>BufferSize</code>. Specify a value between
* 16 and 62,500. You can reduce the bandwidth required to stream a video by
* reducing the maximum bit rate, but this also reduces the quality of the
* video.
* </p>
* <p>
* <b>BufferSize (Optional, H.264/MPEG2/VP8 only)</b>
* </p>
* <p>
* The maximum number of bits in any x seconds of the output video. This
* window is commonly 10 seconds, the standard segment duration when you're
* using FMP4 or MPEG-TS for the container type of the output video. Specify
* an integer greater than 0. If you specify <code>MaxBitRate</code> and
* omit <code>BufferSize</code>, Elastic Transcoder sets
* <code>BufferSize</code> to 10 times the value of <code>MaxBitRate</code>.
* </p>
* <p>
* <b>InterlacedMode (Optional, H.264/MPEG2 Only)</b>
* </p>
* <p>
* The interlace mode for the output video.
* </p>
* <p>
* Interlaced video is used to double the perceived frame rate for a video
* by interlacing two fields (one field on every other line, the other field
* on the other lines) so that the human eye registers multiple pictures per
* frame. Interlacing reduces the bandwidth required for transmitting a
* video, but can result in blurred images and flickering.
* </p>
* <p>
* Valid values include <code>Progressive</code> (no interlacing, top to
* bottom), <code>TopFirst</code> (top field first),
* <code>BottomFirst</code> (bottom field first), and <code>Auto</code>.
* </p>
* <p>
* If <code>InterlaceMode</code> is not specified, Elastic Transcoder uses
* <code>Progressive</code> for the output. If <code>Auto</code> is
* specified, Elastic Transcoder interlaces the output.
* </p>
* <p>
* <b>ColorSpaceConversionMode (Optional, H.264/MPEG2 Only)</b>
* </p>
* <p>
* The color space conversion Elastic Transcoder applies to the output
* video. Color spaces are the algorithms used by the computer to store
* information about how to render color. <code>Bt.601</code> is the
* standard for standard definition video, while <code>Bt.709</code> is the
* standard for high definition video.
* </p>
* <p>
* Valid values include <code>None</code>, <code>Bt709toBt601</code>,
* <code>Bt601toBt709</code>, and <code>Auto</code>.
* </p>
* <p>
* If you chose <code>Auto</code> for <code>ColorSpaceConversionMode</code>
* and your output is interlaced, your frame rate is one of
* <code>23.97</code>, <code>24</code>, <code>25</code>, <code>29.97</code>,
* <code>50</code>, or <code>60</code>, your <code>SegmentDuration</code> is
* null, and you are using one of the resolution changes from the list
* below, Elastic Transcoder applies the following color space conversions:
* </p>
* <ul>
* <li><i>Standard to HD, 720x480 to 1920x1080</i> - Elastic Transcoder
* applies <code>Bt601ToBt709</code></li>
* <li><i>Standard to HD, 720x576 to 1920x1080</i> - Elastic Transcoder
* applies <code>Bt601ToBt709</code></li>
* <li><i>HD to Standard, 1920x1080 to 720x480</i> - Elastic Transcoder
* applies <code>Bt709ToBt601</code></li>
* <li><i>HD to Standard, 1920x1080 to 720x576</i> - Elastic Transcoder
* applies <code>Bt709ToBt601</code></li>
* </ul>
* <note>Elastic Transcoder may change the behavior of the
* <code>ColorspaceConversionMode</code> <code>Auto</code> mode in the
* future. All outputs in a playlist must use the same
* <code>ColorSpaceConversionMode</code>.</note>
* <p>
* If you do not specify a <code>ColorSpaceConversionMode</code>, Elastic
* Transcoder does not change the color space of a file. If you are unsure
* what <code>ColorSpaceConversionMode</code> was applied to your output
* file, you can check the <code>AppliedColorSpaceConversion</code>
* parameter included in your job response. If your job does not have an
* <code>AppliedColorSpaceConversion</code> in its response, no
* <code>ColorSpaceConversionMode</code> was applied.
* </p>
* <p>
* <b>ChromaSubsampling</b>
* </p>
* <p>
* The sampling pattern for the chroma (color) channels of the output video.
* Valid values include <code>yuv420p</code> and <code>yuv422p</code>.
* </p>
* <p>
* <code>yuv420p</code> samples the chroma information of every other
* horizontal and every other vertical line, <code>yuv422p</code> samples
* the color information of every horizontal line and every other vertical
* line.
* </p>
* <p>
* <b>LoopCount (Gif Only)</b>
* </p>
* <p>
* The number of times you want the output gif to loop. Valid values include
* <code>Infinite</code> and integers between <code>0</code> and
* <code>100</code>, inclusive.
* </p>
*/
private com.amazonaws.internal.SdkInternalMap<String, String> codecOptions;
/**
* <p>
* Applicable only when the value of Video:Codec is one of
* <code>H.264</code>, <code>MPEG2</code>, or <code>VP8</code>.
* </p>
* <p>
* The maximum number of frames between key frames. Key frames are fully
* encoded frames; the frames between key frames are encoded based, in part,
* on the content of the key frames. The value is an integer formatted as a
* string; valid values are between 1 (every frame is a key frame) and
* 100000, inclusive. A higher value results in higher compression but may
* also discernibly decrease video quality.
* </p>
* <p>
* For <code>Smooth</code> outputs, the <code>FrameRate</code> must have a
* constant ratio to the <code>KeyframesMaxDist</code>. This allows
* <code>Smooth</code> playlists to switch between different quality levels
* while the file is being played.
* </p>
* <p>
* For example, an input file can have a <code>FrameRate</code> of 30 with a
* <code>KeyframesMaxDist</code> of 90. The output file then needs to have a
* ratio of 1:3. Valid outputs would have <code>FrameRate</code> of 30, 25,
* and 10, and <code>KeyframesMaxDist</code> of 90, 75, and 30,
* respectively.
* </p>
* <p>
* Alternately, this can be achieved by setting <code>FrameRate</code> to
* auto and having the same values for <code>MaxFrameRate</code> and
* <code>KeyframesMaxDist</code>.
* </p>
*/
private String keyframesMaxDist;
/**
* <p>
* Applicable only when the value of Video:Codec is one of
* <code>H.264</code>, <code>MPEG2</code>, or <code>VP8</code>.
* </p>
* <p>
* Whether to use a fixed value for <code>FixedGOP</code>. Valid values are
* <code>true</code> and <code>false</code>:
* </p>
* <ul>
* <li><code>true</code>: Elastic Transcoder uses the value of
* <code>KeyframesMaxDist</code> for the distance between key frames (the
* number of frames in a group of pictures, or GOP).</li>
* <li><code>false</code>: The distance between key frames can vary.</li>
* </ul>
* <important>
* <p>
* <code>FixedGOP</code> must be set to <code>true</code> for
* <code>fmp4</code> containers.
* </p>
* </important>
*/
private String fixedGOP;
/**
* <p>
* The bit rate of the video stream in the output file, in kilobits/second.
* Valid values depend on the values of <code>Level</code> and
* <code>Profile</code>. If you specify <code>auto</code>, Elastic
* Transcoder uses the detected bit rate of the input source. If you specify
* a value other than <code>auto</code>, we recommend that you specify a
* value less than or equal to the maximum H.264-compliant value listed for
* your level and profile:
* </p>
* <p>
* <i>Level - Maximum video bit rate in kilobits/second (baseline and main
* Profile) : maximum video bit rate in kilobits/second (high Profile)</i>
* </p>
* <ul>
* <li>1 - 64 : 80</li>
* <li>1b - 128 : 160</li>
* <li>1.1 - 192 : 240</li>
* <li>1.2 - 384 : 480</li>
* <li>1.3 - 768 : 960</li>
* <li>2 - 2000 : 2500</li>
* <li>3 - 10000 : 12500</li>
* <li>3.1 - 14000 : 17500</li>
* <li>3.2 - 20000 : 25000</li>
* <li>4 - 20000 : 25000</li>
* <li>4.1 - 50000 : 62500</li>
* </ul>
*/
private String bitRate;
/**
* <p>
* The frames per second for the video stream in the output file. Valid
* values include:
* </p>
* <p>
* <code>auto</code>, <code>10</code>, <code>15</code>, <code>23.97</code>,
* <code>24</code>, <code>25</code>, <code>29.97</code>, <code>30</code>,
* <code>60</code>
* </p>
* <p>
* If you specify <code>auto</code>, Elastic Transcoder uses the detected
* frame rate of the input source. If you specify a frame rate, we recommend
* that you perform the following calculation:
* </p>
* <p>
* <code>Frame rate = maximum recommended decoding speed in luma samples/second / (width in pixels * height in pixels)</code>
* </p>
* <p>
* where:
* </p>
* <ul>
* <li><i>width in pixels</i> and <i>height in pixels</i> represent the
* Resolution of the output video.</li>
* <li><i>maximum recommended decoding speed in Luma samples/second</i> is
* less than or equal to the maximum value listed in the following table,
* based on the value that you specified for Level.</li>
* </ul>
* <p>
* The maximum recommended decoding speed in Luma samples/second for each
* level is described in the following list (<i>Level - Decoding speed</i>):
* </p>
* <ul>
* <li>1 - 380160</li>
* <li>1b - 380160</li>
* <li>1.1 - 76800</li>
* <li>1.2 - 1536000</li>
* <li>1.3 - 3041280</li>
* <li>2 - 3041280</li>
* <li>2.1 - 5068800</li>
* <li>2.2 - 5184000</li>
* <li>3 - 10368000</li>
* <li>3.1 - 27648000</li>
* <li>3.2 - 55296000</li>
* <li>4 - 62914560</li>
* <li>4.1 - 62914560</li>
* </ul>
*/
private String frameRate;
/**
* <p>
* If you specify <code>auto</code> for <code>FrameRate</code>, Elastic
* Transcoder uses the frame rate of the input video for the frame rate of
* the output video. Specify the maximum frame rate that you want Elastic
* Transcoder to use when the frame rate of the input video is greater than
* the desired maximum frame rate of the output video. Valid values include:
* <code>10</code>, <code>15</code>, <code>23.97</code>, <code>24</code>,
* <code>25</code>, <code>29.97</code>, <code>30</code>, <code>60</code>.
* </p>
*/
private String maxFrameRate;
/**
* <important>
* <p>
* To better control resolution and aspect ratio of output videos, we
* recommend that you use the values <code>MaxWidth</code>,
* <code>MaxHeight</code>, <code>SizingPolicy</code>,
* <code>PaddingPolicy</code>, and <code>DisplayAspectRatio</code> instead
* of <code>Resolution</code> and <code>AspectRatio</code>. The two groups
* of settings are mutually exclusive. Do not use them together.
* </p>
* </important>
* <p>
* The width and height of the video in the output file, in pixels. Valid
* values are <code>auto</code> and <i>width</i> x <i>height</i>:
* </p>
* <ul>
* <li><code>auto</code>: Elastic Transcoder attempts to preserve the width
* and height of the input file, subject to the following rules.</li>
* <li><code><i>width</i> x <i>height</i></code>: The width and height of
* the output video in pixels.</li>
* </ul>
* <p>
* Note the following about specifying the width and height:
* </p>
* <ul>
* <li>The width must be an even integer between 128 and 4096, inclusive.</li>
* <li>The height must be an even integer between 96 and 3072, inclusive.</li>
* <li>If you specify a resolution that is less than the resolution of the
* input file, Elastic Transcoder rescales the output file to the lower
* resolution.</li>
* <li>If you specify a resolution that is greater than the resolution of
* the input file, Elastic Transcoder rescales the output to the higher
* resolution.</li>
* <li>We recommend that you specify a resolution for which the product of
* width and height is less than or equal to the applicable value in the
* following list (<i>List - Max width x height value</i>):</li>
* <ul>
* <li>1 - 25344</li>
* <li>1b - 25344</li>
* <li>1.1 - 101376</li>
* <li>1.2 - 101376</li>
* <li>1.3 - 101376</li>
* <li>2 - 101376</li>
* <li>2.1 - 202752</li>
* <li>2.2 - 404720</li>
* <li>3 - 404720</li>
* <li>3.1 - 921600</li>
* <li>3.2 - 1310720</li>
* <li>4 - 2097152</li>
* <li>4.1 - 2097152</li>
* </ul>
* </ul>
*/
private String resolution;
/**
* <important>
* <p>
* To better control resolution and aspect ratio of output videos, we
* recommend that you use the values <code>MaxWidth</code>,
* <code>MaxHeight</code>, <code>SizingPolicy</code>,
* <code>PaddingPolicy</code>, and <code>DisplayAspectRatio</code> instead
* of <code>Resolution</code> and <code>AspectRatio</code>. The two groups
* of settings are mutually exclusive. Do not use them together.
* </p>
* </important>
* <p>
* The display aspect ratio of the video in the output file. Valid values
* include:
* </p>
* <p>
* <code>auto</code>, <code>1:1</code>, <code>4:3</code>, <code>3:2</code>,
* <code>16:9</code>
* </p>
* <p>
* If you specify <code>auto</code>, Elastic Transcoder tries to preserve
* the aspect ratio of the input file.
* </p>
* <p>
* If you specify an aspect ratio for the output file that differs from
* aspect ratio of the input file, Elastic Transcoder adds pillarboxing
* (black bars on the sides) or letterboxing (black bars on the top and
* bottom) to maintain the aspect ratio of the active region of the video.
* </p>
*/
private String aspectRatio;
/**
* <p>
* The maximum width of the output video in pixels. If you specify
* <code>auto</code>, Elastic Transcoder uses 1920 (Full HD) as the default
* value. If you specify a numeric value, enter an even integer between 128
* and 4096.
* </p>
*/
private String maxWidth;
/**
* <p>
* The maximum height of the output video in pixels. If you specify
* <code>auto</code>, Elastic Transcoder uses 1080 (Full HD) as the default
* value. If you specify a numeric value, enter an even integer between 96
* and 3072.
* </p>
*/
private String maxHeight;
/**
* <p>
* The value that Elastic Transcoder adds to the metadata in the output
* file.
* </p>
*/
private String displayAspectRatio;
/**
* <p>
* Specify one of the following values to control scaling of the output
* video:
* </p>
* <p>
* <ul>
* <li><code>Fit</code>: Elastic Transcoder scales the output video so it
* matches the value that you specified in either <code>MaxWidth</code> or
* <code>MaxHeight</code> without exceeding the other value.</li>
* <li><code>Fill</code>: Elastic Transcoder scales the output video so it
* matches the value that you specified in either <code>MaxWidth</code> or
* <code>MaxHeight</code> and matches or exceeds the other value. Elastic
* Transcoder centers the output video and then crops it in the dimension
* (if any) that exceeds the maximum value.</li>
* <li><code>Stretch</code>: Elastic Transcoder stretches the output video
* to match the values that you specified for <code>MaxWidth</code> and
* <code>MaxHeight</code>. If the relative proportions of the input video
* and the output video are different, the output video will be distorted.</li>
* <li><code>Keep</code>: Elastic Transcoder does not scale the output
* video. If either dimension of the input video exceeds the values that you
* specified for <code>MaxWidth</code> and <code>MaxHeight</code>, Elastic
* Transcoder crops the output video.</li>
* <li><code>ShrinkToFit</code>: Elastic Transcoder scales the output video
* down so that its dimensions match the values that you specified for at
* least one of <code>MaxWidth</code> and <code>MaxHeight</code> without
* exceeding either value. If you specify this option, Elastic Transcoder
* does not scale the video up.</li>
* <li><code>ShrinkToFill</code>: Elastic Transcoder scales the output video
* down so that its dimensions match the values that you specified for at
* least one of <code>MaxWidth</code> and <code>MaxHeight</code> without
* dropping below either value. If you specify this option, Elastic
* Transcoder does not scale the video up.</li>
* </ul>
* </p>
*/
private String sizingPolicy;
/**
* <p>
* When you set <code>PaddingPolicy</code> to <code>Pad</code>, Elastic
* Transcoder may add black bars to the top and bottom and/or left and right
* sides of the output video to make the total size of the output video
* match the values that you specified for <code>MaxWidth</code> and
* <code>MaxHeight</code>.
* </p>
*/
private String paddingPolicy;
/**
* <p>
* Settings for the size, location, and opacity of graphics that you want
* Elastic Transcoder to overlay over videos that are transcoded using this
* preset. You can specify settings for up to four watermarks. Watermarks
* appear in the specified size and location, and with the specified opacity
* for the duration of the transcoded video.
* </p>
* <p>
* Watermarks can be in .png or .jpg format. If you want to display a
* watermark that is not rectangular, use the .png format, which supports
* transparency.
* </p>
* <p>
* When you create a job that uses this preset, you specify the .png or .jpg
* graphics that you want Elastic Transcoder to include in the transcoded
* videos. You can specify fewer graphics in the job than you specify
* watermark settings in the preset, which allows you to use the same preset
* for up to four watermarks that have different dimensions.
* </p>
*/
private com.amazonaws.internal.SdkInternalList<PresetWatermark> watermarks;
/**
* <p>
* The video codec for the output file. Valid values include
* <code>gif</code>, <code>H.264</code>, <code>mpeg2</code>, and
* <code>vp8</code>. You can only specify <code>vp8</code> when the
* container type is <code>webm</code>, <code>gif</code> when the container
* type is <code>gif</code>, and <code>mpeg2</code> when the container type
* is <code>mpg</code>.
* </p>
*
* @param codec
* The video codec for the output file. Valid values include
* <code>gif</code>, <code>H.264</code>, <code>mpeg2</code>, and
* <code>vp8</code>. You can only specify <code>vp8</code> when the
* container type is <code>webm</code>, <code>gif</code> when the
* container type is <code>gif</code>, and <code>mpeg2</code> when
* the container type is <code>mpg</code>.
*/
public void setCodec(String codec) {
this.codec = codec;
}
/**
* <p>
* The video codec for the output file. Valid values include
* <code>gif</code>, <code>H.264</code>, <code>mpeg2</code>, and
* <code>vp8</code>. You can only specify <code>vp8</code> when the
* container type is <code>webm</code>, <code>gif</code> when the container
* type is <code>gif</code>, and <code>mpeg2</code> when the container type
* is <code>mpg</code>.
* </p>
*
* @return The video codec for the output file. Valid values include
* <code>gif</code>, <code>H.264</code>, <code>mpeg2</code>, and
* <code>vp8</code>. You can only specify <code>vp8</code> when the
* container type is <code>webm</code>, <code>gif</code> when the
* container type is <code>gif</code>, and <code>mpeg2</code> when
* the container type is <code>mpg</code>.
*/
public String getCodec() {
return this.codec;
}
/**
* <p>
* The video codec for the output file. Valid values include
* <code>gif</code>, <code>H.264</code>, <code>mpeg2</code>, and
* <code>vp8</code>. You can only specify <code>vp8</code> when the
* container type is <code>webm</code>, <code>gif</code> when the container
* type is <code>gif</code>, and <code>mpeg2</code> when the container type
* is <code>mpg</code>.
* </p>
*
* @param codec
* The video codec for the output file. Valid values include
* <code>gif</code>, <code>H.264</code>, <code>mpeg2</code>, and
* <code>vp8</code>. You can only specify <code>vp8</code> when the
* container type is <code>webm</code>, <code>gif</code> when the
* container type is <code>gif</code>, and <code>mpeg2</code> when
* the container type is <code>mpg</code>.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public VideoParameters withCodec(String codec) {
setCodec(codec);
return this;
}
/**
* <p>
* <b>Profile (H.264/VP8 Only)</b>
* </p>
* <p>
* The H.264 profile that you want to use for the output file. Elastic
* Transcoder supports the following profiles:
* </p>
* <ul>
* <li><code>baseline</code>: The profile most commonly used for
* videoconferencing and for mobile applications.</li>
* <li><code>main</code>: The profile used for standard-definition digital
* TV broadcasts.</li>
* <li><code>high</code>: The profile used for high-definition digital TV
* broadcasts and for Blu-ray discs.</li>
* </ul>
* <p>
* <b>Level (H.264 Only)</b>
* </p>
* <p>
* The H.264 level that you want to use for the output file. Elastic
* Transcoder supports the following levels:
* </p>
* <p>
* <code>1</code>, <code>1b</code>, <code>1.1</code>, <code>1.2</code>,
* <code>1.3</code>, <code>2</code>, <code>2.1</code>, <code>2.2</code>,
* <code>3</code>, <code>3.1</code>, <code>3.2</code>, <code>4</code>,
* <code>4.1</code>
* </p>
* <p>
* <b>MaxReferenceFrames (H.264 Only)</b>
* </p>
* <p>
* Applicable only when the value of Video:Codec is H.264. The maximum
* number of previously decoded frames to use as a reference for decoding
* future frames. Valid values are integers 0 through 16, but we recommend
* that you not use a value greater than the following:
* </p>
* <p>
* <code>Min(Floor(Maximum decoded picture buffer in macroblocks * 256 / (Width in pixels * Height in pixels)), 16)</code>
* </p>
* <p>
* where <i>Width in pixels</i> and <i>Height in pixels</i> represent either
* MaxWidth and MaxHeight, or Resolution. <i>Maximum decoded picture buffer
* in macroblocks</i> depends on the value of the <code>Level</code> object.
* See the list below. (A macroblock is a block of pixels measuring 16x16.)
* </p>
* <ul>
* <li>1 - 396</li>
* <li>1b - 396</li>
* <li>1.1 - 900</li>
* <li>1.2 - 2376</li>
* <li>1.3 - 2376</li>
* <li>2 - 2376</li>
* <li>2.1 - 4752</li>
* <li>2.2 - 8100</li>
* <li>3 - 8100</li>
* <li>3.1 - 18000</li>
* <li>3.2 - 20480</li>
* <li>4 - 32768</li>
* <li>4.1 - 32768</li>
* </ul>
* <p>
* <b>MaxBitRate (Optional, H.264/MPEG2/VP8 only)</b>
* </p>
* <p>
* The maximum number of bits per second in a video buffer; the size of the
* buffer is specified by <code>BufferSize</code>. Specify a value between
* 16 and 62,500. You can reduce the bandwidth required to stream a video by
* reducing the maximum bit rate, but this also reduces the quality of the
* video.
* </p>
* <p>
* <b>BufferSize (Optional, H.264/MPEG2/VP8 only)</b>
* </p>
* <p>
* The maximum number of bits in any x seconds of the output video. This
* window is commonly 10 seconds, the standard segment duration when you're
* using FMP4 or MPEG-TS for the container type of the output video. Specify
* an integer greater than 0. If you specify <code>MaxBitRate</code> and
* omit <code>BufferSize</code>, Elastic Transcoder sets
* <code>BufferSize</code> to 10 times the value of <code>MaxBitRate</code>.
* </p>
* <p>
* <b>InterlacedMode (Optional, H.264/MPEG2 Only)</b>
* </p>
* <p>
* The interlace mode for the output video.
* </p>
* <p>
* Interlaced video is used to double the perceived frame rate for a video
* by interlacing two fields (one field on every other line, the other field
* on the other lines) so that the human eye registers multiple pictures per
* frame. Interlacing reduces the bandwidth required for transmitting a
* video, but can result in blurred images and flickering.
* </p>
* <p>
* Valid values include <code>Progressive</code> (no interlacing, top to
* bottom), <code>TopFirst</code> (top field first),
* <code>BottomFirst</code> (bottom field first), and <code>Auto</code>.
* </p>
* <p>
* If <code>InterlaceMode</code> is not specified, Elastic Transcoder uses
* <code>Progressive</code> for the output. If <code>Auto</code> is
* specified, Elastic Transcoder interlaces the output.
* </p>
* <p>
* <b>ColorSpaceConversionMode (Optional, H.264/MPEG2 Only)</b>
* </p>
* <p>
* The color space conversion Elastic Transcoder applies to the output
* video. Color spaces are the algorithms used by the computer to store
* information about how to render color. <code>Bt.601</code> is the
* standard for standard definition video, while <code>Bt.709</code> is the
* standard for high definition video.
* </p>
* <p>
* Valid values include <code>None</code>, <code>Bt709toBt601</code>,
* <code>Bt601toBt709</code>, and <code>Auto</code>.
* </p>
* <p>
* If you chose <code>Auto</code> for <code>ColorSpaceConversionMode</code>
* and your output is interlaced, your frame rate is one of
* <code>23.97</code>, <code>24</code>, <code>25</code>, <code>29.97</code>,
* <code>50</code>, or <code>60</code>, your <code>SegmentDuration</code> is
* null, and you are using one of the resolution changes from the list
* below, Elastic Transcoder applies the following color space conversions:
* </p>
* <ul>
* <li><i>Standard to HD, 720x480 to 1920x1080</i> - Elastic Transcoder
* applies <code>Bt601ToBt709</code></li>
* <li><i>Standard to HD, 720x576 to 1920x1080</i> - Elastic Transcoder
* applies <code>Bt601ToBt709</code></li>
* <li><i>HD to Standard, 1920x1080 to 720x480</i> - Elastic Transcoder
* applies <code>Bt709ToBt601</code></li>
* <li><i>HD to Standard, 1920x1080 to 720x576</i> - Elastic Transcoder
* applies <code>Bt709ToBt601</code></li>
* </ul>
* <note>Elastic Transcoder may change the behavior of the
* <code>ColorspaceConversionMode</code> <code>Auto</code> mode in the
* future. All outputs in a playlist must use the same
* <code>ColorSpaceConversionMode</code>.</note>
* <p>
* If you do not specify a <code>ColorSpaceConversionMode</code>, Elastic
* Transcoder does not change the color space of a file. If you are unsure
* what <code>ColorSpaceConversionMode</code> was applied to your output
* file, you can check the <code>AppliedColorSpaceConversion</code>
* parameter included in your job response. If your job does not have an
* <code>AppliedColorSpaceConversion</code> in its response, no
* <code>ColorSpaceConversionMode</code> was applied.
* </p>
* <p>
* <b>ChromaSubsampling</b>
* </p>
* <p>
* The sampling pattern for the chroma (color) channels of the output video.
* Valid values include <code>yuv420p</code> and <code>yuv422p</code>.
* </p>
* <p>
* <code>yuv420p</code> samples the chroma information of every other
* horizontal and every other vertical line, <code>yuv422p</code> samples
* the color information of every horizontal line and every other vertical
* line.
* </p>
* <p>
* <b>LoopCount (Gif Only)</b>
* </p>
* <p>
* The number of times you want the output gif to loop. Valid values include
* <code>Infinite</code> and integers between <code>0</code> and
* <code>100</code>, inclusive.
* </p>
*
* @return <b>Profile (H.264/VP8 Only)</b> </p>
* <p>
* The H.264 profile that you want to use for the output file.
* Elastic Transcoder supports the following profiles:
* </p>
* <ul>
* <li><code>baseline</code>: The profile most commonly used for
* videoconferencing and for mobile applications.</li>
* <li><code>main</code>: The profile used for standard-definition
* digital TV broadcasts.</li>
* <li><code>high</code>: The profile used for high-definition
* digital TV broadcasts and for Blu-ray discs.</li>
* </ul>
* <p>
* <b>Level (H.264 Only)</b>
* </p>
* <p>
* The H.264 level that you want to use for the output file. Elastic
* Transcoder supports the following levels:
* </p>
* <p>
* <code>1</code>, <code>1b</code>, <code>1.1</code>,
* <code>1.2</code>, <code>1.3</code>, <code>2</code>,
* <code>2.1</code>, <code>2.2</code>, <code>3</code>,
* <code>3.1</code>, <code>3.2</code>, <code>4</code>,
* <code>4.1</code>
* </p>
* <p>
* <b>MaxReferenceFrames (H.264 Only)</b>
* </p>
* <p>
* Applicable only when the value of Video:Codec is H.264. The
* maximum number of previously decoded frames to use as a reference
* for decoding future frames. Valid values are integers 0 through
* 16, but we recommend that you not use a value greater than the
* following:
* </p>
* <p>
* <code>Min(Floor(Maximum decoded picture buffer in macroblocks * 256 / (Width in pixels * Height in pixels)), 16)</code>
* </p>
* <p>
* where <i>Width in pixels</i> and <i>Height in pixels</i>
* represent either MaxWidth and MaxHeight, or Resolution.
* <i>Maximum decoded picture buffer in macroblocks</i> depends on
* the value of the <code>Level</code> object. See the list below.
* (A macroblock is a block of pixels measuring 16x16.)
* </p>
* <ul>
* <li>1 - 396</li>
* <li>1b - 396</li>
* <li>1.1 - 900</li>
* <li>1.2 - 2376</li>
* <li>1.3 - 2376</li>
* <li>2 - 2376</li>
* <li>2.1 - 4752</li>
* <li>2.2 - 8100</li>
* <li>3 - 8100</li>
* <li>3.1 - 18000</li>
* <li>3.2 - 20480</li>
* <li>4 - 32768</li>
* <li>4.1 - 32768</li>
* </ul>
* <p>
* <b>MaxBitRate (Optional, H.264/MPEG2/VP8 only)</b>
* </p>
* <p>
* The maximum number of bits per second in a video buffer; the size
* of the buffer is specified by <code>BufferSize</code>. Specify a
* value between 16 and 62,500. You can reduce the bandwidth
* required to stream a video by reducing the maximum bit rate, but
* this also reduces the quality of the video.
* </p>
* <p>
* <b>BufferSize (Optional, H.264/MPEG2/VP8 only)</b>
* </p>
* <p>
* The maximum number of bits in any x seconds of the output video.
* This window is commonly 10 seconds, the standard segment duration
* when you're using FMP4 or MPEG-TS for the container type of the
* output video. Specify an integer greater than 0. If you specify
* <code>MaxBitRate</code> and omit <code>BufferSize</code>, Elastic
* Transcoder sets <code>BufferSize</code> to 10 times the value of
* <code>MaxBitRate</code>.
* </p>
* <p>
* <b>InterlacedMode (Optional, H.264/MPEG2 Only)</b>
* </p>
* <p>
* The interlace mode for the output video.
* </p>
* <p>
* Interlaced video is used to double the perceived frame rate for a
* video by interlacing two fields (one field on every other line,
* the other field on the other lines) so that the human eye
* registers multiple pictures per frame. Interlacing reduces the
* bandwidth required for transmitting a video, but can result in
* blurred images and flickering.
* </p>
* <p>
* Valid values include <code>Progressive</code> (no interlacing,
* top to bottom), <code>TopFirst</code> (top field first),
* <code>BottomFirst</code> (bottom field first), and
* <code>Auto</code>.
* </p>
* <p>
* If <code>InterlaceMode</code> is not specified, Elastic
* Transcoder uses <code>Progressive</code> for the output. If
* <code>Auto</code> is specified, Elastic Transcoder interlaces the
* output.
* </p>
* <p>
* <b>ColorSpaceConversionMode (Optional, H.264/MPEG2 Only)</b>
* </p>
* <p>
* The color space conversion Elastic Transcoder applies to the
* output video. Color spaces are the algorithms used by the
* computer to store information about how to render color.
* <code>Bt.601</code> is the standard for standard definition
* video, while <code>Bt.709</code> is the standard for high
* definition video.
* </p>
* <p>
* Valid values include <code>None</code>, <code>Bt709toBt601</code>, <code>Bt601toBt709</code>, and <code>Auto</code>.
* </p>
* <p>
* If you chose <code>Auto</code> for
* <code>ColorSpaceConversionMode</code> and your output is
* interlaced, your frame rate is one of <code>23.97</code>,
* <code>24</code>, <code>25</code>, <code>29.97</code>,
* <code>50</code>, or <code>60</code>, your
* <code>SegmentDuration</code> is null, and you are using one of
* the resolution changes from the list below, Elastic Transcoder
* applies the following color space conversions:
* </p>
* <ul>
* <li><i>Standard to HD, 720x480 to 1920x1080</i> - Elastic
* Transcoder applies <code>Bt601ToBt709</code></li>
* <li><i>Standard to HD, 720x576 to 1920x1080</i> - Elastic
* Transcoder applies <code>Bt601ToBt709</code></li>
* <li><i>HD to Standard, 1920x1080 to 720x480</i> - Elastic
* Transcoder applies <code>Bt709ToBt601</code></li>
* <li><i>HD to Standard, 1920x1080 to 720x576</i> - Elastic
* Transcoder applies <code>Bt709ToBt601</code></li>
* </ul>
* <note>Elastic Transcoder may change the behavior of the
* <code>ColorspaceConversionMode</code> <code>Auto</code> mode in
* the future. All outputs in a playlist must use the same
* <code>ColorSpaceConversionMode</code>.</note>
* <p>
* If you do not specify a <code>ColorSpaceConversionMode</code>,
* Elastic Transcoder does not change the color space of a file. If
* you are unsure what <code>ColorSpaceConversionMode</code> was
* applied to your output file, you can check the
* <code>AppliedColorSpaceConversion</code> parameter included in
* your job response. If your job does not have an
* <code>AppliedColorSpaceConversion</code> in its response, no
* <code>ColorSpaceConversionMode</code> was applied.
* </p>
* <p>
* <b>ChromaSubsampling</b>
* </p>
* <p>
* The sampling pattern for the chroma (color) channels of the
* output video. Valid values include <code>yuv420p</code> and
* <code>yuv422p</code>.
* </p>
* <p>
* <code>yuv420p</code> samples the chroma information of every
* other horizontal and every other vertical line,
* <code>yuv422p</code> samples the color information of every
* horizontal line and every other vertical line.
* </p>
* <p>
* <b>LoopCount (Gif Only)</b>
* </p>
* <p>
* The number of times you want the output gif to loop. Valid values
* include <code>Infinite</code> and integers between <code>0</code>
* and <code>100</code>, inclusive.
*/
public java.util.Map<String, String> getCodecOptions() {
if (codecOptions == null) {
codecOptions = new com.amazonaws.internal.SdkInternalMap<String, String>();
}
return codecOptions;
}
/**
* <p>
* <b>Profile (H.264/VP8 Only)</b>
* </p>
* <p>
* The H.264 profile that you want to use for the output file. Elastic
* Transcoder supports the following profiles:
* </p>
* <ul>
* <li><code>baseline</code>: The profile most commonly used for
* videoconferencing and for mobile applications.</li>
* <li><code>main</code>: The profile used for standard-definition digital
* TV broadcasts.</li>
* <li><code>high</code>: The profile used for high-definition digital TV
* broadcasts and for Blu-ray discs.</li>
* </ul>
* <p>
* <b>Level (H.264 Only)</b>
* </p>
* <p>
* The H.264 level that you want to use for the output file. Elastic
* Transcoder supports the following levels:
* </p>
* <p>
* <code>1</code>, <code>1b</code>, <code>1.1</code>, <code>1.2</code>,
* <code>1.3</code>, <code>2</code>, <code>2.1</code>, <code>2.2</code>,
* <code>3</code>, <code>3.1</code>, <code>3.2</code>, <code>4</code>,
* <code>4.1</code>
* </p>
* <p>
* <b>MaxReferenceFrames (H.264 Only)</b>
* </p>