{-# 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.MediaConvert.Types.Vp8Settings
-- 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.MediaConvert.Types.Vp8Settings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.Vp8FramerateControl
import Amazonka.MediaConvert.Types.Vp8FramerateConversionAlgorithm
import Amazonka.MediaConvert.Types.Vp8ParControl
import Amazonka.MediaConvert.Types.Vp8QualityTuningLevel
import Amazonka.MediaConvert.Types.Vp8RateControlMode
import qualified Amazonka.Prelude as Prelude

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value VP8.
--
-- /See:/ 'newVp8Settings' smart constructor.
data Vp8Settings = Vp8Settings'
  { -- | Optional. Use Quality tuning level (qualityTuningLevel) to choose how
    -- you want to trade off encoding speed for output video quality. The
    -- default behavior is faster, lower quality, multi-pass encoding.
    Vp8Settings -> Maybe Vp8QualityTuningLevel
qualityTuningLevel :: Prelude.Maybe Vp8QualityTuningLevel,
    -- | Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
    -- the console, this corresponds to any value other than Follow source.
    -- When you specify an output pixel aspect ratio (PAR) that is different
    -- from your input video PAR, provide your output PAR as a ratio. For
    -- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
    -- In this example, the value for parNumerator is 40.
    Vp8Settings -> Maybe Natural
parNumerator :: Prelude.Maybe Prelude.Natural,
    -- | GOP Length (keyframe interval) in frames. Must be greater than zero.
    Vp8Settings -> Maybe Double
gopSize :: Prelude.Maybe Prelude.Double,
    -- | Optional. Size of buffer (HRD buffer model) in bits. For example, enter
    -- five megabits as 5000000.
    Vp8Settings -> Maybe Natural
hrdBufferSize :: Prelude.Maybe Prelude.Natural,
    -- | With the VP8 codec, you can use only the variable bitrate (VBR) rate
    -- control mode.
    Vp8Settings -> Maybe Vp8RateControlMode
rateControlMode :: Prelude.Maybe Vp8RateControlMode,
    -- | Optional. Specify how the service determines the pixel aspect ratio
    -- (PAR) for this output. The default behavior, Follow source
    -- (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your
    -- output. To specify a different PAR in the console, choose any value
    -- other than Follow source. To specify a different PAR by editing the JSON
    -- job specification, choose SPECIFIED. When you choose SPECIFIED for this
    -- setting, you must also specify values for the parNumerator and
    -- parDenominator settings.
    Vp8Settings -> Maybe Vp8ParControl
parControl :: Prelude.Maybe Vp8ParControl,
    -- | Target bitrate in bits\/second. For example, enter five megabits per
    -- second as 5000000.
    Vp8Settings -> Maybe Natural
bitrate :: Prelude.Maybe Prelude.Natural,
    -- | When you use the API for transcode jobs that use frame rate conversion,
    -- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
    -- 23.976 fps. Use FramerateDenominator to specify the denominator of this
    -- fraction. In this example, use 1001 for the value of
    -- FramerateDenominator. When you use the console for transcode jobs that
    -- use frame rate conversion, provide the value as a decimal number for
    -- Framerate. In this example, specify 23.976.
    Vp8Settings -> Maybe Natural
framerateDenominator :: Prelude.Maybe Prelude.Natural,
    -- | Choose the method that you want MediaConvert to use when increasing or
    -- decreasing the frame rate. We recommend using drop duplicate
    -- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
    -- 30 fps. For numerically complex conversions, you can use interpolate
    -- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
    -- might introduce undesirable video artifacts. For complex frame rate
    -- conversions, especially if your source video has already been converted
    -- from its original cadence, use FrameFormer (FRAMEFORMER) to do
    -- motion-compensated interpolation. FrameFormer chooses the best
    -- conversion method frame by frame. Note that using FrameFormer increases
    -- the transcoding time and incurs a significant add-on cost.
    Vp8Settings -> Maybe Vp8FramerateConversionAlgorithm
framerateConversionAlgorithm :: Prelude.Maybe Vp8FramerateConversionAlgorithm,
    -- | If you are using the console, use the Framerate setting to specify the
    -- frame rate for this output. If you want to keep the same frame rate as
    -- the input video, choose Follow source. If you want to do frame rate
    -- conversion, choose a frame rate from the dropdown list or choose Custom.
    -- The framerates shown in the dropdown list are decimal approximations of
    -- fractions. If you choose Custom, specify your frame rate as a fraction.
    -- If you are creating your transcoding job specification as a JSON file
    -- without the console, use FramerateControl to specify which value the
    -- service uses for the frame rate for this output. Choose
    -- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
    -- from the input. Choose SPECIFIED if you want the service to use the
    -- frame rate you specify in the settings FramerateNumerator and
    -- FramerateDenominator.
    Vp8Settings -> Maybe Vp8FramerateControl
framerateControl :: Prelude.Maybe Vp8FramerateControl,
    -- | When you use the API for transcode jobs that use frame rate conversion,
    -- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
    -- 23.976 fps. Use FramerateNumerator to specify the numerator of this
    -- fraction. In this example, use 24000 for the value of
    -- FramerateNumerator. When you use the console for transcode jobs that use
    -- frame rate conversion, provide the value as a decimal number for
    -- Framerate. In this example, specify 23.976.
    Vp8Settings -> Maybe Natural
framerateNumerator :: Prelude.Maybe Prelude.Natural,
    -- | Ignore this setting unless you set qualityTuningLevel to MULTI_PASS.
    -- Optional. Specify the maximum bitrate in bits\/second. For example,
    -- enter five megabits per second as 5000000. The default behavior uses
    -- twice the target bitrate as the maximum bitrate.
    Vp8Settings -> Maybe Natural
maxBitrate :: Prelude.Maybe Prelude.Natural,
    -- | Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
    -- the console, this corresponds to any value other than Follow source.
    -- When you specify an output pixel aspect ratio (PAR) that is different
    -- from your input video PAR, provide your output PAR as a ratio. For
    -- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
    -- In this example, the value for parDenominator is 33.
    Vp8Settings -> Maybe Natural
parDenominator :: Prelude.Maybe Prelude.Natural
  }
  deriving (Vp8Settings -> Vp8Settings -> Bool
(Vp8Settings -> Vp8Settings -> Bool)
-> (Vp8Settings -> Vp8Settings -> Bool) -> Eq Vp8Settings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Vp8Settings -> Vp8Settings -> Bool
$c/= :: Vp8Settings -> Vp8Settings -> Bool
== :: Vp8Settings -> Vp8Settings -> Bool
$c== :: Vp8Settings -> Vp8Settings -> Bool
Prelude.Eq, ReadPrec [Vp8Settings]
ReadPrec Vp8Settings
Int -> ReadS Vp8Settings
ReadS [Vp8Settings]
(Int -> ReadS Vp8Settings)
-> ReadS [Vp8Settings]
-> ReadPrec Vp8Settings
-> ReadPrec [Vp8Settings]
-> Read Vp8Settings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Vp8Settings]
$creadListPrec :: ReadPrec [Vp8Settings]
readPrec :: ReadPrec Vp8Settings
$creadPrec :: ReadPrec Vp8Settings
readList :: ReadS [Vp8Settings]
$creadList :: ReadS [Vp8Settings]
readsPrec :: Int -> ReadS Vp8Settings
$creadsPrec :: Int -> ReadS Vp8Settings
Prelude.Read, Int -> Vp8Settings -> ShowS
[Vp8Settings] -> ShowS
Vp8Settings -> String
(Int -> Vp8Settings -> ShowS)
-> (Vp8Settings -> String)
-> ([Vp8Settings] -> ShowS)
-> Show Vp8Settings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Vp8Settings] -> ShowS
$cshowList :: [Vp8Settings] -> ShowS
show :: Vp8Settings -> String
$cshow :: Vp8Settings -> String
showsPrec :: Int -> Vp8Settings -> ShowS
$cshowsPrec :: Int -> Vp8Settings -> ShowS
Prelude.Show, (forall x. Vp8Settings -> Rep Vp8Settings x)
-> (forall x. Rep Vp8Settings x -> Vp8Settings)
-> Generic Vp8Settings
forall x. Rep Vp8Settings x -> Vp8Settings
forall x. Vp8Settings -> Rep Vp8Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Vp8Settings x -> Vp8Settings
$cfrom :: forall x. Vp8Settings -> Rep Vp8Settings x
Prelude.Generic)

-- |
-- Create a value of 'Vp8Settings' 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:
--
-- 'qualityTuningLevel', 'vp8Settings_qualityTuningLevel' - Optional. Use Quality tuning level (qualityTuningLevel) to choose how
-- you want to trade off encoding speed for output video quality. The
-- default behavior is faster, lower quality, multi-pass encoding.
--
-- 'parNumerator', 'vp8Settings_parNumerator' - Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
-- the console, this corresponds to any value other than Follow source.
-- When you specify an output pixel aspect ratio (PAR) that is different
-- from your input video PAR, provide your output PAR as a ratio. For
-- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
-- In this example, the value for parNumerator is 40.
--
-- 'gopSize', 'vp8Settings_gopSize' - GOP Length (keyframe interval) in frames. Must be greater than zero.
--
-- 'hrdBufferSize', 'vp8Settings_hrdBufferSize' - Optional. Size of buffer (HRD buffer model) in bits. For example, enter
-- five megabits as 5000000.
--
-- 'rateControlMode', 'vp8Settings_rateControlMode' - With the VP8 codec, you can use only the variable bitrate (VBR) rate
-- control mode.
--
-- 'parControl', 'vp8Settings_parControl' - Optional. Specify how the service determines the pixel aspect ratio
-- (PAR) for this output. The default behavior, Follow source
-- (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your
-- output. To specify a different PAR in the console, choose any value
-- other than Follow source. To specify a different PAR by editing the JSON
-- job specification, choose SPECIFIED. When you choose SPECIFIED for this
-- setting, you must also specify values for the parNumerator and
-- parDenominator settings.
--
-- 'bitrate', 'vp8Settings_bitrate' - Target bitrate in bits\/second. For example, enter five megabits per
-- second as 5000000.
--
-- 'framerateDenominator', 'vp8Settings_framerateDenominator' - When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateDenominator to specify the denominator of this
-- fraction. In this example, use 1001 for the value of
-- FramerateDenominator. When you use the console for transcode jobs that
-- use frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
--
-- 'framerateConversionAlgorithm', 'vp8Settings_framerateConversionAlgorithm' - Choose the method that you want MediaConvert to use when increasing or
-- decreasing the frame rate. We recommend using drop duplicate
-- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
-- 30 fps. For numerically complex conversions, you can use interpolate
-- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
-- might introduce undesirable video artifacts. For complex frame rate
-- conversions, especially if your source video has already been converted
-- from its original cadence, use FrameFormer (FRAMEFORMER) to do
-- motion-compensated interpolation. FrameFormer chooses the best
-- conversion method frame by frame. Note that using FrameFormer increases
-- the transcoding time and incurs a significant add-on cost.
--
-- 'framerateControl', 'vp8Settings_framerateControl' - If you are using the console, use the Framerate setting to specify the
-- frame rate for this output. If you want to keep the same frame rate as
-- the input video, choose Follow source. If you want to do frame rate
-- conversion, choose a frame rate from the dropdown list or choose Custom.
-- The framerates shown in the dropdown list are decimal approximations of
-- fractions. If you choose Custom, specify your frame rate as a fraction.
-- If you are creating your transcoding job specification as a JSON file
-- without the console, use FramerateControl to specify which value the
-- service uses for the frame rate for this output. Choose
-- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
-- from the input. Choose SPECIFIED if you want the service to use the
-- frame rate you specify in the settings FramerateNumerator and
-- FramerateDenominator.
--
-- 'framerateNumerator', 'vp8Settings_framerateNumerator' - When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateNumerator to specify the numerator of this
-- fraction. In this example, use 24000 for the value of
-- FramerateNumerator. When you use the console for transcode jobs that use
-- frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
--
-- 'maxBitrate', 'vp8Settings_maxBitrate' - Ignore this setting unless you set qualityTuningLevel to MULTI_PASS.
-- Optional. Specify the maximum bitrate in bits\/second. For example,
-- enter five megabits per second as 5000000. The default behavior uses
-- twice the target bitrate as the maximum bitrate.
--
-- 'parDenominator', 'vp8Settings_parDenominator' - Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
-- the console, this corresponds to any value other than Follow source.
-- When you specify an output pixel aspect ratio (PAR) that is different
-- from your input video PAR, provide your output PAR as a ratio. For
-- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
-- In this example, the value for parDenominator is 33.
newVp8Settings ::
  Vp8Settings
newVp8Settings :: Vp8Settings
newVp8Settings =
  Vp8Settings' :: Maybe Vp8QualityTuningLevel
-> Maybe Natural
-> Maybe Double
-> Maybe Natural
-> Maybe Vp8RateControlMode
-> Maybe Vp8ParControl
-> Maybe Natural
-> Maybe Natural
-> Maybe Vp8FramerateConversionAlgorithm
-> Maybe Vp8FramerateControl
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Vp8Settings
Vp8Settings'
    { $sel:qualityTuningLevel:Vp8Settings' :: Maybe Vp8QualityTuningLevel
qualityTuningLevel = Maybe Vp8QualityTuningLevel
forall a. Maybe a
Prelude.Nothing,
      $sel:parNumerator:Vp8Settings' :: Maybe Natural
parNumerator = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:gopSize:Vp8Settings' :: Maybe Double
gopSize = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:hrdBufferSize:Vp8Settings' :: Maybe Natural
hrdBufferSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:rateControlMode:Vp8Settings' :: Maybe Vp8RateControlMode
rateControlMode = Maybe Vp8RateControlMode
forall a. Maybe a
Prelude.Nothing,
      $sel:parControl:Vp8Settings' :: Maybe Vp8ParControl
parControl = Maybe Vp8ParControl
forall a. Maybe a
Prelude.Nothing,
      $sel:bitrate:Vp8Settings' :: Maybe Natural
bitrate = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateDenominator:Vp8Settings' :: Maybe Natural
framerateDenominator = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateConversionAlgorithm:Vp8Settings' :: Maybe Vp8FramerateConversionAlgorithm
framerateConversionAlgorithm = Maybe Vp8FramerateConversionAlgorithm
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateControl:Vp8Settings' :: Maybe Vp8FramerateControl
framerateControl = Maybe Vp8FramerateControl
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateNumerator:Vp8Settings' :: Maybe Natural
framerateNumerator = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:maxBitrate:Vp8Settings' :: Maybe Natural
maxBitrate = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:parDenominator:Vp8Settings' :: Maybe Natural
parDenominator = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Optional. Use Quality tuning level (qualityTuningLevel) to choose how
-- you want to trade off encoding speed for output video quality. The
-- default behavior is faster, lower quality, multi-pass encoding.
vp8Settings_qualityTuningLevel :: Lens.Lens' Vp8Settings (Prelude.Maybe Vp8QualityTuningLevel)
vp8Settings_qualityTuningLevel :: (Maybe Vp8QualityTuningLevel -> f (Maybe Vp8QualityTuningLevel))
-> Vp8Settings -> f Vp8Settings
vp8Settings_qualityTuningLevel = (Vp8Settings -> Maybe Vp8QualityTuningLevel)
-> (Vp8Settings -> Maybe Vp8QualityTuningLevel -> Vp8Settings)
-> Lens
     Vp8Settings
     Vp8Settings
     (Maybe Vp8QualityTuningLevel)
     (Maybe Vp8QualityTuningLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Vp8QualityTuningLevel
qualityTuningLevel :: Maybe Vp8QualityTuningLevel
$sel:qualityTuningLevel:Vp8Settings' :: Vp8Settings -> Maybe Vp8QualityTuningLevel
qualityTuningLevel} -> Maybe Vp8QualityTuningLevel
qualityTuningLevel) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Vp8QualityTuningLevel
a -> Vp8Settings
s {$sel:qualityTuningLevel:Vp8Settings' :: Maybe Vp8QualityTuningLevel
qualityTuningLevel = Maybe Vp8QualityTuningLevel
a} :: Vp8Settings)

-- | Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
-- the console, this corresponds to any value other than Follow source.
-- When you specify an output pixel aspect ratio (PAR) that is different
-- from your input video PAR, provide your output PAR as a ratio. For
-- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
-- In this example, the value for parNumerator is 40.
vp8Settings_parNumerator :: Lens.Lens' Vp8Settings (Prelude.Maybe Prelude.Natural)
vp8Settings_parNumerator :: (Maybe Natural -> f (Maybe Natural))
-> Vp8Settings -> f Vp8Settings
vp8Settings_parNumerator = (Vp8Settings -> Maybe Natural)
-> (Vp8Settings -> Maybe Natural -> Vp8Settings)
-> Lens Vp8Settings Vp8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Natural
parNumerator :: Maybe Natural
$sel:parNumerator:Vp8Settings' :: Vp8Settings -> Maybe Natural
parNumerator} -> Maybe Natural
parNumerator) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Natural
a -> Vp8Settings
s {$sel:parNumerator:Vp8Settings' :: Maybe Natural
parNumerator = Maybe Natural
a} :: Vp8Settings)

-- | GOP Length (keyframe interval) in frames. Must be greater than zero.
vp8Settings_gopSize :: Lens.Lens' Vp8Settings (Prelude.Maybe Prelude.Double)
vp8Settings_gopSize :: (Maybe Double -> f (Maybe Double)) -> Vp8Settings -> f Vp8Settings
vp8Settings_gopSize = (Vp8Settings -> Maybe Double)
-> (Vp8Settings -> Maybe Double -> Vp8Settings)
-> Lens Vp8Settings Vp8Settings (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Double
gopSize :: Maybe Double
$sel:gopSize:Vp8Settings' :: Vp8Settings -> Maybe Double
gopSize} -> Maybe Double
gopSize) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Double
a -> Vp8Settings
s {$sel:gopSize:Vp8Settings' :: Maybe Double
gopSize = Maybe Double
a} :: Vp8Settings)

-- | Optional. Size of buffer (HRD buffer model) in bits. For example, enter
-- five megabits as 5000000.
vp8Settings_hrdBufferSize :: Lens.Lens' Vp8Settings (Prelude.Maybe Prelude.Natural)
vp8Settings_hrdBufferSize :: (Maybe Natural -> f (Maybe Natural))
-> Vp8Settings -> f Vp8Settings
vp8Settings_hrdBufferSize = (Vp8Settings -> Maybe Natural)
-> (Vp8Settings -> Maybe Natural -> Vp8Settings)
-> Lens Vp8Settings Vp8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Natural
hrdBufferSize :: Maybe Natural
$sel:hrdBufferSize:Vp8Settings' :: Vp8Settings -> Maybe Natural
hrdBufferSize} -> Maybe Natural
hrdBufferSize) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Natural
a -> Vp8Settings
s {$sel:hrdBufferSize:Vp8Settings' :: Maybe Natural
hrdBufferSize = Maybe Natural
a} :: Vp8Settings)

-- | With the VP8 codec, you can use only the variable bitrate (VBR) rate
-- control mode.
vp8Settings_rateControlMode :: Lens.Lens' Vp8Settings (Prelude.Maybe Vp8RateControlMode)
vp8Settings_rateControlMode :: (Maybe Vp8RateControlMode -> f (Maybe Vp8RateControlMode))
-> Vp8Settings -> f Vp8Settings
vp8Settings_rateControlMode = (Vp8Settings -> Maybe Vp8RateControlMode)
-> (Vp8Settings -> Maybe Vp8RateControlMode -> Vp8Settings)
-> Lens
     Vp8Settings
     Vp8Settings
     (Maybe Vp8RateControlMode)
     (Maybe Vp8RateControlMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Vp8RateControlMode
rateControlMode :: Maybe Vp8RateControlMode
$sel:rateControlMode:Vp8Settings' :: Vp8Settings -> Maybe Vp8RateControlMode
rateControlMode} -> Maybe Vp8RateControlMode
rateControlMode) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Vp8RateControlMode
a -> Vp8Settings
s {$sel:rateControlMode:Vp8Settings' :: Maybe Vp8RateControlMode
rateControlMode = Maybe Vp8RateControlMode
a} :: Vp8Settings)

-- | Optional. Specify how the service determines the pixel aspect ratio
-- (PAR) for this output. The default behavior, Follow source
-- (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your
-- output. To specify a different PAR in the console, choose any value
-- other than Follow source. To specify a different PAR by editing the JSON
-- job specification, choose SPECIFIED. When you choose SPECIFIED for this
-- setting, you must also specify values for the parNumerator and
-- parDenominator settings.
vp8Settings_parControl :: Lens.Lens' Vp8Settings (Prelude.Maybe Vp8ParControl)
vp8Settings_parControl :: (Maybe Vp8ParControl -> f (Maybe Vp8ParControl))
-> Vp8Settings -> f Vp8Settings
vp8Settings_parControl = (Vp8Settings -> Maybe Vp8ParControl)
-> (Vp8Settings -> Maybe Vp8ParControl -> Vp8Settings)
-> Lens
     Vp8Settings Vp8Settings (Maybe Vp8ParControl) (Maybe Vp8ParControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Vp8ParControl
parControl :: Maybe Vp8ParControl
$sel:parControl:Vp8Settings' :: Vp8Settings -> Maybe Vp8ParControl
parControl} -> Maybe Vp8ParControl
parControl) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Vp8ParControl
a -> Vp8Settings
s {$sel:parControl:Vp8Settings' :: Maybe Vp8ParControl
parControl = Maybe Vp8ParControl
a} :: Vp8Settings)

-- | Target bitrate in bits\/second. For example, enter five megabits per
-- second as 5000000.
vp8Settings_bitrate :: Lens.Lens' Vp8Settings (Prelude.Maybe Prelude.Natural)
vp8Settings_bitrate :: (Maybe Natural -> f (Maybe Natural))
-> Vp8Settings -> f Vp8Settings
vp8Settings_bitrate = (Vp8Settings -> Maybe Natural)
-> (Vp8Settings -> Maybe Natural -> Vp8Settings)
-> Lens Vp8Settings Vp8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Natural
bitrate :: Maybe Natural
$sel:bitrate:Vp8Settings' :: Vp8Settings -> Maybe Natural
bitrate} -> Maybe Natural
bitrate) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Natural
a -> Vp8Settings
s {$sel:bitrate:Vp8Settings' :: Maybe Natural
bitrate = Maybe Natural
a} :: Vp8Settings)

-- | When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateDenominator to specify the denominator of this
-- fraction. In this example, use 1001 for the value of
-- FramerateDenominator. When you use the console for transcode jobs that
-- use frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
vp8Settings_framerateDenominator :: Lens.Lens' Vp8Settings (Prelude.Maybe Prelude.Natural)
vp8Settings_framerateDenominator :: (Maybe Natural -> f (Maybe Natural))
-> Vp8Settings -> f Vp8Settings
vp8Settings_framerateDenominator = (Vp8Settings -> Maybe Natural)
-> (Vp8Settings -> Maybe Natural -> Vp8Settings)
-> Lens Vp8Settings Vp8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Natural
framerateDenominator :: Maybe Natural
$sel:framerateDenominator:Vp8Settings' :: Vp8Settings -> Maybe Natural
framerateDenominator} -> Maybe Natural
framerateDenominator) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Natural
a -> Vp8Settings
s {$sel:framerateDenominator:Vp8Settings' :: Maybe Natural
framerateDenominator = Maybe Natural
a} :: Vp8Settings)

-- | Choose the method that you want MediaConvert to use when increasing or
-- decreasing the frame rate. We recommend using drop duplicate
-- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
-- 30 fps. For numerically complex conversions, you can use interpolate
-- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
-- might introduce undesirable video artifacts. For complex frame rate
-- conversions, especially if your source video has already been converted
-- from its original cadence, use FrameFormer (FRAMEFORMER) to do
-- motion-compensated interpolation. FrameFormer chooses the best
-- conversion method frame by frame. Note that using FrameFormer increases
-- the transcoding time and incurs a significant add-on cost.
vp8Settings_framerateConversionAlgorithm :: Lens.Lens' Vp8Settings (Prelude.Maybe Vp8FramerateConversionAlgorithm)
vp8Settings_framerateConversionAlgorithm :: (Maybe Vp8FramerateConversionAlgorithm
 -> f (Maybe Vp8FramerateConversionAlgorithm))
-> Vp8Settings -> f Vp8Settings
vp8Settings_framerateConversionAlgorithm = (Vp8Settings -> Maybe Vp8FramerateConversionAlgorithm)
-> (Vp8Settings
    -> Maybe Vp8FramerateConversionAlgorithm -> Vp8Settings)
-> Lens
     Vp8Settings
     Vp8Settings
     (Maybe Vp8FramerateConversionAlgorithm)
     (Maybe Vp8FramerateConversionAlgorithm)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Vp8FramerateConversionAlgorithm
framerateConversionAlgorithm :: Maybe Vp8FramerateConversionAlgorithm
$sel:framerateConversionAlgorithm:Vp8Settings' :: Vp8Settings -> Maybe Vp8FramerateConversionAlgorithm
framerateConversionAlgorithm} -> Maybe Vp8FramerateConversionAlgorithm
framerateConversionAlgorithm) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Vp8FramerateConversionAlgorithm
a -> Vp8Settings
s {$sel:framerateConversionAlgorithm:Vp8Settings' :: Maybe Vp8FramerateConversionAlgorithm
framerateConversionAlgorithm = Maybe Vp8FramerateConversionAlgorithm
a} :: Vp8Settings)

-- | If you are using the console, use the Framerate setting to specify the
-- frame rate for this output. If you want to keep the same frame rate as
-- the input video, choose Follow source. If you want to do frame rate
-- conversion, choose a frame rate from the dropdown list or choose Custom.
-- The framerates shown in the dropdown list are decimal approximations of
-- fractions. If you choose Custom, specify your frame rate as a fraction.
-- If you are creating your transcoding job specification as a JSON file
-- without the console, use FramerateControl to specify which value the
-- service uses for the frame rate for this output. Choose
-- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
-- from the input. Choose SPECIFIED if you want the service to use the
-- frame rate you specify in the settings FramerateNumerator and
-- FramerateDenominator.
vp8Settings_framerateControl :: Lens.Lens' Vp8Settings (Prelude.Maybe Vp8FramerateControl)
vp8Settings_framerateControl :: (Maybe Vp8FramerateControl -> f (Maybe Vp8FramerateControl))
-> Vp8Settings -> f Vp8Settings
vp8Settings_framerateControl = (Vp8Settings -> Maybe Vp8FramerateControl)
-> (Vp8Settings -> Maybe Vp8FramerateControl -> Vp8Settings)
-> Lens
     Vp8Settings
     Vp8Settings
     (Maybe Vp8FramerateControl)
     (Maybe Vp8FramerateControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Vp8FramerateControl
framerateControl :: Maybe Vp8FramerateControl
$sel:framerateControl:Vp8Settings' :: Vp8Settings -> Maybe Vp8FramerateControl
framerateControl} -> Maybe Vp8FramerateControl
framerateControl) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Vp8FramerateControl
a -> Vp8Settings
s {$sel:framerateControl:Vp8Settings' :: Maybe Vp8FramerateControl
framerateControl = Maybe Vp8FramerateControl
a} :: Vp8Settings)

-- | When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateNumerator to specify the numerator of this
-- fraction. In this example, use 24000 for the value of
-- FramerateNumerator. When you use the console for transcode jobs that use
-- frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
vp8Settings_framerateNumerator :: Lens.Lens' Vp8Settings (Prelude.Maybe Prelude.Natural)
vp8Settings_framerateNumerator :: (Maybe Natural -> f (Maybe Natural))
-> Vp8Settings -> f Vp8Settings
vp8Settings_framerateNumerator = (Vp8Settings -> Maybe Natural)
-> (Vp8Settings -> Maybe Natural -> Vp8Settings)
-> Lens Vp8Settings Vp8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Natural
framerateNumerator :: Maybe Natural
$sel:framerateNumerator:Vp8Settings' :: Vp8Settings -> Maybe Natural
framerateNumerator} -> Maybe Natural
framerateNumerator) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Natural
a -> Vp8Settings
s {$sel:framerateNumerator:Vp8Settings' :: Maybe Natural
framerateNumerator = Maybe Natural
a} :: Vp8Settings)

-- | Ignore this setting unless you set qualityTuningLevel to MULTI_PASS.
-- Optional. Specify the maximum bitrate in bits\/second. For example,
-- enter five megabits per second as 5000000. The default behavior uses
-- twice the target bitrate as the maximum bitrate.
vp8Settings_maxBitrate :: Lens.Lens' Vp8Settings (Prelude.Maybe Prelude.Natural)
vp8Settings_maxBitrate :: (Maybe Natural -> f (Maybe Natural))
-> Vp8Settings -> f Vp8Settings
vp8Settings_maxBitrate = (Vp8Settings -> Maybe Natural)
-> (Vp8Settings -> Maybe Natural -> Vp8Settings)
-> Lens Vp8Settings Vp8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Natural
maxBitrate :: Maybe Natural
$sel:maxBitrate:Vp8Settings' :: Vp8Settings -> Maybe Natural
maxBitrate} -> Maybe Natural
maxBitrate) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Natural
a -> Vp8Settings
s {$sel:maxBitrate:Vp8Settings' :: Maybe Natural
maxBitrate = Maybe Natural
a} :: Vp8Settings)

-- | Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
-- the console, this corresponds to any value other than Follow source.
-- When you specify an output pixel aspect ratio (PAR) that is different
-- from your input video PAR, provide your output PAR as a ratio. For
-- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
-- In this example, the value for parDenominator is 33.
vp8Settings_parDenominator :: Lens.Lens' Vp8Settings (Prelude.Maybe Prelude.Natural)
vp8Settings_parDenominator :: (Maybe Natural -> f (Maybe Natural))
-> Vp8Settings -> f Vp8Settings
vp8Settings_parDenominator = (Vp8Settings -> Maybe Natural)
-> (Vp8Settings -> Maybe Natural -> Vp8Settings)
-> Lens Vp8Settings Vp8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp8Settings' {Maybe Natural
parDenominator :: Maybe Natural
$sel:parDenominator:Vp8Settings' :: Vp8Settings -> Maybe Natural
parDenominator} -> Maybe Natural
parDenominator) (\s :: Vp8Settings
s@Vp8Settings' {} Maybe Natural
a -> Vp8Settings
s {$sel:parDenominator:Vp8Settings' :: Maybe Natural
parDenominator = Maybe Natural
a} :: Vp8Settings)

instance Core.FromJSON Vp8Settings where
  parseJSON :: Value -> Parser Vp8Settings
parseJSON =
    String
-> (Object -> Parser Vp8Settings) -> Value -> Parser Vp8Settings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Vp8Settings"
      ( \Object
x ->
          Maybe Vp8QualityTuningLevel
-> Maybe Natural
-> Maybe Double
-> Maybe Natural
-> Maybe Vp8RateControlMode
-> Maybe Vp8ParControl
-> Maybe Natural
-> Maybe Natural
-> Maybe Vp8FramerateConversionAlgorithm
-> Maybe Vp8FramerateControl
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Vp8Settings
Vp8Settings'
            (Maybe Vp8QualityTuningLevel
 -> Maybe Natural
 -> Maybe Double
 -> Maybe Natural
 -> Maybe Vp8RateControlMode
 -> Maybe Vp8ParControl
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Vp8FramerateConversionAlgorithm
 -> Maybe Vp8FramerateControl
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Vp8Settings)
-> Parser (Maybe Vp8QualityTuningLevel)
-> Parser
     (Maybe Natural
      -> Maybe Double
      -> Maybe Natural
      -> Maybe Vp8RateControlMode
      -> Maybe Vp8ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp8FramerateConversionAlgorithm
      -> Maybe Vp8FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp8Settings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Vp8QualityTuningLevel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"qualityTuningLevel")
            Parser
  (Maybe Natural
   -> Maybe Double
   -> Maybe Natural
   -> Maybe Vp8RateControlMode
   -> Maybe Vp8ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp8FramerateConversionAlgorithm
   -> Maybe Vp8FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Double
      -> Maybe Natural
      -> Maybe Vp8RateControlMode
      -> Maybe Vp8ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp8FramerateConversionAlgorithm
      -> Maybe Vp8FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"parNumerator")
            Parser
  (Maybe Double
   -> Maybe Natural
   -> Maybe Vp8RateControlMode
   -> Maybe Vp8ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp8FramerateConversionAlgorithm
   -> Maybe Vp8FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp8Settings)
-> Parser (Maybe Double)
-> Parser
     (Maybe Natural
      -> Maybe Vp8RateControlMode
      -> Maybe Vp8ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp8FramerateConversionAlgorithm
      -> Maybe Vp8FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"gopSize")
            Parser
  (Maybe Natural
   -> Maybe Vp8RateControlMode
   -> Maybe Vp8ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp8FramerateConversionAlgorithm
   -> Maybe Vp8FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Vp8RateControlMode
      -> Maybe Vp8ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp8FramerateConversionAlgorithm
      -> Maybe Vp8FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hrdBufferSize")
            Parser
  (Maybe Vp8RateControlMode
   -> Maybe Vp8ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp8FramerateConversionAlgorithm
   -> Maybe Vp8FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp8Settings)
-> Parser (Maybe Vp8RateControlMode)
-> Parser
     (Maybe Vp8ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp8FramerateConversionAlgorithm
      -> Maybe Vp8FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Vp8RateControlMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rateControlMode")
            Parser
  (Maybe Vp8ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp8FramerateConversionAlgorithm
   -> Maybe Vp8FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp8Settings)
-> Parser (Maybe Vp8ParControl)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Vp8FramerateConversionAlgorithm
      -> Maybe Vp8FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Vp8ParControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"parControl")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Vp8FramerateConversionAlgorithm
   -> Maybe Vp8FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Vp8FramerateConversionAlgorithm
      -> Maybe Vp8FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bitrate")
            Parser
  (Maybe Natural
   -> Maybe Vp8FramerateConversionAlgorithm
   -> Maybe Vp8FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Vp8FramerateConversionAlgorithm
      -> Maybe Vp8FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerateDenominator")
            Parser
  (Maybe Vp8FramerateConversionAlgorithm
   -> Maybe Vp8FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp8Settings)
-> Parser (Maybe Vp8FramerateConversionAlgorithm)
-> Parser
     (Maybe Vp8FramerateControl
      -> Maybe Natural -> Maybe Natural -> Maybe Natural -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Vp8FramerateConversionAlgorithm)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerateConversionAlgorithm")
            Parser
  (Maybe Vp8FramerateControl
   -> Maybe Natural -> Maybe Natural -> Maybe Natural -> Vp8Settings)
-> Parser (Maybe Vp8FramerateControl)
-> Parser
     (Maybe Natural -> Maybe Natural -> Maybe Natural -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Vp8FramerateControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerateControl")
            Parser
  (Maybe Natural -> Maybe Natural -> Maybe Natural -> Vp8Settings)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Maybe Natural -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerateNumerator")
            Parser (Maybe Natural -> Maybe Natural -> Vp8Settings)
-> Parser (Maybe Natural) -> Parser (Maybe Natural -> Vp8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxBitrate")
            Parser (Maybe Natural -> Vp8Settings)
-> Parser (Maybe Natural) -> Parser Vp8Settings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"parDenominator")
      )

instance Prelude.Hashable Vp8Settings

instance Prelude.NFData Vp8Settings

instance Core.ToJSON Vp8Settings where
  toJSON :: Vp8Settings -> Value
toJSON Vp8Settings' {Maybe Double
Maybe Natural
Maybe Vp8FramerateControl
Maybe Vp8FramerateConversionAlgorithm
Maybe Vp8ParControl
Maybe Vp8QualityTuningLevel
Maybe Vp8RateControlMode
parDenominator :: Maybe Natural
maxBitrate :: Maybe Natural
framerateNumerator :: Maybe Natural
framerateControl :: Maybe Vp8FramerateControl
framerateConversionAlgorithm :: Maybe Vp8FramerateConversionAlgorithm
framerateDenominator :: Maybe Natural
bitrate :: Maybe Natural
parControl :: Maybe Vp8ParControl
rateControlMode :: Maybe Vp8RateControlMode
hrdBufferSize :: Maybe Natural
gopSize :: Maybe Double
parNumerator :: Maybe Natural
qualityTuningLevel :: Maybe Vp8QualityTuningLevel
$sel:parDenominator:Vp8Settings' :: Vp8Settings -> Maybe Natural
$sel:maxBitrate:Vp8Settings' :: Vp8Settings -> Maybe Natural
$sel:framerateNumerator:Vp8Settings' :: Vp8Settings -> Maybe Natural
$sel:framerateControl:Vp8Settings' :: Vp8Settings -> Maybe Vp8FramerateControl
$sel:framerateConversionAlgorithm:Vp8Settings' :: Vp8Settings -> Maybe Vp8FramerateConversionAlgorithm
$sel:framerateDenominator:Vp8Settings' :: Vp8Settings -> Maybe Natural
$sel:bitrate:Vp8Settings' :: Vp8Settings -> Maybe Natural
$sel:parControl:Vp8Settings' :: Vp8Settings -> Maybe Vp8ParControl
$sel:rateControlMode:Vp8Settings' :: Vp8Settings -> Maybe Vp8RateControlMode
$sel:hrdBufferSize:Vp8Settings' :: Vp8Settings -> Maybe Natural
$sel:gopSize:Vp8Settings' :: Vp8Settings -> Maybe Double
$sel:parNumerator:Vp8Settings' :: Vp8Settings -> Maybe Natural
$sel:qualityTuningLevel:Vp8Settings' :: Vp8Settings -> Maybe Vp8QualityTuningLevel
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"qualityTuningLevel" Text -> Vp8QualityTuningLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Vp8QualityTuningLevel -> Pair)
-> Maybe Vp8QualityTuningLevel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp8QualityTuningLevel
qualityTuningLevel,
            (Text
"parNumerator" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
parNumerator,
            (Text
"gopSize" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
gopSize,
            (Text
"hrdBufferSize" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
hrdBufferSize,
            (Text
"rateControlMode" Text -> Vp8RateControlMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Vp8RateControlMode -> Pair)
-> Maybe Vp8RateControlMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp8RateControlMode
rateControlMode,
            (Text
"parControl" Text -> Vp8ParControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Vp8ParControl -> Pair) -> Maybe Vp8ParControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp8ParControl
parControl,
            (Text
"bitrate" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
bitrate,
            (Text
"framerateDenominator" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
framerateDenominator,
            (Text
"framerateConversionAlgorithm" Text -> Vp8FramerateConversionAlgorithm -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Vp8FramerateConversionAlgorithm -> Pair)
-> Maybe Vp8FramerateConversionAlgorithm -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp8FramerateConversionAlgorithm
framerateConversionAlgorithm,
            (Text
"framerateControl" Text -> Vp8FramerateControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Vp8FramerateControl -> Pair)
-> Maybe Vp8FramerateControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp8FramerateControl
framerateControl,
            (Text
"framerateNumerator" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
framerateNumerator,
            (Text
"maxBitrate" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxBitrate,
            (Text
"parDenominator" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
parDenominator
          ]
      )