{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ElasticTranscoder.Types.VideoParameters
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ElasticTranscoder.Types.VideoParameters where

import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types.PresetWatermark
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The @VideoParameters@ structure.
--
-- /See:/ 'newVideoParameters' smart constructor.
data VideoParameters = VideoParameters'
  { -- | Applicable only when the value of Video:Codec is one of @H.264@,
    -- @MPEG2@, or @VP8@.
    --
    -- 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.
    --
    -- For @Smooth@ outputs, the @FrameRate@ must have a constant ratio to the
    -- @KeyframesMaxDist@. This allows @Smooth@ playlists to switch between
    -- different quality levels while the file is being played.
    --
    -- For example, an input file can have a @FrameRate@ of 30 with a
    -- @KeyframesMaxDist@ of 90. The output file then needs to have a ratio of
    -- 1:3. Valid outputs would have @FrameRate@ of 30, 25, and 10, and
    -- @KeyframesMaxDist@ of 90, 75, and 30, respectively.
    --
    -- Alternately, this can be achieved by setting @FrameRate@ to auto and
    -- having the same values for @MaxFrameRate@ and @KeyframesMaxDist@.
    VideoParameters -> Maybe Text
keyframesMaxDist :: Prelude.Maybe Prelude.Text,
    -- | The frames per second for the video stream in the output file. Valid
    -- values include:
    --
    -- @auto@, @10@, @15@, @23.97@, @24@, @25@, @29.97@, @30@, @60@
    --
    -- If you specify @auto@, 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:
    --
    -- @Frame rate = maximum recommended decoding speed in luma samples\/second \/ (width in pixels * height in pixels)@
    --
    -- where:
    --
    -- -   /width in pixels/ and /height in pixels/ represent the Resolution of
    --     the output video.
    --
    -- -   /maximum recommended decoding speed in Luma samples\/second/ is less
    --     than or equal to the maximum value listed in the following table,
    --     based on the value that you specified for Level.
    --
    -- The maximum recommended decoding speed in Luma samples\/second for each
    -- level is described in the following list (/Level - Decoding speed/):
    --
    -- -   1 - 380160
    --
    -- -   1b - 380160
    --
    -- -   1.1 - 76800
    --
    -- -   1.2 - 1536000
    --
    -- -   1.3 - 3041280
    --
    -- -   2 - 3041280
    --
    -- -   2.1 - 5068800
    --
    -- -   2.2 - 5184000
    --
    -- -   3 - 10368000
    --
    -- -   3.1 - 27648000
    --
    -- -   3.2 - 55296000
    --
    -- -   4 - 62914560
    --
    -- -   4.1 - 62914560
    VideoParameters -> Maybe Text
frameRate :: Prelude.Maybe Prelude.Text,
    -- | Specify one of the following values to control scaling of the output
    -- video:
    --
    -- -   @Fit@: Elastic Transcoder scales the output video so it matches the
    --     value that you specified in either @MaxWidth@ or @MaxHeight@ without
    --     exceeding the other value.
    --
    -- -   @Fill@: Elastic Transcoder scales the output video so it matches the
    --     value that you specified in either @MaxWidth@ or @MaxHeight@ 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.
    --
    -- -   @Stretch@: Elastic Transcoder stretches the output video to match
    --     the values that you specified for @MaxWidth@ and @MaxHeight@. If the
    --     relative proportions of the input video and the output video are
    --     different, the output video will be distorted.
    --
    -- -   @Keep@: Elastic Transcoder does not scale the output video. If
    --     either dimension of the input video exceeds the values that you
    --     specified for @MaxWidth@ and @MaxHeight@, Elastic Transcoder crops
    --     the output video.
    --
    -- -   @ShrinkToFit@: Elastic Transcoder scales the output video down so
    --     that its dimensions match the values that you specified for at least
    --     one of @MaxWidth@ and @MaxHeight@ without exceeding either value. If
    --     you specify this option, Elastic Transcoder does not scale the video
    --     up.
    --
    -- -   @ShrinkToFill@: Elastic Transcoder scales the output video down so
    --     that its dimensions match the values that you specified for at least
    --     one of @MaxWidth@ and @MaxHeight@ without dropping below either
    --     value. If you specify this option, Elastic Transcoder does not scale
    --     the video up.
    VideoParameters -> Maybe Text
sizingPolicy :: Prelude.Maybe Prelude.Text,
    -- | If you specify @auto@ for @FrameRate@, 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: @10@, @15@, @23.97@,
    -- @24@, @25@, @29.97@, @30@, @60@.
    VideoParameters -> Maybe Text
maxFrameRate :: Prelude.Maybe Prelude.Text,
    -- | The maximum height of the output video in pixels. If you specify @auto@,
    -- Elastic Transcoder uses 1080 (Full HD) as the default value. If you
    -- specify a numeric value, enter an even integer between 96 and 3072.
    VideoParameters -> Maybe Text
maxHeight :: Prelude.Maybe Prelude.Text,
    -- | 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.
    --
    -- 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.
    --
    -- 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.
    VideoParameters -> Maybe [PresetWatermark]
watermarks :: Prelude.Maybe [PresetWatermark],
    -- | The value that Elastic Transcoder adds to the metadata in the output
    -- file.
    VideoParameters -> Maybe Text
displayAspectRatio :: Prelude.Maybe Prelude.Text,
    -- | To better control resolution and aspect ratio of output videos, we
    -- recommend that you use the values @MaxWidth@, @MaxHeight@,
    -- @SizingPolicy@, @PaddingPolicy@, and @DisplayAspectRatio@ instead of
    -- @Resolution@ and @AspectRatio@. The two groups of settings are mutually
    -- exclusive. Do not use them together.
    --
    -- The width and height of the video in the output file, in pixels. Valid
    -- values are @auto@ and /width/ x /height/:
    --
    -- -   @auto@: Elastic Transcoder attempts to preserve the width and height
    --     of the input file, subject to the following rules.
    --
    -- -   @ width x height @: The width and height of the output video in
    --     pixels.
    --
    -- Note the following about specifying the width and height:
    --
    -- -   The width must be an even integer between 128 and 4096, inclusive.
    --
    -- -   The height must be an even integer between 96 and 3072, inclusive.
    --
    -- -   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.
    --
    -- -   If you specify a resolution that is greater than the resolution of
    --     the input file, Elastic Transcoder rescales the output to the higher
    --     resolution.
    --
    -- -   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 (/List - Max width x height value/):
    --
    --     -   1 - 25344
    --
    --     -   1b - 25344
    --
    --     -   1.1 - 101376
    --
    --     -   1.2 - 101376
    --
    --     -   1.3 - 101376
    --
    --     -   2 - 101376
    --
    --     -   2.1 - 202752
    --
    --     -   2.2 - 404720
    --
    --     -   3 - 404720
    --
    --     -   3.1 - 921600
    --
    --     -   3.2 - 1310720
    --
    --     -   4 - 2097152
    --
    --     -   4.1 - 2097152
    VideoParameters -> Maybe Text
resolution :: Prelude.Maybe Prelude.Text,
    -- | The video codec for the output file. Valid values include @gif@,
    -- @H.264@, @mpeg2@, @vp8@, and @vp9@. You can only specify @vp8@ and @vp9@
    -- when the container type is @webm@, @gif@ when the container type is
    -- @gif@, and @mpeg2@ when the container type is @mpg@.
    VideoParameters -> Maybe Text
codec :: Prelude.Maybe Prelude.Text,
    -- | To better control resolution and aspect ratio of output videos, we
    -- recommend that you use the values @MaxWidth@, @MaxHeight@,
    -- @SizingPolicy@, @PaddingPolicy@, and @DisplayAspectRatio@ instead of
    -- @Resolution@ and @AspectRatio@. The two groups of settings are mutually
    -- exclusive. Do not use them together.
    --
    -- The display aspect ratio of the video in the output file. Valid values
    -- include:
    --
    -- @auto@, @1:1@, @4:3@, @3:2@, @16:9@
    --
    -- If you specify @auto@, Elastic Transcoder tries to preserve the aspect
    -- ratio of the input file.
    --
    -- 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.
    VideoParameters -> Maybe Text
aspectRatio :: Prelude.Maybe Prelude.Text,
    -- | When you set @PaddingPolicy@ to @Pad@, 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 @MaxWidth@ and @MaxHeight@.
    VideoParameters -> Maybe Text
paddingPolicy :: Prelude.Maybe Prelude.Text,
    -- | The maximum width of the output video in pixels. If you specify @auto@,
    -- Elastic Transcoder uses 1920 (Full HD) as the default value. If you
    -- specify a numeric value, enter an even integer between 128 and 4096.
    VideoParameters -> Maybe Text
maxWidth :: Prelude.Maybe Prelude.Text,
    -- | The bit rate of the video stream in the output file, in
    -- kilobits\/second. Valid values depend on the values of @Level@ and
    -- @Profile@. If you specify @auto@, Elastic Transcoder uses the detected
    -- bit rate of the input source. If you specify a value other than @auto@,
    -- we recommend that you specify a value less than or equal to the maximum
    -- H.264-compliant value listed for your level and profile:
    --
    -- /Level - Maximum video bit rate in kilobits\/second (baseline and main
    -- Profile) : maximum video bit rate in kilobits\/second (high Profile)/
    --
    -- -   1 - 64 : 80
    --
    -- -   1b - 128 : 160
    --
    -- -   1.1 - 192 : 240
    --
    -- -   1.2 - 384 : 480
    --
    -- -   1.3 - 768 : 960
    --
    -- -   2 - 2000 : 2500
    --
    -- -   3 - 10000 : 12500
    --
    -- -   3.1 - 14000 : 17500
    --
    -- -   3.2 - 20000 : 25000
    --
    -- -   4 - 20000 : 25000
    --
    -- -   4.1 - 50000 : 62500
    VideoParameters -> Maybe Text
bitRate :: Prelude.Maybe Prelude.Text,
    -- | Applicable only when the value of Video:Codec is one of @H.264@,
    -- @MPEG2@, or @VP8@.
    --
    -- Whether to use a fixed value for @FixedGOP@. Valid values are @true@ and
    -- @false@:
    --
    -- -   @true@: Elastic Transcoder uses the value of @KeyframesMaxDist@ for
    --     the distance between key frames (the number of frames in a group of
    --     pictures, or GOP).
    --
    -- -   @false@: The distance between key frames can vary.
    --
    -- @FixedGOP@ must be set to @true@ for @fmp4@ containers.
    VideoParameters -> Maybe Text
fixedGOP :: Prelude.Maybe Prelude.Text,
    -- | __Profile (H.264\/VP8\/VP9 Only)__
    --
    -- The H.264 profile that you want to use for the output file. Elastic
    -- Transcoder supports the following profiles:
    --
    -- -   @baseline@: The profile most commonly used for videoconferencing and
    --     for mobile applications.
    --
    -- -   @main@: The profile used for standard-definition digital TV
    --     broadcasts.
    --
    -- -   @high@: The profile used for high-definition digital TV broadcasts
    --     and for Blu-ray discs.
    --
    -- __Level (H.264 Only)__
    --
    -- The H.264 level that you want to use for the output file. Elastic
    -- Transcoder supports the following levels:
    --
    -- @1@, @1b@, @1.1@, @1.2@, @1.3@, @2@, @2.1@, @2.2@, @3@, @3.1@, @3.2@,
    -- @4@, @4.1@
    --
    -- __MaxReferenceFrames (H.264 Only)__
    --
    -- 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:
    --
    -- @Min(Floor(Maximum decoded picture buffer in macroblocks * 256 \/ (Width in pixels * Height in pixels)), 16)@
    --
    -- where /Width in pixels/ and /Height in pixels/ represent either MaxWidth
    -- and MaxHeight, or Resolution. /Maximum decoded picture buffer in
    -- macroblocks/ depends on the value of the @Level@ object. See the list
    -- below. (A macroblock is a block of pixels measuring 16x16.)
    --
    -- -   1 - 396
    --
    -- -   1b - 396
    --
    -- -   1.1 - 900
    --
    -- -   1.2 - 2376
    --
    -- -   1.3 - 2376
    --
    -- -   2 - 2376
    --
    -- -   2.1 - 4752
    --
    -- -   2.2 - 8100
    --
    -- -   3 - 8100
    --
    -- -   3.1 - 18000
    --
    -- -   3.2 - 20480
    --
    -- -   4 - 32768
    --
    -- -   4.1 - 32768
    --
    -- __MaxBitRate (Optional, H.264\/MPEG2\/VP8\/VP9 only)__
    --
    -- The maximum number of bits per second in a video buffer; the size of the
    -- buffer is specified by @BufferSize@. 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.
    --
    -- __BufferSize (Optional, H.264\/MPEG2\/VP8\/VP9 only)__
    --
    -- 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 @MaxBitRate@
    -- and omit @BufferSize@, Elastic Transcoder sets @BufferSize@ to 10 times
    -- the value of @MaxBitRate@.
    --
    -- __InterlacedMode (Optional, H.264\/MPEG2 Only)__
    --
    -- The interlace mode for the output video.
    --
    -- 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.
    --
    -- Valid values include @Progressive@ (no interlacing, top to bottom),
    -- @TopFirst@ (top field first), @BottomFirst@ (bottom field first), and
    -- @Auto@.
    --
    -- If @InterlaceMode@ is not specified, Elastic Transcoder uses
    -- @Progressive@ for the output. If @Auto@ is specified, Elastic Transcoder
    -- interlaces the output.
    --
    -- __ColorSpaceConversionMode (Optional, H.264\/MPEG2 Only)__
    --
    -- 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. @Bt.601@ is the standard for
    -- standard definition video, while @Bt.709@ is the standard for high
    -- definition video.
    --
    -- Valid values include @None@, @Bt709toBt601@, @Bt601toBt709@, and @Auto@.
    --
    -- If you chose @Auto@ for @ColorSpaceConversionMode@ and your output is
    -- interlaced, your frame rate is one of @23.97@, @24@, @25@, @29.97@,
    -- @50@, or @60@, your @SegmentDuration@ is null, and you are using one of
    -- the resolution changes from the list below, Elastic Transcoder applies
    -- the following color space conversions:
    --
    -- -   /Standard to HD, 720x480 to 1920x1080/ - Elastic Transcoder applies
    --     @Bt601ToBt709@
    --
    -- -   /Standard to HD, 720x576 to 1920x1080/ - Elastic Transcoder applies
    --     @Bt601ToBt709@
    --
    -- -   /HD to Standard, 1920x1080 to 720x480/ - Elastic Transcoder applies
    --     @Bt709ToBt601@
    --
    -- -   /HD to Standard, 1920x1080 to 720x576/ - Elastic Transcoder applies
    --     @Bt709ToBt601@
    --
    -- Elastic Transcoder may change the behavior of the
    -- @ColorspaceConversionMode@ @Auto@ mode in the future. All outputs in a
    -- playlist must use the same @ColorSpaceConversionMode@.
    --
    -- If you do not specify a @ColorSpaceConversionMode@, Elastic Transcoder
    -- does not change the color space of a file. If you are unsure what
    -- @ColorSpaceConversionMode@ was applied to your output file, you can
    -- check the @AppliedColorSpaceConversion@ parameter included in your job
    -- response. If your job does not have an @AppliedColorSpaceConversion@ in
    -- its response, no @ColorSpaceConversionMode@ was applied.
    --
    -- __ChromaSubsampling__
    --
    -- The sampling pattern for the chroma (color) channels of the output
    -- video. Valid values include @yuv420p@ and @yuv422p@.
    --
    -- @yuv420p@ samples the chroma information of every other horizontal and
    -- every other vertical line, @yuv422p@ samples the color information of
    -- every horizontal line and every other vertical line.
    --
    -- __LoopCount (Gif Only)__
    --
    -- The number of times you want the output gif to loop. Valid values
    -- include @Infinite@ and integers between @0@ and @100@, inclusive.
    VideoParameters -> Maybe (HashMap Text Text)
codecOptions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (VideoParameters -> VideoParameters -> Bool
(VideoParameters -> VideoParameters -> Bool)
-> (VideoParameters -> VideoParameters -> Bool)
-> Eq VideoParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoParameters -> VideoParameters -> Bool
$c/= :: VideoParameters -> VideoParameters -> Bool
== :: VideoParameters -> VideoParameters -> Bool
$c== :: VideoParameters -> VideoParameters -> Bool
Prelude.Eq, ReadPrec [VideoParameters]
ReadPrec VideoParameters
Int -> ReadS VideoParameters
ReadS [VideoParameters]
(Int -> ReadS VideoParameters)
-> ReadS [VideoParameters]
-> ReadPrec VideoParameters
-> ReadPrec [VideoParameters]
-> Read VideoParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoParameters]
$creadListPrec :: ReadPrec [VideoParameters]
readPrec :: ReadPrec VideoParameters
$creadPrec :: ReadPrec VideoParameters
readList :: ReadS [VideoParameters]
$creadList :: ReadS [VideoParameters]
readsPrec :: Int -> ReadS VideoParameters
$creadsPrec :: Int -> ReadS VideoParameters
Prelude.Read, Int -> VideoParameters -> ShowS
[VideoParameters] -> ShowS
VideoParameters -> String
(Int -> VideoParameters -> ShowS)
-> (VideoParameters -> String)
-> ([VideoParameters] -> ShowS)
-> Show VideoParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoParameters] -> ShowS
$cshowList :: [VideoParameters] -> ShowS
show :: VideoParameters -> String
$cshow :: VideoParameters -> String
showsPrec :: Int -> VideoParameters -> ShowS
$cshowsPrec :: Int -> VideoParameters -> ShowS
Prelude.Show, (forall x. VideoParameters -> Rep VideoParameters x)
-> (forall x. Rep VideoParameters x -> VideoParameters)
-> Generic VideoParameters
forall x. Rep VideoParameters x -> VideoParameters
forall x. VideoParameters -> Rep VideoParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoParameters x -> VideoParameters
$cfrom :: forall x. VideoParameters -> Rep VideoParameters x
Prelude.Generic)

-- |
-- Create a value of 'VideoParameters' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'keyframesMaxDist', 'videoParameters_keyframesMaxDist' - Applicable only when the value of Video:Codec is one of @H.264@,
-- @MPEG2@, or @VP8@.
--
-- 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.
--
-- For @Smooth@ outputs, the @FrameRate@ must have a constant ratio to the
-- @KeyframesMaxDist@. This allows @Smooth@ playlists to switch between
-- different quality levels while the file is being played.
--
-- For example, an input file can have a @FrameRate@ of 30 with a
-- @KeyframesMaxDist@ of 90. The output file then needs to have a ratio of
-- 1:3. Valid outputs would have @FrameRate@ of 30, 25, and 10, and
-- @KeyframesMaxDist@ of 90, 75, and 30, respectively.
--
-- Alternately, this can be achieved by setting @FrameRate@ to auto and
-- having the same values for @MaxFrameRate@ and @KeyframesMaxDist@.
--
-- 'frameRate', 'videoParameters_frameRate' - The frames per second for the video stream in the output file. Valid
-- values include:
--
-- @auto@, @10@, @15@, @23.97@, @24@, @25@, @29.97@, @30@, @60@
--
-- If you specify @auto@, 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:
--
-- @Frame rate = maximum recommended decoding speed in luma samples\/second \/ (width in pixels * height in pixels)@
--
-- where:
--
-- -   /width in pixels/ and /height in pixels/ represent the Resolution of
--     the output video.
--
-- -   /maximum recommended decoding speed in Luma samples\/second/ is less
--     than or equal to the maximum value listed in the following table,
--     based on the value that you specified for Level.
--
-- The maximum recommended decoding speed in Luma samples\/second for each
-- level is described in the following list (/Level - Decoding speed/):
--
-- -   1 - 380160
--
-- -   1b - 380160
--
-- -   1.1 - 76800
--
-- -   1.2 - 1536000
--
-- -   1.3 - 3041280
--
-- -   2 - 3041280
--
-- -   2.1 - 5068800
--
-- -   2.2 - 5184000
--
-- -   3 - 10368000
--
-- -   3.1 - 27648000
--
-- -   3.2 - 55296000
--
-- -   4 - 62914560
--
-- -   4.1 - 62914560
--
-- 'sizingPolicy', 'videoParameters_sizingPolicy' - Specify one of the following values to control scaling of the output
-- video:
--
-- -   @Fit@: Elastic Transcoder scales the output video so it matches the
--     value that you specified in either @MaxWidth@ or @MaxHeight@ without
--     exceeding the other value.
--
-- -   @Fill@: Elastic Transcoder scales the output video so it matches the
--     value that you specified in either @MaxWidth@ or @MaxHeight@ 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.
--
-- -   @Stretch@: Elastic Transcoder stretches the output video to match
--     the values that you specified for @MaxWidth@ and @MaxHeight@. If the
--     relative proportions of the input video and the output video are
--     different, the output video will be distorted.
--
-- -   @Keep@: Elastic Transcoder does not scale the output video. If
--     either dimension of the input video exceeds the values that you
--     specified for @MaxWidth@ and @MaxHeight@, Elastic Transcoder crops
--     the output video.
--
-- -   @ShrinkToFit@: Elastic Transcoder scales the output video down so
--     that its dimensions match the values that you specified for at least
--     one of @MaxWidth@ and @MaxHeight@ without exceeding either value. If
--     you specify this option, Elastic Transcoder does not scale the video
--     up.
--
-- -   @ShrinkToFill@: Elastic Transcoder scales the output video down so
--     that its dimensions match the values that you specified for at least
--     one of @MaxWidth@ and @MaxHeight@ without dropping below either
--     value. If you specify this option, Elastic Transcoder does not scale
--     the video up.
--
-- 'maxFrameRate', 'videoParameters_maxFrameRate' - If you specify @auto@ for @FrameRate@, 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: @10@, @15@, @23.97@,
-- @24@, @25@, @29.97@, @30@, @60@.
--
-- 'maxHeight', 'videoParameters_maxHeight' - The maximum height of the output video in pixels. If you specify @auto@,
-- Elastic Transcoder uses 1080 (Full HD) as the default value. If you
-- specify a numeric value, enter an even integer between 96 and 3072.
--
-- 'watermarks', 'videoParameters_watermarks' - 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.
--
-- 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.
--
-- 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.
--
-- 'displayAspectRatio', 'videoParameters_displayAspectRatio' - The value that Elastic Transcoder adds to the metadata in the output
-- file.
--
-- 'resolution', 'videoParameters_resolution' - To better control resolution and aspect ratio of output videos, we
-- recommend that you use the values @MaxWidth@, @MaxHeight@,
-- @SizingPolicy@, @PaddingPolicy@, and @DisplayAspectRatio@ instead of
-- @Resolution@ and @AspectRatio@. The two groups of settings are mutually
-- exclusive. Do not use them together.
--
-- The width and height of the video in the output file, in pixels. Valid
-- values are @auto@ and /width/ x /height/:
--
-- -   @auto@: Elastic Transcoder attempts to preserve the width and height
--     of the input file, subject to the following rules.
--
-- -   @ width x height @: The width and height of the output video in
--     pixels.
--
-- Note the following about specifying the width and height:
--
-- -   The width must be an even integer between 128 and 4096, inclusive.
--
-- -   The height must be an even integer between 96 and 3072, inclusive.
--
-- -   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.
--
-- -   If you specify a resolution that is greater than the resolution of
--     the input file, Elastic Transcoder rescales the output to the higher
--     resolution.
--
-- -   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 (/List - Max width x height value/):
--
--     -   1 - 25344
--
--     -   1b - 25344
--
--     -   1.1 - 101376
--
--     -   1.2 - 101376
--
--     -   1.3 - 101376
--
--     -   2 - 101376
--
--     -   2.1 - 202752
--
--     -   2.2 - 404720
--
--     -   3 - 404720
--
--     -   3.1 - 921600
--
--     -   3.2 - 1310720
--
--     -   4 - 2097152
--
--     -   4.1 - 2097152
--
-- 'codec', 'videoParameters_codec' - The video codec for the output file. Valid values include @gif@,
-- @H.264@, @mpeg2@, @vp8@, and @vp9@. You can only specify @vp8@ and @vp9@
-- when the container type is @webm@, @gif@ when the container type is
-- @gif@, and @mpeg2@ when the container type is @mpg@.
--
-- 'aspectRatio', 'videoParameters_aspectRatio' - To better control resolution and aspect ratio of output videos, we
-- recommend that you use the values @MaxWidth@, @MaxHeight@,
-- @SizingPolicy@, @PaddingPolicy@, and @DisplayAspectRatio@ instead of
-- @Resolution@ and @AspectRatio@. The two groups of settings are mutually
-- exclusive. Do not use them together.
--
-- The display aspect ratio of the video in the output file. Valid values
-- include:
--
-- @auto@, @1:1@, @4:3@, @3:2@, @16:9@
--
-- If you specify @auto@, Elastic Transcoder tries to preserve the aspect
-- ratio of the input file.
--
-- 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.
--
-- 'paddingPolicy', 'videoParameters_paddingPolicy' - When you set @PaddingPolicy@ to @Pad@, 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 @MaxWidth@ and @MaxHeight@.
--
-- 'maxWidth', 'videoParameters_maxWidth' - The maximum width of the output video in pixels. If you specify @auto@,
-- Elastic Transcoder uses 1920 (Full HD) as the default value. If you
-- specify a numeric value, enter an even integer between 128 and 4096.
--
-- 'bitRate', 'videoParameters_bitRate' - The bit rate of the video stream in the output file, in
-- kilobits\/second. Valid values depend on the values of @Level@ and
-- @Profile@. If you specify @auto@, Elastic Transcoder uses the detected
-- bit rate of the input source. If you specify a value other than @auto@,
-- we recommend that you specify a value less than or equal to the maximum
-- H.264-compliant value listed for your level and profile:
--
-- /Level - Maximum video bit rate in kilobits\/second (baseline and main
-- Profile) : maximum video bit rate in kilobits\/second (high Profile)/
--
-- -   1 - 64 : 80
--
-- -   1b - 128 : 160
--
-- -   1.1 - 192 : 240
--
-- -   1.2 - 384 : 480
--
-- -   1.3 - 768 : 960
--
-- -   2 - 2000 : 2500
--
-- -   3 - 10000 : 12500
--
-- -   3.1 - 14000 : 17500
--
-- -   3.2 - 20000 : 25000
--
-- -   4 - 20000 : 25000
--
-- -   4.1 - 50000 : 62500
--
-- 'fixedGOP', 'videoParameters_fixedGOP' - Applicable only when the value of Video:Codec is one of @H.264@,
-- @MPEG2@, or @VP8@.
--
-- Whether to use a fixed value for @FixedGOP@. Valid values are @true@ and
-- @false@:
--
-- -   @true@: Elastic Transcoder uses the value of @KeyframesMaxDist@ for
--     the distance between key frames (the number of frames in a group of
--     pictures, or GOP).
--
-- -   @false@: The distance between key frames can vary.
--
-- @FixedGOP@ must be set to @true@ for @fmp4@ containers.
--
-- 'codecOptions', 'videoParameters_codecOptions' - __Profile (H.264\/VP8\/VP9 Only)__
--
-- The H.264 profile that you want to use for the output file. Elastic
-- Transcoder supports the following profiles:
--
-- -   @baseline@: The profile most commonly used for videoconferencing and
--     for mobile applications.
--
-- -   @main@: The profile used for standard-definition digital TV
--     broadcasts.
--
-- -   @high@: The profile used for high-definition digital TV broadcasts
--     and for Blu-ray discs.
--
-- __Level (H.264 Only)__
--
-- The H.264 level that you want to use for the output file. Elastic
-- Transcoder supports the following levels:
--
-- @1@, @1b@, @1.1@, @1.2@, @1.3@, @2@, @2.1@, @2.2@, @3@, @3.1@, @3.2@,
-- @4@, @4.1@
--
-- __MaxReferenceFrames (H.264 Only)__
--
-- 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:
--
-- @Min(Floor(Maximum decoded picture buffer in macroblocks * 256 \/ (Width in pixels * Height in pixels)), 16)@
--
-- where /Width in pixels/ and /Height in pixels/ represent either MaxWidth
-- and MaxHeight, or Resolution. /Maximum decoded picture buffer in
-- macroblocks/ depends on the value of the @Level@ object. See the list
-- below. (A macroblock is a block of pixels measuring 16x16.)
--
-- -   1 - 396
--
-- -   1b - 396
--
-- -   1.1 - 900
--
-- -   1.2 - 2376
--
-- -   1.3 - 2376
--
-- -   2 - 2376
--
-- -   2.1 - 4752
--
-- -   2.2 - 8100
--
-- -   3 - 8100
--
-- -   3.1 - 18000
--
-- -   3.2 - 20480
--
-- -   4 - 32768
--
-- -   4.1 - 32768
--
-- __MaxBitRate (Optional, H.264\/MPEG2\/VP8\/VP9 only)__
--
-- The maximum number of bits per second in a video buffer; the size of the
-- buffer is specified by @BufferSize@. 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.
--
-- __BufferSize (Optional, H.264\/MPEG2\/VP8\/VP9 only)__
--
-- 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 @MaxBitRate@
-- and omit @BufferSize@, Elastic Transcoder sets @BufferSize@ to 10 times
-- the value of @MaxBitRate@.
--
-- __InterlacedMode (Optional, H.264\/MPEG2 Only)__
--
-- The interlace mode for the output video.
--
-- 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.
--
-- Valid values include @Progressive@ (no interlacing, top to bottom),
-- @TopFirst@ (top field first), @BottomFirst@ (bottom field first), and
-- @Auto@.
--
-- If @InterlaceMode@ is not specified, Elastic Transcoder uses
-- @Progressive@ for the output. If @Auto@ is specified, Elastic Transcoder
-- interlaces the output.
--
-- __ColorSpaceConversionMode (Optional, H.264\/MPEG2 Only)__
--
-- 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. @Bt.601@ is the standard for
-- standard definition video, while @Bt.709@ is the standard for high
-- definition video.
--
-- Valid values include @None@, @Bt709toBt601@, @Bt601toBt709@, and @Auto@.
--
-- If you chose @Auto@ for @ColorSpaceConversionMode@ and your output is
-- interlaced, your frame rate is one of @23.97@, @24@, @25@, @29.97@,
-- @50@, or @60@, your @SegmentDuration@ is null, and you are using one of
-- the resolution changes from the list below, Elastic Transcoder applies
-- the following color space conversions:
--
-- -   /Standard to HD, 720x480 to 1920x1080/ - Elastic Transcoder applies
--     @Bt601ToBt709@
--
-- -   /Standard to HD, 720x576 to 1920x1080/ - Elastic Transcoder applies
--     @Bt601ToBt709@
--
-- -   /HD to Standard, 1920x1080 to 720x480/ - Elastic Transcoder applies
--     @Bt709ToBt601@
--
-- -   /HD to Standard, 1920x1080 to 720x576/ - Elastic Transcoder applies
--     @Bt709ToBt601@
--
-- Elastic Transcoder may change the behavior of the
-- @ColorspaceConversionMode@ @Auto@ mode in the future. All outputs in a
-- playlist must use the same @ColorSpaceConversionMode@.
--
-- If you do not specify a @ColorSpaceConversionMode@, Elastic Transcoder
-- does not change the color space of a file. If you are unsure what
-- @ColorSpaceConversionMode@ was applied to your output file, you can
-- check the @AppliedColorSpaceConversion@ parameter included in your job
-- response. If your job does not have an @AppliedColorSpaceConversion@ in
-- its response, no @ColorSpaceConversionMode@ was applied.
--
-- __ChromaSubsampling__
--
-- The sampling pattern for the chroma (color) channels of the output
-- video. Valid values include @yuv420p@ and @yuv422p@.
--
-- @yuv420p@ samples the chroma information of every other horizontal and
-- every other vertical line, @yuv422p@ samples the color information of
-- every horizontal line and every other vertical line.
--
-- __LoopCount (Gif Only)__
--
-- The number of times you want the output gif to loop. Valid values
-- include @Infinite@ and integers between @0@ and @100@, inclusive.
newVideoParameters ::
  VideoParameters
newVideoParameters :: VideoParameters
newVideoParameters =
  VideoParameters' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [PresetWatermark]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VideoParameters
VideoParameters'
    { $sel:keyframesMaxDist:VideoParameters' :: Maybe Text
keyframesMaxDist =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:frameRate:VideoParameters' :: Maybe Text
frameRate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sizingPolicy:VideoParameters' :: Maybe Text
sizingPolicy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxFrameRate:VideoParameters' :: Maybe Text
maxFrameRate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxHeight:VideoParameters' :: Maybe Text
maxHeight = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:watermarks:VideoParameters' :: Maybe [PresetWatermark]
watermarks = Maybe [PresetWatermark]
forall a. Maybe a
Prelude.Nothing,
      $sel:displayAspectRatio:VideoParameters' :: Maybe Text
displayAspectRatio = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resolution:VideoParameters' :: Maybe Text
resolution = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:codec:VideoParameters' :: Maybe Text
codec = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:aspectRatio:VideoParameters' :: Maybe Text
aspectRatio = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:paddingPolicy:VideoParameters' :: Maybe Text
paddingPolicy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxWidth:VideoParameters' :: Maybe Text
maxWidth = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bitRate:VideoParameters' :: Maybe Text
bitRate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fixedGOP:VideoParameters' :: Maybe Text
fixedGOP = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:codecOptions:VideoParameters' :: Maybe (HashMap Text Text)
codecOptions = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | Applicable only when the value of Video:Codec is one of @H.264@,
-- @MPEG2@, or @VP8@.
--
-- 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.
--
-- For @Smooth@ outputs, the @FrameRate@ must have a constant ratio to the
-- @KeyframesMaxDist@. This allows @Smooth@ playlists to switch between
-- different quality levels while the file is being played.
--
-- For example, an input file can have a @FrameRate@ of 30 with a
-- @KeyframesMaxDist@ of 90. The output file then needs to have a ratio of
-- 1:3. Valid outputs would have @FrameRate@ of 30, 25, and 10, and
-- @KeyframesMaxDist@ of 90, 75, and 30, respectively.
--
-- Alternately, this can be achieved by setting @FrameRate@ to auto and
-- having the same values for @MaxFrameRate@ and @KeyframesMaxDist@.
videoParameters_keyframesMaxDist :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_keyframesMaxDist :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_keyframesMaxDist = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
keyframesMaxDist :: Maybe Text
$sel:keyframesMaxDist:VideoParameters' :: VideoParameters -> Maybe Text
keyframesMaxDist} -> Maybe Text
keyframesMaxDist) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:keyframesMaxDist:VideoParameters' :: Maybe Text
keyframesMaxDist = Maybe Text
a} :: VideoParameters)

-- | The frames per second for the video stream in the output file. Valid
-- values include:
--
-- @auto@, @10@, @15@, @23.97@, @24@, @25@, @29.97@, @30@, @60@
--
-- If you specify @auto@, 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:
--
-- @Frame rate = maximum recommended decoding speed in luma samples\/second \/ (width in pixels * height in pixels)@
--
-- where:
--
-- -   /width in pixels/ and /height in pixels/ represent the Resolution of
--     the output video.
--
-- -   /maximum recommended decoding speed in Luma samples\/second/ is less
--     than or equal to the maximum value listed in the following table,
--     based on the value that you specified for Level.
--
-- The maximum recommended decoding speed in Luma samples\/second for each
-- level is described in the following list (/Level - Decoding speed/):
--
-- -   1 - 380160
--
-- -   1b - 380160
--
-- -   1.1 - 76800
--
-- -   1.2 - 1536000
--
-- -   1.3 - 3041280
--
-- -   2 - 3041280
--
-- -   2.1 - 5068800
--
-- -   2.2 - 5184000
--
-- -   3 - 10368000
--
-- -   3.1 - 27648000
--
-- -   3.2 - 55296000
--
-- -   4 - 62914560
--
-- -   4.1 - 62914560
videoParameters_frameRate :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_frameRate :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_frameRate = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
frameRate :: Maybe Text
$sel:frameRate:VideoParameters' :: VideoParameters -> Maybe Text
frameRate} -> Maybe Text
frameRate) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:frameRate:VideoParameters' :: Maybe Text
frameRate = Maybe Text
a} :: VideoParameters)

-- | Specify one of the following values to control scaling of the output
-- video:
--
-- -   @Fit@: Elastic Transcoder scales the output video so it matches the
--     value that you specified in either @MaxWidth@ or @MaxHeight@ without
--     exceeding the other value.
--
-- -   @Fill@: Elastic Transcoder scales the output video so it matches the
--     value that you specified in either @MaxWidth@ or @MaxHeight@ 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.
--
-- -   @Stretch@: Elastic Transcoder stretches the output video to match
--     the values that you specified for @MaxWidth@ and @MaxHeight@. If the
--     relative proportions of the input video and the output video are
--     different, the output video will be distorted.
--
-- -   @Keep@: Elastic Transcoder does not scale the output video. If
--     either dimension of the input video exceeds the values that you
--     specified for @MaxWidth@ and @MaxHeight@, Elastic Transcoder crops
--     the output video.
--
-- -   @ShrinkToFit@: Elastic Transcoder scales the output video down so
--     that its dimensions match the values that you specified for at least
--     one of @MaxWidth@ and @MaxHeight@ without exceeding either value. If
--     you specify this option, Elastic Transcoder does not scale the video
--     up.
--
-- -   @ShrinkToFill@: Elastic Transcoder scales the output video down so
--     that its dimensions match the values that you specified for at least
--     one of @MaxWidth@ and @MaxHeight@ without dropping below either
--     value. If you specify this option, Elastic Transcoder does not scale
--     the video up.
videoParameters_sizingPolicy :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_sizingPolicy :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_sizingPolicy = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
sizingPolicy :: Maybe Text
$sel:sizingPolicy:VideoParameters' :: VideoParameters -> Maybe Text
sizingPolicy} -> Maybe Text
sizingPolicy) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:sizingPolicy:VideoParameters' :: Maybe Text
sizingPolicy = Maybe Text
a} :: VideoParameters)

-- | If you specify @auto@ for @FrameRate@, 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: @10@, @15@, @23.97@,
-- @24@, @25@, @29.97@, @30@, @60@.
videoParameters_maxFrameRate :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_maxFrameRate :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_maxFrameRate = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
maxFrameRate :: Maybe Text
$sel:maxFrameRate:VideoParameters' :: VideoParameters -> Maybe Text
maxFrameRate} -> Maybe Text
maxFrameRate) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:maxFrameRate:VideoParameters' :: Maybe Text
maxFrameRate = Maybe Text
a} :: VideoParameters)

-- | The maximum height of the output video in pixels. If you specify @auto@,
-- Elastic Transcoder uses 1080 (Full HD) as the default value. If you
-- specify a numeric value, enter an even integer between 96 and 3072.
videoParameters_maxHeight :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_maxHeight :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_maxHeight = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
maxHeight :: Maybe Text
$sel:maxHeight:VideoParameters' :: VideoParameters -> Maybe Text
maxHeight} -> Maybe Text
maxHeight) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:maxHeight:VideoParameters' :: Maybe Text
maxHeight = Maybe Text
a} :: VideoParameters)

-- | 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.
--
-- 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.
--
-- 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.
videoParameters_watermarks :: Lens.Lens' VideoParameters (Prelude.Maybe [PresetWatermark])
videoParameters_watermarks :: (Maybe [PresetWatermark] -> f (Maybe [PresetWatermark]))
-> VideoParameters -> f VideoParameters
videoParameters_watermarks = (VideoParameters -> Maybe [PresetWatermark])
-> (VideoParameters -> Maybe [PresetWatermark] -> VideoParameters)
-> Lens
     VideoParameters
     VideoParameters
     (Maybe [PresetWatermark])
     (Maybe [PresetWatermark])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe [PresetWatermark]
watermarks :: Maybe [PresetWatermark]
$sel:watermarks:VideoParameters' :: VideoParameters -> Maybe [PresetWatermark]
watermarks} -> Maybe [PresetWatermark]
watermarks) (\s :: VideoParameters
s@VideoParameters' {} Maybe [PresetWatermark]
a -> VideoParameters
s {$sel:watermarks:VideoParameters' :: Maybe [PresetWatermark]
watermarks = Maybe [PresetWatermark]
a} :: VideoParameters) ((Maybe [PresetWatermark] -> f (Maybe [PresetWatermark]))
 -> VideoParameters -> f VideoParameters)
-> ((Maybe [PresetWatermark] -> f (Maybe [PresetWatermark]))
    -> Maybe [PresetWatermark] -> f (Maybe [PresetWatermark]))
-> (Maybe [PresetWatermark] -> f (Maybe [PresetWatermark]))
-> VideoParameters
-> f VideoParameters
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PresetWatermark]
  [PresetWatermark]
  [PresetWatermark]
  [PresetWatermark]
-> Iso
     (Maybe [PresetWatermark])
     (Maybe [PresetWatermark])
     (Maybe [PresetWatermark])
     (Maybe [PresetWatermark])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [PresetWatermark]
  [PresetWatermark]
  [PresetWatermark]
  [PresetWatermark]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The value that Elastic Transcoder adds to the metadata in the output
-- file.
videoParameters_displayAspectRatio :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_displayAspectRatio :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_displayAspectRatio = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
displayAspectRatio :: Maybe Text
$sel:displayAspectRatio:VideoParameters' :: VideoParameters -> Maybe Text
displayAspectRatio} -> Maybe Text
displayAspectRatio) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:displayAspectRatio:VideoParameters' :: Maybe Text
displayAspectRatio = Maybe Text
a} :: VideoParameters)

-- | To better control resolution and aspect ratio of output videos, we
-- recommend that you use the values @MaxWidth@, @MaxHeight@,
-- @SizingPolicy@, @PaddingPolicy@, and @DisplayAspectRatio@ instead of
-- @Resolution@ and @AspectRatio@. The two groups of settings are mutually
-- exclusive. Do not use them together.
--
-- The width and height of the video in the output file, in pixels. Valid
-- values are @auto@ and /width/ x /height/:
--
-- -   @auto@: Elastic Transcoder attempts to preserve the width and height
--     of the input file, subject to the following rules.
--
-- -   @ width x height @: The width and height of the output video in
--     pixels.
--
-- Note the following about specifying the width and height:
--
-- -   The width must be an even integer between 128 and 4096, inclusive.
--
-- -   The height must be an even integer between 96 and 3072, inclusive.
--
-- -   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.
--
-- -   If you specify a resolution that is greater than the resolution of
--     the input file, Elastic Transcoder rescales the output to the higher
--     resolution.
--
-- -   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 (/List - Max width x height value/):
--
--     -   1 - 25344
--
--     -   1b - 25344
--
--     -   1.1 - 101376
--
--     -   1.2 - 101376
--
--     -   1.3 - 101376
--
--     -   2 - 101376
--
--     -   2.1 - 202752
--
--     -   2.2 - 404720
--
--     -   3 - 404720
--
--     -   3.1 - 921600
--
--     -   3.2 - 1310720
--
--     -   4 - 2097152
--
--     -   4.1 - 2097152
videoParameters_resolution :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_resolution :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_resolution = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
resolution :: Maybe Text
$sel:resolution:VideoParameters' :: VideoParameters -> Maybe Text
resolution} -> Maybe Text
resolution) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:resolution:VideoParameters' :: Maybe Text
resolution = Maybe Text
a} :: VideoParameters)

-- | The video codec for the output file. Valid values include @gif@,
-- @H.264@, @mpeg2@, @vp8@, and @vp9@. You can only specify @vp8@ and @vp9@
-- when the container type is @webm@, @gif@ when the container type is
-- @gif@, and @mpeg2@ when the container type is @mpg@.
videoParameters_codec :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_codec :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_codec = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
codec :: Maybe Text
$sel:codec:VideoParameters' :: VideoParameters -> Maybe Text
codec} -> Maybe Text
codec) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:codec:VideoParameters' :: Maybe Text
codec = Maybe Text
a} :: VideoParameters)

-- | To better control resolution and aspect ratio of output videos, we
-- recommend that you use the values @MaxWidth@, @MaxHeight@,
-- @SizingPolicy@, @PaddingPolicy@, and @DisplayAspectRatio@ instead of
-- @Resolution@ and @AspectRatio@. The two groups of settings are mutually
-- exclusive. Do not use them together.
--
-- The display aspect ratio of the video in the output file. Valid values
-- include:
--
-- @auto@, @1:1@, @4:3@, @3:2@, @16:9@
--
-- If you specify @auto@, Elastic Transcoder tries to preserve the aspect
-- ratio of the input file.
--
-- 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.
videoParameters_aspectRatio :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_aspectRatio :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_aspectRatio = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
aspectRatio :: Maybe Text
$sel:aspectRatio:VideoParameters' :: VideoParameters -> Maybe Text
aspectRatio} -> Maybe Text
aspectRatio) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:aspectRatio:VideoParameters' :: Maybe Text
aspectRatio = Maybe Text
a} :: VideoParameters)

-- | When you set @PaddingPolicy@ to @Pad@, 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 @MaxWidth@ and @MaxHeight@.
videoParameters_paddingPolicy :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_paddingPolicy :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_paddingPolicy = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
paddingPolicy :: Maybe Text
$sel:paddingPolicy:VideoParameters' :: VideoParameters -> Maybe Text
paddingPolicy} -> Maybe Text
paddingPolicy) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:paddingPolicy:VideoParameters' :: Maybe Text
paddingPolicy = Maybe Text
a} :: VideoParameters)

-- | The maximum width of the output video in pixels. If you specify @auto@,
-- Elastic Transcoder uses 1920 (Full HD) as the default value. If you
-- specify a numeric value, enter an even integer between 128 and 4096.
videoParameters_maxWidth :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_maxWidth :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_maxWidth = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
maxWidth :: Maybe Text
$sel:maxWidth:VideoParameters' :: VideoParameters -> Maybe Text
maxWidth} -> Maybe Text
maxWidth) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:maxWidth:VideoParameters' :: Maybe Text
maxWidth = Maybe Text
a} :: VideoParameters)

-- | The bit rate of the video stream in the output file, in
-- kilobits\/second. Valid values depend on the values of @Level@ and
-- @Profile@. If you specify @auto@, Elastic Transcoder uses the detected
-- bit rate of the input source. If you specify a value other than @auto@,
-- we recommend that you specify a value less than or equal to the maximum
-- H.264-compliant value listed for your level and profile:
--
-- /Level - Maximum video bit rate in kilobits\/second (baseline and main
-- Profile) : maximum video bit rate in kilobits\/second (high Profile)/
--
-- -   1 - 64 : 80
--
-- -   1b - 128 : 160
--
-- -   1.1 - 192 : 240
--
-- -   1.2 - 384 : 480
--
-- -   1.3 - 768 : 960
--
-- -   2 - 2000 : 2500
--
-- -   3 - 10000 : 12500
--
-- -   3.1 - 14000 : 17500
--
-- -   3.2 - 20000 : 25000
--
-- -   4 - 20000 : 25000
--
-- -   4.1 - 50000 : 62500
videoParameters_bitRate :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_bitRate :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_bitRate = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
bitRate :: Maybe Text
$sel:bitRate:VideoParameters' :: VideoParameters -> Maybe Text
bitRate} -> Maybe Text
bitRate) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:bitRate:VideoParameters' :: Maybe Text
bitRate = Maybe Text
a} :: VideoParameters)

-- | Applicable only when the value of Video:Codec is one of @H.264@,
-- @MPEG2@, or @VP8@.
--
-- Whether to use a fixed value for @FixedGOP@. Valid values are @true@ and
-- @false@:
--
-- -   @true@: Elastic Transcoder uses the value of @KeyframesMaxDist@ for
--     the distance between key frames (the number of frames in a group of
--     pictures, or GOP).
--
-- -   @false@: The distance between key frames can vary.
--
-- @FixedGOP@ must be set to @true@ for @fmp4@ containers.
videoParameters_fixedGOP :: Lens.Lens' VideoParameters (Prelude.Maybe Prelude.Text)
videoParameters_fixedGOP :: (Maybe Text -> f (Maybe Text))
-> VideoParameters -> f VideoParameters
videoParameters_fixedGOP = (VideoParameters -> Maybe Text)
-> (VideoParameters -> Maybe Text -> VideoParameters)
-> Lens VideoParameters VideoParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe Text
fixedGOP :: Maybe Text
$sel:fixedGOP:VideoParameters' :: VideoParameters -> Maybe Text
fixedGOP} -> Maybe Text
fixedGOP) (\s :: VideoParameters
s@VideoParameters' {} Maybe Text
a -> VideoParameters
s {$sel:fixedGOP:VideoParameters' :: Maybe Text
fixedGOP = Maybe Text
a} :: VideoParameters)

-- | __Profile (H.264\/VP8\/VP9 Only)__
--
-- The H.264 profile that you want to use for the output file. Elastic
-- Transcoder supports the following profiles:
--
-- -   @baseline@: The profile most commonly used for videoconferencing and
--     for mobile applications.
--
-- -   @main@: The profile used for standard-definition digital TV
--     broadcasts.
--
-- -   @high@: The profile used for high-definition digital TV broadcasts
--     and for Blu-ray discs.
--
-- __Level (H.264 Only)__
--
-- The H.264 level that you want to use for the output file. Elastic
-- Transcoder supports the following levels:
--
-- @1@, @1b@, @1.1@, @1.2@, @1.3@, @2@, @2.1@, @2.2@, @3@, @3.1@, @3.2@,
-- @4@, @4.1@
--
-- __MaxReferenceFrames (H.264 Only)__
--
-- 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:
--
-- @Min(Floor(Maximum decoded picture buffer in macroblocks * 256 \/ (Width in pixels * Height in pixels)), 16)@
--
-- where /Width in pixels/ and /Height in pixels/ represent either MaxWidth
-- and MaxHeight, or Resolution. /Maximum decoded picture buffer in
-- macroblocks/ depends on the value of the @Level@ object. See the list
-- below. (A macroblock is a block of pixels measuring 16x16.)
--
-- -   1 - 396
--
-- -   1b - 396
--
-- -   1.1 - 900
--
-- -   1.2 - 2376
--
-- -   1.3 - 2376
--
-- -   2 - 2376
--
-- -   2.1 - 4752
--
-- -   2.2 - 8100
--
-- -   3 - 8100
--
-- -   3.1 - 18000
--
-- -   3.2 - 20480
--
-- -   4 - 32768
--
-- -   4.1 - 32768
--
-- __MaxBitRate (Optional, H.264\/MPEG2\/VP8\/VP9 only)__
--
-- The maximum number of bits per second in a video buffer; the size of the
-- buffer is specified by @BufferSize@. 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.
--
-- __BufferSize (Optional, H.264\/MPEG2\/VP8\/VP9 only)__
--
-- 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 @MaxBitRate@
-- and omit @BufferSize@, Elastic Transcoder sets @BufferSize@ to 10 times
-- the value of @MaxBitRate@.
--
-- __InterlacedMode (Optional, H.264\/MPEG2 Only)__
--
-- The interlace mode for the output video.
--
-- 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.
--
-- Valid values include @Progressive@ (no interlacing, top to bottom),
-- @TopFirst@ (top field first), @BottomFirst@ (bottom field first), and
-- @Auto@.
--
-- If @InterlaceMode@ is not specified, Elastic Transcoder uses
-- @Progressive@ for the output. If @Auto@ is specified, Elastic Transcoder
-- interlaces the output.
--
-- __ColorSpaceConversionMode (Optional, H.264\/MPEG2 Only)__
--
-- 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. @Bt.601@ is the standard for
-- standard definition video, while @Bt.709@ is the standard for high
-- definition video.
--
-- Valid values include @None@, @Bt709toBt601@, @Bt601toBt709@, and @Auto@.
--
-- If you chose @Auto@ for @ColorSpaceConversionMode@ and your output is
-- interlaced, your frame rate is one of @23.97@, @24@, @25@, @29.97@,
-- @50@, or @60@, your @SegmentDuration@ is null, and you are using one of
-- the resolution changes from the list below, Elastic Transcoder applies
-- the following color space conversions:
--
-- -   /Standard to HD, 720x480 to 1920x1080/ - Elastic Transcoder applies
--     @Bt601ToBt709@
--
-- -   /Standard to HD, 720x576 to 1920x1080/ - Elastic Transcoder applies
--     @Bt601ToBt709@
--
-- -   /HD to Standard, 1920x1080 to 720x480/ - Elastic Transcoder applies
--     @Bt709ToBt601@
--
-- -   /HD to Standard, 1920x1080 to 720x576/ - Elastic Transcoder applies
--     @Bt709ToBt601@
--
-- Elastic Transcoder may change the behavior of the
-- @ColorspaceConversionMode@ @Auto@ mode in the future. All outputs in a
-- playlist must use the same @ColorSpaceConversionMode@.
--
-- If you do not specify a @ColorSpaceConversionMode@, Elastic Transcoder
-- does not change the color space of a file. If you are unsure what
-- @ColorSpaceConversionMode@ was applied to your output file, you can
-- check the @AppliedColorSpaceConversion@ parameter included in your job
-- response. If your job does not have an @AppliedColorSpaceConversion@ in
-- its response, no @ColorSpaceConversionMode@ was applied.
--
-- __ChromaSubsampling__
--
-- The sampling pattern for the chroma (color) channels of the output
-- video. Valid values include @yuv420p@ and @yuv422p@.
--
-- @yuv420p@ samples the chroma information of every other horizontal and
-- every other vertical line, @yuv422p@ samples the color information of
-- every horizontal line and every other vertical line.
--
-- __LoopCount (Gif Only)__
--
-- The number of times you want the output gif to loop. Valid values
-- include @Infinite@ and integers between @0@ and @100@, inclusive.
videoParameters_codecOptions :: Lens.Lens' VideoParameters (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
videoParameters_codecOptions :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> VideoParameters -> f VideoParameters
videoParameters_codecOptions = (VideoParameters -> Maybe (HashMap Text Text))
-> (VideoParameters
    -> Maybe (HashMap Text Text) -> VideoParameters)
-> Lens
     VideoParameters
     VideoParameters
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoParameters' {Maybe (HashMap Text Text)
codecOptions :: Maybe (HashMap Text Text)
$sel:codecOptions:VideoParameters' :: VideoParameters -> Maybe (HashMap Text Text)
codecOptions} -> Maybe (HashMap Text Text)
codecOptions) (\s :: VideoParameters
s@VideoParameters' {} Maybe (HashMap Text Text)
a -> VideoParameters
s {$sel:codecOptions:VideoParameters' :: Maybe (HashMap Text Text)
codecOptions = Maybe (HashMap Text Text)
a} :: VideoParameters) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> VideoParameters -> f VideoParameters)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> VideoParameters
-> f VideoParameters
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON VideoParameters where
  parseJSON :: Value -> Parser VideoParameters
parseJSON =
    String
-> (Object -> Parser VideoParameters)
-> Value
-> Parser VideoParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VideoParameters"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [PresetWatermark]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VideoParameters
VideoParameters'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [PresetWatermark]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [PresetWatermark]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KeyframesMaxDist")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [PresetWatermark]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [PresetWatermark]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FrameRate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [PresetWatermark]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [PresetWatermark]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SizingPolicy")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [PresetWatermark]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [PresetWatermark]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxFrameRate")
            Parser
  (Maybe Text
   -> Maybe [PresetWatermark]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe [PresetWatermark]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxHeight")
            Parser
  (Maybe [PresetWatermark]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe [PresetWatermark])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [PresetWatermark]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Watermarks" Parser (Maybe (Maybe [PresetWatermark]))
-> Maybe [PresetWatermark] -> Parser (Maybe [PresetWatermark])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PresetWatermark]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisplayAspectRatio")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Resolution")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Codec")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AspectRatio")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PaddingPolicy")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe (HashMap Text Text) -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxWidth")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe (HashMap Text Text) -> VideoParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe (HashMap Text Text) -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BitRate")
            Parser (Maybe Text -> Maybe (HashMap Text Text) -> VideoParameters)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> VideoParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FixedGOP")
            Parser (Maybe (HashMap Text Text) -> VideoParameters)
-> Parser (Maybe (HashMap Text Text)) -> Parser VideoParameters
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CodecOptions" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable VideoParameters

instance Prelude.NFData VideoParameters

instance Core.ToJSON VideoParameters where
  toJSON :: VideoParameters -> Value
toJSON VideoParameters' {Maybe [PresetWatermark]
Maybe Text
Maybe (HashMap Text Text)
codecOptions :: Maybe (HashMap Text Text)
fixedGOP :: Maybe Text
bitRate :: Maybe Text
maxWidth :: Maybe Text
paddingPolicy :: Maybe Text
aspectRatio :: Maybe Text
codec :: Maybe Text
resolution :: Maybe Text
displayAspectRatio :: Maybe Text
watermarks :: Maybe [PresetWatermark]
maxHeight :: Maybe Text
maxFrameRate :: Maybe Text
sizingPolicy :: Maybe Text
frameRate :: Maybe Text
keyframesMaxDist :: Maybe Text
$sel:codecOptions:VideoParameters' :: VideoParameters -> Maybe (HashMap Text Text)
$sel:fixedGOP:VideoParameters' :: VideoParameters -> Maybe Text
$sel:bitRate:VideoParameters' :: VideoParameters -> Maybe Text
$sel:maxWidth:VideoParameters' :: VideoParameters -> Maybe Text
$sel:paddingPolicy:VideoParameters' :: VideoParameters -> Maybe Text
$sel:aspectRatio:VideoParameters' :: VideoParameters -> Maybe Text
$sel:codec:VideoParameters' :: VideoParameters -> Maybe Text
$sel:resolution:VideoParameters' :: VideoParameters -> Maybe Text
$sel:displayAspectRatio:VideoParameters' :: VideoParameters -> Maybe Text
$sel:watermarks:VideoParameters' :: VideoParameters -> Maybe [PresetWatermark]
$sel:maxHeight:VideoParameters' :: VideoParameters -> Maybe Text
$sel:maxFrameRate:VideoParameters' :: VideoParameters -> Maybe Text
$sel:sizingPolicy:VideoParameters' :: VideoParameters -> Maybe Text
$sel:frameRate:VideoParameters' :: VideoParameters -> Maybe Text
$sel:keyframesMaxDist:VideoParameters' :: VideoParameters -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"KeyframesMaxDist" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
keyframesMaxDist,
            (Text
"FrameRate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
frameRate,
            (Text
"SizingPolicy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sizingPolicy,
            (Text
"MaxFrameRate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
maxFrameRate,
            (Text
"MaxHeight" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
maxHeight,
            (Text
"Watermarks" Text -> [PresetWatermark] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([PresetWatermark] -> Pair)
-> Maybe [PresetWatermark] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PresetWatermark]
watermarks,
            (Text
"DisplayAspectRatio" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
displayAspectRatio,
            (Text
"Resolution" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resolution,
            (Text
"Codec" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
codec,
            (Text
"AspectRatio" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
aspectRatio,
            (Text
"PaddingPolicy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
paddingPolicy,
            (Text
"MaxWidth" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
maxWidth,
            (Text
"BitRate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
bitRate,
            (Text
"FixedGOP" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
fixedGOP,
            (Text
"CodecOptions" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
codecOptions
          ]
      )