blib/lib/Paws/ElasticTranscoder/VideoParameters.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::ElasticTranscoder::VideoParameters;
3 use Moose;
4 has AspectRatio => (is => 'ro', isa => 'Str');
5 has BitRate => (is => 'ro', isa => 'Str');
6 has Codec => (is => 'ro', isa => 'Str');
7 has CodecOptions => (is => 'ro', isa => 'Paws::ElasticTranscoder::CodecOptions');
8 has DisplayAspectRatio => (is => 'ro', isa => 'Str');
9 has FixedGOP => (is => 'ro', isa => 'Str');
10 has FrameRate => (is => 'ro', isa => 'Str');
11 has KeyframesMaxDist => (is => 'ro', isa => 'Str');
12 has MaxFrameRate => (is => 'ro', isa => 'Str');
13 has MaxHeight => (is => 'ro', isa => 'Str');
14 has MaxWidth => (is => 'ro', isa => 'Str');
15 has PaddingPolicy => (is => 'ro', isa => 'Str');
16 has Resolution => (is => 'ro', isa => 'Str');
17 has SizingPolicy => (is => 'ro', isa => 'Str');
18 has Watermarks => (is => 'ro', isa => 'ArrayRef[Paws::ElasticTranscoder::PresetWatermark]');
19  
20 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::ElasticTranscoder::VideoParameters
27  
28 =head1 USAGE
29  
30 This class represents one of two things:
31  
32 =head3 Arguments in a call to a service
33  
34 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
35 Each attribute should be used as a named argument in the calls that expect this type of object.
36  
37 As an example, if Att1 is expected to be a Paws::ElasticTranscoder::VideoParameters object:
38  
39 $service_obj->Method(Att1 => { AspectRatio => $value, ..., Watermarks => $value });
40  
41 =head3 Results returned from an API call
42  
43 Use accessors for each attribute. If Att1 is expected to be an Paws::ElasticTranscoder::VideoParameters object:
44  
45 $result = $service_obj->Method(...);
46 $result->Att1->AspectRatio
47  
48 =head1 DESCRIPTION
49  
50 The C<VideoParameters> structure.
51  
52 =head1 ATTRIBUTES
53  
54  
55 =head2 AspectRatio => Str
56  
57 To better control resolution and aspect ratio of output videos, we
58 recommend that you use the values C<MaxWidth>, C<MaxHeight>,
59 C<SizingPolicy>, C<PaddingPolicy>, and C<DisplayAspectRatio> instead of
60 C<Resolution> and C<AspectRatio>. The two groups of settings are
61 mutually exclusive. Do not use them together.
62  
63 The display aspect ratio of the video in the output file. Valid values
64 include:
65  
66 C<auto>, C<1:1>, C<4:3>, C<3:2>, C<16:9>
67  
68 If you specify C<auto>, Elastic Transcoder tries to preserve the aspect
69 ratio of the input file.
70  
71 If you specify an aspect ratio for the output file that differs from
72 aspect ratio of the input file, Elastic Transcoder adds pillarboxing
73 (black bars on the sides) or letterboxing (black bars on the top and
74 bottom) to maintain the aspect ratio of the active region of the video.
75  
76  
77 =head2 BitRate => Str
78  
79 The bit rate of the video stream in the output file, in
80 kilobits/second. Valid values depend on the values of C<Level> and
81 C<Profile>. If you specify C<auto>, Elastic Transcoder uses the
82 detected bit rate of the input source. If you specify a value other
83 than C<auto>, we recommend that you specify a value less than or equal
84 to the maximum H.264-compliant value listed for your level and profile:
85  
86 I<Level - Maximum video bit rate in kilobits/second (baseline and main
87 Profile) : maximum video bit rate in kilobits/second (high Profile)>
88  
89 =over
90  
91 =item *
92  
93 1 - 64 : 80
94  
95 =item *
96  
97 1b - 128 : 160
98  
99 =item *
100  
101 1.1 - 192 : 240
102  
103 =item *
104  
105 1.2 - 384 : 480
106  
107 =item *
108  
109 1.3 - 768 : 960
110  
111 =item *
112  
113 2 - 2000 : 2500
114  
115 =item *
116  
117 3 - 10000 : 12500
118  
119 =item *
120  
121 3.1 - 14000 : 17500
122  
123 =item *
124  
125 3.2 - 20000 : 25000
126  
127 =item *
128  
129 4 - 20000 : 25000
130  
131 =item *
132  
133 4.1 - 50000 : 62500
134  
135 =back
136  
137  
138  
139 =head2 Codec => Str
140  
141 The video codec for the output file. Valid values include C<gif>,
142 C<H.264>, C<mpeg2>, C<vp8>, and C<vp9>. You can only specify C<vp8> and
143 C<vp9> when the container type is C<webm>, C<gif> when the container
144 type is C<gif>, and C<mpeg2> when the container type is C<mpg>.
145  
146  
147 =head2 CodecOptions => L<Paws::ElasticTranscoder::CodecOptions>
148  
149 B<Profile (H.264/VP8/VP9 Only)>
150  
151 The H.264 profile that you want to use for the output file. Elastic
152 Transcoder supports the following profiles:
153  
154 =over
155  
156 =item *
157  
158 C<baseline>: The profile most commonly used for videoconferencing and
159 for mobile applications.
160  
161 =item *
162  
163 C<main>: The profile used for standard-definition digital TV
164 broadcasts.
165  
166 =item *
167  
168 C<high>: The profile used for high-definition digital TV broadcasts and
169 for Blu-ray discs.
170  
171 =back
172  
173 B<Level (H.264 Only)>
174  
175 The H.264 level that you want to use for the output file. Elastic
176 Transcoder supports the following levels:
177  
178 C<1>, C<1b>, C<1.1>, C<1.2>, C<1.3>, C<2>, C<2.1>, C<2.2>, C<3>,
179 C<3.1>, C<3.2>, C<4>, C<4.1>
180  
181 B<MaxReferenceFrames (H.264 Only)>
182  
183 Applicable only when the value of Video:Codec is H.264. The maximum
184 number of previously decoded frames to use as a reference for decoding
185 future frames. Valid values are integers 0 through 16, but we recommend
186 that you not use a value greater than the following:
187  
188 C<Min(Floor(Maximum decoded picture buffer in macroblocks * 256 /
189 (Width in pixels * Height in pixels)), 16)>
190  
191 where I<Width in pixels> and I<Height in pixels> represent either
192 MaxWidth and MaxHeight, or Resolution. I<Maximum decoded picture buffer
193 in macroblocks> depends on the value of the C<Level> object. See the
194 list below. (A macroblock is a block of pixels measuring 16x16.)
195  
196 =over
197  
198 =item *
199  
200 1 - 396
201  
202 =item *
203  
204 1b - 396
205  
206 =item *
207  
208 1.1 - 900
209  
210 =item *
211  
212 1.2 - 2376
213  
214 =item *
215  
216 1.3 - 2376
217  
218 =item *
219  
220 2 - 2376
221  
222 =item *
223  
224 2.1 - 4752
225  
226 =item *
227  
228 2.2 - 8100
229  
230 =item *
231  
232 3 - 8100
233  
234 =item *
235  
236 3.1 - 18000
237  
238 =item *
239  
240 3.2 - 20480
241  
242 =item *
243  
244 4 - 32768
245  
246 =item *
247  
248 4.1 - 32768
249  
250 =back
251  
252 B<MaxBitRate (Optional, H.264/MPEG2/VP8/VP9 only)>
253  
254 The maximum number of bits per second in a video buffer; the size of
255 the buffer is specified by C<BufferSize>. Specify a value between 16
256 and 62,500. You can reduce the bandwidth required to stream a video by
257 reducing the maximum bit rate, but this also reduces the quality of the
258 video.
259  
260 B<BufferSize (Optional, H.264/MPEG2/VP8/VP9 only)>
261  
262 The maximum number of bits in any x seconds of the output video. This
263 window is commonly 10 seconds, the standard segment duration when
264 you're using FMP4 or MPEG-TS for the container type of the output
265 video. Specify an integer greater than 0. If you specify C<MaxBitRate>
266 and omit C<BufferSize>, Elastic Transcoder sets C<BufferSize> to 10
267 times the value of C<MaxBitRate>.
268  
269 B<InterlacedMode (Optional, H.264/MPEG2 Only)>
270  
271 The interlace mode for the output video.
272  
273 Interlaced video is used to double the perceived frame rate for a video
274 by interlacing two fields (one field on every other line, the other
275 field on the other lines) so that the human eye registers multiple
276 pictures per frame. Interlacing reduces the bandwidth required for
277 transmitting a video, but can result in blurred images and flickering.
278  
279 Valid values include C<Progressive> (no interlacing, top to bottom),
280 C<TopFirst> (top field first), C<BottomFirst> (bottom field first), and
281 C<Auto>.
282  
283 If C<InterlaceMode> is not specified, Elastic Transcoder uses
284 C<Progressive> for the output. If C<Auto> is specified, Elastic
285 Transcoder interlaces the output.
286  
287 B<ColorSpaceConversionMode (Optional, H.264/MPEG2 Only)>
288  
289 The color space conversion Elastic Transcoder applies to the output
290 video. Color spaces are the algorithms used by the computer to store
291 information about how to render color. C<Bt.601> is the standard for
292 standard definition video, while C<Bt.709> is the standard for high
293 definition video.
294  
295 Valid values include C<None>, C<Bt709toBt601>, C<Bt601toBt709>, and
296 C<Auto>.
297  
298 If you chose C<Auto> for C<ColorSpaceConversionMode> and your output is
299 interlaced, your frame rate is one of C<23.97>, C<24>, C<25>, C<29.97>,
300 C<50>, or C<60>, your C<SegmentDuration> is null, and you are using one
301 of the resolution changes from the list below, Elastic Transcoder
302 applies the following color space conversions:
303  
304 =over
305  
306 =item *
307  
308 I<Standard to HD, 720x480 to 1920x1080> - Elastic Transcoder applies
309 C<Bt601ToBt709>
310  
311 =item *
312  
313 I<Standard to HD, 720x576 to 1920x1080> - Elastic Transcoder applies
314 C<Bt601ToBt709>
315  
316 =item *
317  
318 I<HD to Standard, 1920x1080 to 720x480> - Elastic Transcoder applies
319 C<Bt709ToBt601>
320  
321 =item *
322  
323 I<HD to Standard, 1920x1080 to 720x576> - Elastic Transcoder applies
324 C<Bt709ToBt601>
325  
326 =back
327  
328 Elastic Transcoder may change the behavior of the
329 C<ColorspaceConversionMode> C<Auto> mode in the future. All outputs in
330 a playlist must use the same C<ColorSpaceConversionMode>.
331  
332 If you do not specify a C<ColorSpaceConversionMode>, Elastic Transcoder
333 does not change the color space of a file. If you are unsure what
334 C<ColorSpaceConversionMode> was applied to your output file, you can
335 check the C<AppliedColorSpaceConversion> parameter included in your job
336 response. If your job does not have an C<AppliedColorSpaceConversion>
337 in its response, no C<ColorSpaceConversionMode> was applied.
338  
339 B<ChromaSubsampling>
340  
341 The sampling pattern for the chroma (color) channels of the output
342 video. Valid values include C<yuv420p> and C<yuv422p>.
343  
344 C<yuv420p> samples the chroma information of every other horizontal and
345 every other vertical line, C<yuv422p> samples the color information of
346 every horizontal line and every other vertical line.
347  
348 B<LoopCount (Gif Only)>
349  
350 The number of times you want the output gif to loop. Valid values
351 include C<Infinite> and integers between C<0> and C<100>, inclusive.
352  
353  
354 =head2 DisplayAspectRatio => Str
355  
356 The value that Elastic Transcoder adds to the metadata in the output
357 file.
358  
359  
360 =head2 FixedGOP => Str
361  
362 Applicable only when the value of Video:Codec is one of C<H.264>,
363 C<MPEG2>, or C<VP8>.
364  
365 Whether to use a fixed value for C<FixedGOP>. Valid values are C<true>
366 and C<false>:
367  
368 =over
369  
370 =item *
371  
372 C<true>: Elastic Transcoder uses the value of C<KeyframesMaxDist> for
373 the distance between key frames (the number of frames in a group of
374 pictures, or GOP).
375  
376 =item *
377  
378 C<false>: The distance between key frames can vary.
379  
380 =back
381  
382 C<FixedGOP> must be set to C<true> for C<fmp4> containers.
383  
384  
385 =head2 FrameRate => Str
386  
387 The frames per second for the video stream in the output file. Valid
388 values include:
389  
390 C<auto>, C<10>, C<15>, C<23.97>, C<24>, C<25>, C<29.97>, C<30>, C<60>
391  
392 If you specify C<auto>, Elastic Transcoder uses the detected frame rate
393 of the input source. If you specify a frame rate, we recommend that you
394 perform the following calculation:
395  
396 C<Frame rate = maximum recommended decoding speed in luma
397 samples/second / (width in pixels * height in pixels)>
398  
399 where:
400  
401 =over
402  
403 =item *
404  
405 I<width in pixels> and I<height in pixels> represent the Resolution of
406 the output video.
407  
408 =item *
409  
410 I<maximum recommended decoding speed in Luma samples/second> is less
411 than or equal to the maximum value listed in the following table, based
412 on the value that you specified for Level.
413  
414 =back
415  
416 The maximum recommended decoding speed in Luma samples/second for each
417 level is described in the following list (I<Level - Decoding speed>):
418  
419 =over
420  
421 =item *
422  
423 1 - 380160
424  
425 =item *
426  
427 1b - 380160
428  
429 =item *
430  
431 1.1 - 76800
432  
433 =item *
434  
435 1.2 - 1536000
436  
437 =item *
438  
439 1.3 - 3041280
440  
441 =item *
442  
443 2 - 3041280
444  
445 =item *
446  
447 2.1 - 5068800
448  
449 =item *
450  
451 2.2 - 5184000
452  
453 =item *
454  
455 3 - 10368000
456  
457 =item *
458  
459 3.1 - 27648000
460  
461 =item *
462  
463 3.2 - 55296000
464  
465 =item *
466  
467 4 - 62914560
468  
469 =item *
470  
471 4.1 - 62914560
472  
473 =back
474  
475  
476  
477 =head2 KeyframesMaxDist => Str
478  
479 Applicable only when the value of Video:Codec is one of C<H.264>,
480 C<MPEG2>, or C<VP8>.
481  
482 The maximum number of frames between key frames. Key frames are fully
483 encoded frames; the frames between key frames are encoded based, in
484 part, on the content of the key frames. The value is an integer
485 formatted as a string; valid values are between 1 (every frame is a key
486 frame) and 100000, inclusive. A higher value results in higher
487 compression but may also discernibly decrease video quality.
488  
489 For C<Smooth> outputs, the C<FrameRate> must have a constant ratio to
490 the C<KeyframesMaxDist>. This allows C<Smooth> playlists to switch
491 between different quality levels while the file is being played.
492  
493 For example, an input file can have a C<FrameRate> of 30 with a
494 C<KeyframesMaxDist> of 90. The output file then needs to have a ratio
495 of 1:3. Valid outputs would have C<FrameRate> of 30, 25, and 10, and
496 C<KeyframesMaxDist> of 90, 75, and 30, respectively.
497  
498 Alternately, this can be achieved by setting C<FrameRate> to auto and
499 having the same values for C<MaxFrameRate> and C<KeyframesMaxDist>.
500  
501  
502 =head2 MaxFrameRate => Str
503  
504 If you specify C<auto> for C<FrameRate>, Elastic Transcoder uses the
505 frame rate of the input video for the frame rate of the output video.
506 Specify the maximum frame rate that you want Elastic Transcoder to use
507 when the frame rate of the input video is greater than the desired
508 maximum frame rate of the output video. Valid values include: C<10>,
509 C<15>, C<23.97>, C<24>, C<25>, C<29.97>, C<30>, C<60>.
510  
511  
512 =head2 MaxHeight => Str
513  
514 The maximum height of the output video in pixels. If you specify
515 C<auto>, Elastic Transcoder uses 1080 (Full HD) as the default value.
516 If you specify a numeric value, enter an even integer between 96 and
517 3072.
518  
519  
520 =head2 MaxWidth => Str
521  
522 The maximum width of the output video in pixels. If you specify
523 C<auto>, Elastic Transcoder uses 1920 (Full HD) as the default value.
524 If you specify a numeric value, enter an even integer between 128 and
525 4096.
526  
527  
528 =head2 PaddingPolicy => Str
529  
530 When you set C<PaddingPolicy> to C<Pad>, Elastic Transcoder may add
531 black bars to the top and bottom and/or left and right sides of the
532 output video to make the total size of the output video match the
533 values that you specified for C<MaxWidth> and C<MaxHeight>.
534  
535  
536 =head2 Resolution => Str
537  
538 To better control resolution and aspect ratio of output videos, we
539 recommend that you use the values C<MaxWidth>, C<MaxHeight>,
540 C<SizingPolicy>, C<PaddingPolicy>, and C<DisplayAspectRatio> instead of
541 C<Resolution> and C<AspectRatio>. The two groups of settings are
542 mutually exclusive. Do not use them together.
543  
544 The width and height of the video in the output file, in pixels. Valid
545 values are C<auto> and I<width> x I<height>:
546  
547 =over
548  
549 =item *
550  
551 C<auto>: Elastic Transcoder attempts to preserve the width and height
552 of the input file, subject to the following rules.
553  
554 =item *
555  
556 C<I<width> x I<height> >: The width and height of the output video in
557 pixels.
558  
559 =back
560  
561 Note the following about specifying the width and height:
562  
563 =over
564  
565 =item *
566  
567 The width must be an even integer between 128 and 4096, inclusive.
568  
569 =item *
570  
571 The height must be an even integer between 96 and 3072, inclusive.
572  
573 =item *
574  
575 If you specify a resolution that is less than the resolution of the
576 input file, Elastic Transcoder rescales the output file to the lower
577 resolution.
578  
579 =item *
580  
581 If you specify a resolution that is greater than the resolution of the
582 input file, Elastic Transcoder rescales the output to the higher
583 resolution.
584  
585 =item *
586  
587 We recommend that you specify a resolution for which the product of
588 width and height is less than or equal to the applicable value in the
589 following list (I<List - Max width x height value>):
590  
591 =over
592  
593 =item *
594  
595 1 - 25344
596  
597 =item *
598  
599 1b - 25344
600  
601 =item *
602  
603 1.1 - 101376
604  
605 =item *
606  
607 1.2 - 101376
608  
609 =item *
610  
611 1.3 - 101376
612  
613 =item *
614  
615 2 - 101376
616  
617 =item *
618  
619 2.1 - 202752
620  
621 =item *
622  
623 2.2 - 404720
624  
625 =item *
626  
627 3 - 404720
628  
629 =item *
630  
631 3.1 - 921600
632  
633 =item *
634  
635 3.2 - 1310720
636  
637 =item *
638  
639 4 - 2097152
640  
641 =item *
642  
643 4.1 - 2097152
644  
645 =back
646  
647 =back
648  
649  
650  
651 =head2 SizingPolicy => Str
652  
653 Specify one of the following values to control scaling of the output
654 video:
655  
656 =over
657  
658 =item *
659  
660 C<Fit>: Elastic Transcoder scales the output video so it matches the
661 value that you specified in either C<MaxWidth> or C<MaxHeight> without
662 exceeding the other value.
663  
664 =item *
665  
666 C<Fill>: Elastic Transcoder scales the output video so it matches the
667 value that you specified in either C<MaxWidth> or C<MaxHeight> and
668 matches or exceeds the other value. Elastic Transcoder centers the
669 output video and then crops it in the dimension (if any) that exceeds
670 the maximum value.
671  
672 =item *
673  
674 C<Stretch>: Elastic Transcoder stretches the output video to match the
675 values that you specified for C<MaxWidth> and C<MaxHeight>. If the
676 relative proportions of the input video and the output video are
677 different, the output video will be distorted.
678  
679 =item *
680  
681 C<Keep>: Elastic Transcoder does not scale the output video. If either
682 dimension of the input video exceeds the values that you specified for
683 C<MaxWidth> and C<MaxHeight>, Elastic Transcoder crops the output
684 video.
685  
686 =item *
687  
688 C<ShrinkToFit>: Elastic Transcoder scales the output video down so that
689 its dimensions match the values that you specified for at least one of
690 C<MaxWidth> and C<MaxHeight> without exceeding either value. If you
691 specify this option, Elastic Transcoder does not scale the video up.
692  
693 =item *
694  
695 C<ShrinkToFill>: Elastic Transcoder scales the output video down so
696 that its dimensions match the values that you specified for at least
697 one of C<MaxWidth> and C<MaxHeight> without dropping below either
698 value. If you specify this option, Elastic Transcoder does not scale
699 the video up.
700  
701 =back
702  
703  
704  
705 =head2 Watermarks => ArrayRef[L<Paws::ElasticTranscoder::PresetWatermark>]
706  
707 Settings for the size, location, and opacity of graphics that you want
708 Elastic Transcoder to overlay over videos that are transcoded using
709 this preset. You can specify settings for up to four watermarks.
710 Watermarks appear in the specified size and location, and with the
711 specified opacity for the duration of the transcoded video.
712  
713 Watermarks can be in .png or .jpg format. If you want to display a
714 watermark that is not rectangular, use the .png format, which supports
715 transparency.
716  
717 When you create a job that uses this preset, you specify the .png or
718 .jpg graphics that you want Elastic Transcoder to include in the
719 transcoded videos. You can specify fewer graphics in the job than you
720 specify watermark settings in the preset, which allows you to use the
721 same preset for up to four watermarks that have different dimensions.
722  
723  
724  
725 =head1 SEE ALSO
726  
727 This class forms part of L<Paws>, describing an object used in L<Paws::ElasticTranscoder>
728  
729 =head1 BUGS and CONTRIBUTIONS
730  
731 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
732  
733 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
734  
735 =cut
736