diff --git a/manifest.json b/manifest.json index e3f0e75a2..bc07a4a48 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.343.1" + "${LATEST}": "3.343.4" }, "endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json", "services": { diff --git a/psalm.baseline.xml b/psalm.baseline.xml index 8b7d03f27..eb17979c7 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -207,11 +207,13 @@ $items $items $items + $items ]]> ]]> ]]> + ]]> @@ -219,11 +221,13 @@ $items $items $items + $items ]]> ]]> ]]> + ]]> @@ -231,11 +235,13 @@ $items $items $items + $items ]]> ]]> ]]> + ]]> diff --git a/src/Service/MediaConvert/CHANGELOG.md b/src/Service/MediaConvert/CHANGELOG.md index fa07a461b..b06e69aee 100644 --- a/src/Service/MediaConvert/CHANGELOG.md +++ b/src/Service/MediaConvert/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: This release adds an optional sidecar per-frame video quality metrics report and an ALL_PCM option for audio selectors. It also changes the data type for Probe API response fields related to video and audio bitrate from integer to double. + ### Changed - Sort exception alphabetically. diff --git a/src/Service/MediaConvert/composer.json b/src/Service/MediaConvert/composer.json index 1790f6d29..2f944b24e 100644 --- a/src/Service/MediaConvert/composer.json +++ b/src/Service/MediaConvert/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } } } diff --git a/src/Service/MediaConvert/src/Enum/AudioSelectorType.php b/src/Service/MediaConvert/src/Enum/AudioSelectorType.php index 0c380881b..4800db5a2 100644 --- a/src/Service/MediaConvert/src/Enum/AudioSelectorType.php +++ b/src/Service/MediaConvert/src/Enum/AudioSelectorType.php @@ -7,6 +7,7 @@ */ final class AudioSelectorType { + public const ALL_PCM = 'ALL_PCM'; public const HLS_RENDITION_GROUP = 'HLS_RENDITION_GROUP'; public const LANGUAGE_CODE = 'LANGUAGE_CODE'; public const PID = 'PID'; @@ -15,6 +16,7 @@ final class AudioSelectorType public static function exists(string $value): bool { return isset([ + self::ALL_PCM => true, self::HLS_RENDITION_GROUP => true, self::LANGUAGE_CODE => true, self::PID => true, diff --git a/src/Service/MediaConvert/src/Enum/FrameMetricType.php b/src/Service/MediaConvert/src/Enum/FrameMetricType.php new file mode 100644 index 000000000..17dcde079 --- /dev/null +++ b/src/Service/MediaConvert/src/Enum/FrameMetricType.php @@ -0,0 +1,31 @@ + true, + self::PSNR => true, + self::PSNR_HVS => true, + self::QVBR => true, + self::SSIM => true, + self::VMAF => true, + ][$value]); + } +} diff --git a/src/Service/MediaConvert/src/Input/CreateJobRequest.php b/src/Service/MediaConvert/src/Input/CreateJobRequest.php index d69526e4d..6dc63d173 100644 --- a/src/Service/MediaConvert/src/Input/CreateJobRequest.php +++ b/src/Service/MediaConvert/src/Input/CreateJobRequest.php @@ -12,6 +12,7 @@ use AsyncAws\MediaConvert\ValueObject\AccelerationSettings; use AsyncAws\MediaConvert\ValueObject\HopDestination; use AsyncAws\MediaConvert\ValueObject\JobSettings; +use AsyncAws\MediaConvert\ValueObject\Output; /** * Send your create job request with your job settings and IAM role. Optionally, include user metadata and the ARN for @@ -29,10 +30,8 @@ final class CreateJobRequest extends Input1 private $accelerationSettings; /** - * Optional. Choose a tag type that AWS Billing and Cost Management will use to sort your AWS Elemental MediaConvert - * costs on any billing report that you set up. Any transcoding outputs that don't have an associated tag will appear in - * your billing report unsorted. If you don't choose a valid value for this field, your job outputs will appear on the - * billing report unsorted. + * Optionally choose a Billing tags source that AWS Billing and Cost Management will use to display tags for individual + * output costs on any billing report that you set up. Leave blank to use the default value, Job. * * @var BillingTagsSource::*|null */ diff --git a/src/Service/MediaConvert/src/Result/CreateJobResponse.php b/src/Service/MediaConvert/src/Result/CreateJobResponse.php index 0adcaf9a2..091aef48e 100644 --- a/src/Service/MediaConvert/src/Result/CreateJobResponse.php +++ b/src/Service/MediaConvert/src/Result/CreateJobResponse.php @@ -5,6 +5,7 @@ use AsyncAws\Core\Response; use AsyncAws\Core\Result; use AsyncAws\MediaConvert\Enum\AudioChannelTag; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\HlsAdMarkers; use AsyncAws\MediaConvert\Enum\TeletextPageType; use AsyncAws\MediaConvert\ValueObject\AacSettings; @@ -413,6 +414,7 @@ private function populateResultAv1Settings(array $json): Av1Settings 'GopSize' => isset($json['gopSize']) ? (float) $json['gopSize'] : null, 'MaxBitrate' => isset($json['maxBitrate']) ? (int) $json['maxBitrate'] : null, 'NumberBFramesBetweenReferenceFrames' => isset($json['numberBFramesBetweenReferenceFrames']) ? (int) $json['numberBFramesBetweenReferenceFrames'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultAv1QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, 'Slices' => isset($json['slices']) ? (int) $json['slices'] : null, @@ -437,6 +439,7 @@ private function populateResultAvcIntraSettings(array $json): AvcIntraSettings 'FramerateDenominator' => isset($json['framerateDenominator']) ? (int) $json['framerateDenominator'] : null, 'FramerateNumerator' => isset($json['framerateNumerator']) ? (int) $json['framerateNumerator'] : null, 'InterlaceMode' => isset($json['interlaceMode']) ? (string) $json['interlaceMode'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Telecine' => isset($json['telecine']) ? (string) $json['telecine'] : null, @@ -1078,6 +1081,7 @@ private function populateResultH264Settings(array $json): H264Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultH264QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, @@ -1138,6 +1142,7 @@ private function populateResultH265Settings(array $json): H265Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultH265QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, @@ -1692,6 +1697,7 @@ private function populateResultMpeg2Settings(array $json): Mpeg2Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, @@ -1888,6 +1894,7 @@ private function populateResultOutputGroupSettings(array $json): OutputGroupSett 'FileGroupSettings' => empty($json['fileGroupSettings']) ? null : $this->populateResultFileGroupSettings($json['fileGroupSettings']), 'HlsGroupSettings' => empty($json['hlsGroupSettings']) ? null : $this->populateResultHlsGroupSettings($json['hlsGroupSettings']), 'MsSmoothGroupSettings' => empty($json['msSmoothGroupSettings']) ? null : $this->populateResultMsSmoothGroupSettings($json['msSmoothGroupSettings']), + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'Type' => isset($json['type']) ? (string) $json['type'] : null, ]); } @@ -1919,6 +1926,7 @@ private function populateResultProresSettings(array $json): ProresSettings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Telecine' => isset($json['telecine']) ? (string) $json['telecine'] : null, @@ -2394,6 +2402,7 @@ private function populateResultXavcSettings(array $json): XavcSettings 'FramerateConversionAlgorithm' => isset($json['framerateConversionAlgorithm']) ? (string) $json['framerateConversionAlgorithm'] : null, 'FramerateDenominator' => isset($json['framerateDenominator']) ? (int) $json['framerateDenominator'] : null, 'FramerateNumerator' => isset($json['framerateNumerator']) ? (int) $json['framerateNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'Profile' => isset($json['profile']) ? (string) $json['profile'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Softness' => isset($json['softness']) ? (int) $json['softness'] : null, @@ -2527,6 +2536,22 @@ private function populateResult__listOfForceIncludeRenditionSize(array $json): a return $items; } + /** + * @return list + */ + private function populateResult__listOfFrameMetricType(array $json): array + { + $items = []; + foreach ($json as $item) { + $a = isset($item) ? (string) $item : null; + if (null !== $a) { + $items[] = $a; + } + } + + return $items; + } + /** * @return list */ diff --git a/src/Service/MediaConvert/src/Result/GetJobResponse.php b/src/Service/MediaConvert/src/Result/GetJobResponse.php index a1c04a7b8..af068d396 100644 --- a/src/Service/MediaConvert/src/Result/GetJobResponse.php +++ b/src/Service/MediaConvert/src/Result/GetJobResponse.php @@ -5,6 +5,7 @@ use AsyncAws\Core\Response; use AsyncAws\Core\Result; use AsyncAws\MediaConvert\Enum\AudioChannelTag; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\HlsAdMarkers; use AsyncAws\MediaConvert\Enum\TeletextPageType; use AsyncAws\MediaConvert\ValueObject\AacSettings; @@ -413,6 +414,7 @@ private function populateResultAv1Settings(array $json): Av1Settings 'GopSize' => isset($json['gopSize']) ? (float) $json['gopSize'] : null, 'MaxBitrate' => isset($json['maxBitrate']) ? (int) $json['maxBitrate'] : null, 'NumberBFramesBetweenReferenceFrames' => isset($json['numberBFramesBetweenReferenceFrames']) ? (int) $json['numberBFramesBetweenReferenceFrames'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultAv1QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, 'Slices' => isset($json['slices']) ? (int) $json['slices'] : null, @@ -437,6 +439,7 @@ private function populateResultAvcIntraSettings(array $json): AvcIntraSettings 'FramerateDenominator' => isset($json['framerateDenominator']) ? (int) $json['framerateDenominator'] : null, 'FramerateNumerator' => isset($json['framerateNumerator']) ? (int) $json['framerateNumerator'] : null, 'InterlaceMode' => isset($json['interlaceMode']) ? (string) $json['interlaceMode'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Telecine' => isset($json['telecine']) ? (string) $json['telecine'] : null, @@ -1078,6 +1081,7 @@ private function populateResultH264Settings(array $json): H264Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultH264QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, @@ -1138,6 +1142,7 @@ private function populateResultH265Settings(array $json): H265Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultH265QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, @@ -1692,6 +1697,7 @@ private function populateResultMpeg2Settings(array $json): Mpeg2Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, @@ -1888,6 +1894,7 @@ private function populateResultOutputGroupSettings(array $json): OutputGroupSett 'FileGroupSettings' => empty($json['fileGroupSettings']) ? null : $this->populateResultFileGroupSettings($json['fileGroupSettings']), 'HlsGroupSettings' => empty($json['hlsGroupSettings']) ? null : $this->populateResultHlsGroupSettings($json['hlsGroupSettings']), 'MsSmoothGroupSettings' => empty($json['msSmoothGroupSettings']) ? null : $this->populateResultMsSmoothGroupSettings($json['msSmoothGroupSettings']), + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'Type' => isset($json['type']) ? (string) $json['type'] : null, ]); } @@ -1919,6 +1926,7 @@ private function populateResultProresSettings(array $json): ProresSettings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Telecine' => isset($json['telecine']) ? (string) $json['telecine'] : null, @@ -2394,6 +2402,7 @@ private function populateResultXavcSettings(array $json): XavcSettings 'FramerateConversionAlgorithm' => isset($json['framerateConversionAlgorithm']) ? (string) $json['framerateConversionAlgorithm'] : null, 'FramerateDenominator' => isset($json['framerateDenominator']) ? (int) $json['framerateDenominator'] : null, 'FramerateNumerator' => isset($json['framerateNumerator']) ? (int) $json['framerateNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'Profile' => isset($json['profile']) ? (string) $json['profile'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Softness' => isset($json['softness']) ? (int) $json['softness'] : null, @@ -2527,6 +2536,22 @@ private function populateResult__listOfForceIncludeRenditionSize(array $json): a return $items; } + /** + * @return list + */ + private function populateResult__listOfFrameMetricType(array $json): array + { + $items = []; + foreach ($json as $item) { + $a = isset($item) ? (string) $item : null; + if (null !== $a) { + $items[] = $a; + } + } + + return $items; + } + /** * @return list */ diff --git a/src/Service/MediaConvert/src/Result/ListJobsResponse.php b/src/Service/MediaConvert/src/Result/ListJobsResponse.php index 531705ca0..1415d2844 100644 --- a/src/Service/MediaConvert/src/Result/ListJobsResponse.php +++ b/src/Service/MediaConvert/src/Result/ListJobsResponse.php @@ -6,6 +6,7 @@ use AsyncAws\Core\Response; use AsyncAws\Core\Result; use AsyncAws\MediaConvert\Enum\AudioChannelTag; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\HlsAdMarkers; use AsyncAws\MediaConvert\Enum\TeletextPageType; use AsyncAws\MediaConvert\Input\ListJobsRequest; @@ -480,6 +481,7 @@ private function populateResultAv1Settings(array $json): Av1Settings 'GopSize' => isset($json['gopSize']) ? (float) $json['gopSize'] : null, 'MaxBitrate' => isset($json['maxBitrate']) ? (int) $json['maxBitrate'] : null, 'NumberBFramesBetweenReferenceFrames' => isset($json['numberBFramesBetweenReferenceFrames']) ? (int) $json['numberBFramesBetweenReferenceFrames'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultAv1QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, 'Slices' => isset($json['slices']) ? (int) $json['slices'] : null, @@ -504,6 +506,7 @@ private function populateResultAvcIntraSettings(array $json): AvcIntraSettings 'FramerateDenominator' => isset($json['framerateDenominator']) ? (int) $json['framerateDenominator'] : null, 'FramerateNumerator' => isset($json['framerateNumerator']) ? (int) $json['framerateNumerator'] : null, 'InterlaceMode' => isset($json['interlaceMode']) ? (string) $json['interlaceMode'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Telecine' => isset($json['telecine']) ? (string) $json['telecine'] : null, @@ -1145,6 +1148,7 @@ private function populateResultH264Settings(array $json): H264Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultH264QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, @@ -1205,6 +1209,7 @@ private function populateResultH265Settings(array $json): H265Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultH265QvbrSettings($json['qvbrSettings']), 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, @@ -1759,6 +1764,7 @@ private function populateResultMpeg2Settings(array $json): Mpeg2Settings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'QualityTuningLevel' => isset($json['qualityTuningLevel']) ? (string) $json['qualityTuningLevel'] : null, 'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null, 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, @@ -1955,6 +1961,7 @@ private function populateResultOutputGroupSettings(array $json): OutputGroupSett 'FileGroupSettings' => empty($json['fileGroupSettings']) ? null : $this->populateResultFileGroupSettings($json['fileGroupSettings']), 'HlsGroupSettings' => empty($json['hlsGroupSettings']) ? null : $this->populateResultHlsGroupSettings($json['hlsGroupSettings']), 'MsSmoothGroupSettings' => empty($json['msSmoothGroupSettings']) ? null : $this->populateResultMsSmoothGroupSettings($json['msSmoothGroupSettings']), + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'Type' => isset($json['type']) ? (string) $json['type'] : null, ]); } @@ -1986,6 +1993,7 @@ private function populateResultProresSettings(array $json): ProresSettings 'ParControl' => isset($json['parControl']) ? (string) $json['parControl'] : null, 'ParDenominator' => isset($json['parDenominator']) ? (int) $json['parDenominator'] : null, 'ParNumerator' => isset($json['parNumerator']) ? (int) $json['parNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Telecine' => isset($json['telecine']) ? (string) $json['telecine'] : null, @@ -2461,6 +2469,7 @@ private function populateResultXavcSettings(array $json): XavcSettings 'FramerateConversionAlgorithm' => isset($json['framerateConversionAlgorithm']) ? (string) $json['framerateConversionAlgorithm'] : null, 'FramerateDenominator' => isset($json['framerateDenominator']) ? (int) $json['framerateDenominator'] : null, 'FramerateNumerator' => isset($json['framerateNumerator']) ? (int) $json['framerateNumerator'] : null, + 'PerFrameMetrics' => !isset($json['perFrameMetrics']) ? null : $this->populateResult__listOfFrameMetricType($json['perFrameMetrics']), 'Profile' => isset($json['profile']) ? (string) $json['profile'] : null, 'SlowPal' => isset($json['slowPal']) ? (string) $json['slowPal'] : null, 'Softness' => isset($json['softness']) ? (int) $json['softness'] : null, @@ -2594,6 +2603,22 @@ private function populateResult__listOfForceIncludeRenditionSize(array $json): a return $items; } + /** + * @return list + */ + private function populateResult__listOfFrameMetricType(array $json): array + { + $items = []; + foreach ($json as $item) { + $a = isset($item) ? (string) $item : null; + if (null !== $a) { + $items[] = $a; + } + } + + return $items; + } + /** * @return list */ diff --git a/src/Service/MediaConvert/src/ValueObject/AutomatedAbrSettings.php b/src/Service/MediaConvert/src/ValueObject/AutomatedAbrSettings.php index fa4bfb31d..136ea3fbe 100644 --- a/src/Service/MediaConvert/src/ValueObject/AutomatedAbrSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/AutomatedAbrSettings.php @@ -21,8 +21,8 @@ final class AutomatedAbrSettings /** * Optional. Specify the QVBR quality level to use for all renditions in your automated ABR stack. To have MediaConvert - * automatically determine the quality level: Leave blank. To manually specify a quality level: Enter an integer from 1 - * to 10. MediaConvert will use a quality level up to the value that you specify, depending on your source. For more + * automatically determine the quality level: Leave blank. To manually specify a quality level: Enter a value from 1 to + * 10. MediaConvert will use a quality level up to the value that you specify, depending on your source. For more * information about QVBR quality levels, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/qvbr-guidelines.html. * * @var float|null diff --git a/src/Service/MediaConvert/src/ValueObject/Av1Settings.php b/src/Service/MediaConvert/src/ValueObject/Av1Settings.php index aa377730f..f21729566 100644 --- a/src/Service/MediaConvert/src/ValueObject/Av1Settings.php +++ b/src/Service/MediaConvert/src/ValueObject/Av1Settings.php @@ -10,6 +10,7 @@ use AsyncAws\MediaConvert\Enum\Av1FramerateConversionAlgorithm; use AsyncAws\MediaConvert\Enum\Av1RateControlMode; use AsyncAws\MediaConvert\Enum\Av1SpatialAdaptiveQuantization; +use AsyncAws\MediaConvert\Enum\FrameMetricType; /** * Required when you set Codec, under VideoDescription>CodecSettings to the value AV1. @@ -113,6 +114,24 @@ final class Av1Settings */ private $numberBframesBetweenReferenceFrames; + /** + * Optionally choose one or more per frame metric reports to generate along with your output. You can use these metrics + * to analyze your video output according to one or more commonly used image quality metrics. You can specify per frame + * metrics for output groups or for individual outputs. When you do, MediaConvert writes a CSV (Comma-Separated Values) + * file to your S3 output destination, named after the video, video codec, and metric type. For example: + * video_h264_PSNR.csv Jobs that generate per frame metrics will take longer to complete, depending on the resolution + * and complexity of your output. For example, some 4K jobs might take up to twice as long to complete. Note that when + * analyzing the video quality of your output, or when comparing the video quality of multiple different outputs, we + * generally also recommend a detailed visual review in a controlled environment. You can choose from the following per + * frame metrics: * PSNR: Peak Signal-to-Noise Ratio * SSIM: Structural Similarity Index Measure * MS_SSIM: Multi-Scale + * Similarity Index Measure * PSNR_HVS: Peak Signal-to-Noise Ratio, Human Visual System * VMAF: Video Multi-Method + * Assessment Fusion * QVBR: Quality-Defined Variable Bitrate. This option is only available when your output uses the + * QVBR rate control mode. + * + * @var list|null + */ + private $perFrameMetrics; + /** * Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set * QVBR for Rate control mode. @@ -166,6 +185,7 @@ final class Av1Settings * GopSize?: null|float, * MaxBitrate?: null|int, * NumberBFramesBetweenReferenceFrames?: null|int, + * PerFrameMetrics?: null|array, * QvbrSettings?: null|Av1QvbrSettings|array, * RateControlMode?: null|Av1RateControlMode::*, * Slices?: null|int, @@ -184,6 +204,7 @@ public function __construct(array $input) $this->gopSize = $input['GopSize'] ?? null; $this->maxBitrate = $input['MaxBitrate'] ?? null; $this->numberBframesBetweenReferenceFrames = $input['NumberBFramesBetweenReferenceFrames'] ?? null; + $this->perFrameMetrics = $input['PerFrameMetrics'] ?? null; $this->qvbrSettings = isset($input['QvbrSettings']) ? Av1QvbrSettings::create($input['QvbrSettings']) : null; $this->rateControlMode = $input['RateControlMode'] ?? null; $this->slices = $input['Slices'] ?? null; @@ -202,6 +223,7 @@ public function __construct(array $input) * GopSize?: null|float, * MaxBitrate?: null|int, * NumberBFramesBetweenReferenceFrames?: null|int, + * PerFrameMetrics?: null|array, * QvbrSettings?: null|Av1QvbrSettings|array, * RateControlMode?: null|Av1RateControlMode::*, * Slices?: null|int, @@ -278,6 +300,14 @@ public function getNumberBframesBetweenReferenceFrames(): ?int return $this->numberBframesBetweenReferenceFrames; } + /** + * @return list + */ + public function getPerFrameMetrics(): array + { + return $this->perFrameMetrics ?? []; + } + public function getQvbrSettings(): ?Av1QvbrSettings { return $this->qvbrSettings; @@ -355,6 +385,17 @@ public function requestBody(): array if (null !== $v = $this->numberBframesBetweenReferenceFrames) { $payload['numberBFramesBetweenReferenceFrames'] = $v; } + if (null !== $v = $this->perFrameMetrics) { + $index = -1; + $payload['perFrameMetrics'] = []; + foreach ($v as $listValue) { + ++$index; + if (!FrameMetricType::exists($listValue)) { + throw new InvalidArgument(\sprintf('Invalid parameter "perFrameMetrics" for "%s". The value "%s" is not a valid "FrameMetricType".', __CLASS__, $listValue)); + } + $payload['perFrameMetrics'][$index] = $listValue; + } + } if (null !== $v = $this->qvbrSettings) { $payload['qvbrSettings'] = $v->requestBody(); } diff --git a/src/Service/MediaConvert/src/ValueObject/AvcIntraSettings.php b/src/Service/MediaConvert/src/ValueObject/AvcIntraSettings.php index f168b3fc2..8894c5a61 100644 --- a/src/Service/MediaConvert/src/ValueObject/AvcIntraSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/AvcIntraSettings.php @@ -10,6 +10,7 @@ use AsyncAws\MediaConvert\Enum\AvcIntraScanTypeConversionMode; use AsyncAws\MediaConvert\Enum\AvcIntraSlowPal; use AsyncAws\MediaConvert\Enum\AvcIntraTelecine; +use AsyncAws\MediaConvert\Enum\FrameMetricType; /** * Required when you choose AVC-Intra for your output video codec. For more information about the AVC-Intra settings, @@ -96,6 +97,24 @@ final class AvcIntraSettings */ private $interlaceMode; + /** + * Optionally choose one or more per frame metric reports to generate along with your output. You can use these metrics + * to analyze your video output according to one or more commonly used image quality metrics. You can specify per frame + * metrics for output groups or for individual outputs. When you do, MediaConvert writes a CSV (Comma-Separated Values) + * file to your S3 output destination, named after the video, video codec, and metric type. For example: + * video_h264_PSNR.csv Jobs that generate per frame metrics will take longer to complete, depending on the resolution + * and complexity of your output. For example, some 4K jobs might take up to twice as long to complete. Note that when + * analyzing the video quality of your output, or when comparing the video quality of multiple different outputs, we + * generally also recommend a detailed visual review in a controlled environment. You can choose from the following per + * frame metrics: * PSNR: Peak Signal-to-Noise Ratio * SSIM: Structural Similarity Index Measure * MS_SSIM: Multi-Scale + * Similarity Index Measure * PSNR_HVS: Peak Signal-to-Noise Ratio, Human Visual System * VMAF: Video Multi-Method + * Assessment Fusion * QVBR: Quality-Defined Variable Bitrate. This option is only available when your output uses the + * QVBR rate control mode. + * + * @var list|null + */ + private $perFrameMetrics; + /** * Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this * situation, choose Optimized interlacing to create a better quality interlaced output. In this case, each progressive @@ -139,6 +158,7 @@ final class AvcIntraSettings * FramerateDenominator?: null|int, * FramerateNumerator?: null|int, * InterlaceMode?: null|AvcIntraInterlaceMode::*, + * PerFrameMetrics?: null|array, * ScanTypeConversionMode?: null|AvcIntraScanTypeConversionMode::*, * SlowPal?: null|AvcIntraSlowPal::*, * Telecine?: null|AvcIntraTelecine::*, @@ -153,6 +173,7 @@ public function __construct(array $input) $this->framerateDenominator = $input['FramerateDenominator'] ?? null; $this->framerateNumerator = $input['FramerateNumerator'] ?? null; $this->interlaceMode = $input['InterlaceMode'] ?? null; + $this->perFrameMetrics = $input['PerFrameMetrics'] ?? null; $this->scanTypeConversionMode = $input['ScanTypeConversionMode'] ?? null; $this->slowPal = $input['SlowPal'] ?? null; $this->telecine = $input['Telecine'] ?? null; @@ -167,6 +188,7 @@ public function __construct(array $input) * FramerateDenominator?: null|int, * FramerateNumerator?: null|int, * InterlaceMode?: null|AvcIntraInterlaceMode::*, + * PerFrameMetrics?: null|array, * ScanTypeConversionMode?: null|AvcIntraScanTypeConversionMode::*, * SlowPal?: null|AvcIntraSlowPal::*, * Telecine?: null|AvcIntraTelecine::*, @@ -224,6 +246,14 @@ public function getInterlaceMode(): ?string return $this->interlaceMode; } + /** + * @return list + */ + public function getPerFrameMetrics(): array + { + return $this->perFrameMetrics ?? []; + } + /** * @return AvcIntraScanTypeConversionMode::*|null */ @@ -287,6 +317,17 @@ public function requestBody(): array } $payload['interlaceMode'] = $v; } + if (null !== $v = $this->perFrameMetrics) { + $index = -1; + $payload['perFrameMetrics'] = []; + foreach ($v as $listValue) { + ++$index; + if (!FrameMetricType::exists($listValue)) { + throw new InvalidArgument(\sprintf('Invalid parameter "perFrameMetrics" for "%s". The value "%s" is not a valid "FrameMetricType".', __CLASS__, $listValue)); + } + $payload['perFrameMetrics'][$index] = $listValue; + } + } if (null !== $v = $this->scanTypeConversionMode) { if (!AvcIntraScanTypeConversionMode::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "scanTypeConversionMode" for "%s". The value "%s" is not a valid "AvcIntraScanTypeConversionMode".', __CLASS__, $v)); diff --git a/src/Service/MediaConvert/src/ValueObject/DynamicAudioSelector.php b/src/Service/MediaConvert/src/ValueObject/DynamicAudioSelector.php index d483ff955..31d9a8a74 100644 --- a/src/Service/MediaConvert/src/ValueObject/DynamicAudioSelector.php +++ b/src/Service/MediaConvert/src/ValueObject/DynamicAudioSelector.php @@ -10,9 +10,9 @@ /** * Use Dynamic audio selectors when you do not know the track layout of your source when you submit your job, but want * to select multiple audio tracks. When you include an audio track in your output and specify this Dynamic audio - * selector as the Audio source, MediaConvert creates an output audio track for each dynamically selected track. Note - * that when you include a Dynamic audio selector for two or more inputs, each input must have the same number of audio - * tracks and audio channels. + * selector as the Audio source, MediaConvert creates an audio track within that output for each dynamically selected + * track. Note that when you include a Dynamic audio selector for two or more inputs, each input must have the same + * number of audio tracks and audio channels. */ final class DynamicAudioSelector { diff --git a/src/Service/MediaConvert/src/ValueObject/H264Settings.php b/src/Service/MediaConvert/src/ValueObject/H264Settings.php index 6f0fdb383..fa6419fc5 100644 --- a/src/Service/MediaConvert/src/ValueObject/H264Settings.php +++ b/src/Service/MediaConvert/src/ValueObject/H264Settings.php @@ -3,6 +3,7 @@ namespace AsyncAws\MediaConvert\ValueObject; use AsyncAws\Core\Exception\InvalidArgument; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\H264AdaptiveQuantization; use AsyncAws\MediaConvert\Enum\H264CodecLevel; use AsyncAws\MediaConvert\Enum\H264CodecProfile; @@ -332,6 +333,24 @@ final class H264Settings */ private $parNumerator; + /** + * Optionally choose one or more per frame metric reports to generate along with your output. You can use these metrics + * to analyze your video output according to one or more commonly used image quality metrics. You can specify per frame + * metrics for output groups or for individual outputs. When you do, MediaConvert writes a CSV (Comma-Separated Values) + * file to your S3 output destination, named after the video, video codec, and metric type. For example: + * video_h264_PSNR.csv Jobs that generate per frame metrics will take longer to complete, depending on the resolution + * and complexity of your output. For example, some 4K jobs might take up to twice as long to complete. Note that when + * analyzing the video quality of your output, or when comparing the video quality of multiple different outputs, we + * generally also recommend a detailed visual review in a controlled environment. You can choose from the following per + * frame metrics: * PSNR: Peak Signal-to-Noise Ratio * SSIM: Structural Similarity Index Measure * MS_SSIM: Multi-Scale + * Similarity Index Measure * PSNR_HVS: Peak Signal-to-Noise Ratio, Human Visual System * VMAF: Video Multi-Method + * Assessment Fusion * QVBR: Quality-Defined Variable Bitrate. This option is only available when your output uses the + * QVBR rate control mode. + * + * @var list|null + */ + private $perFrameMetrics; + /** * The Quality tuning level you choose represents a trade-off between the encoding speed of your job and the output * video quality. For the fastest encoding speed at the cost of video quality: Choose Single pass. For a good balance @@ -540,6 +559,7 @@ final class H264Settings * ParControl?: null|H264ParControl::*, * ParDenominator?: null|int, * ParNumerator?: null|int, + * PerFrameMetrics?: null|array, * QualityTuningLevel?: null|H264QualityTuningLevel::*, * QvbrSettings?: null|H264QvbrSettings|array, * RateControlMode?: null|H264RateControlMode::*, @@ -589,6 +609,7 @@ public function __construct(array $input) $this->parControl = $input['ParControl'] ?? null; $this->parDenominator = $input['ParDenominator'] ?? null; $this->parNumerator = $input['ParNumerator'] ?? null; + $this->perFrameMetrics = $input['PerFrameMetrics'] ?? null; $this->qualityTuningLevel = $input['QualityTuningLevel'] ?? null; $this->qvbrSettings = isset($input['QvbrSettings']) ? H264QvbrSettings::create($input['QvbrSettings']) : null; $this->rateControlMode = $input['RateControlMode'] ?? null; @@ -638,6 +659,7 @@ public function __construct(array $input) * ParControl?: null|H264ParControl::*, * ParDenominator?: null|int, * ParNumerator?: null|int, + * PerFrameMetrics?: null|array, * QualityTuningLevel?: null|H264QualityTuningLevel::*, * QvbrSettings?: null|H264QvbrSettings|array, * RateControlMode?: null|H264RateControlMode::*, @@ -848,6 +870,14 @@ public function getParNumerator(): ?int return $this->parNumerator; } + /** + * @return list + */ + public function getPerFrameMetrics(): array + { + return $this->perFrameMetrics ?? []; + } + /** * @return H264QualityTuningLevel::*|null */ @@ -1102,6 +1132,17 @@ public function requestBody(): array if (null !== $v = $this->parNumerator) { $payload['parNumerator'] = $v; } + if (null !== $v = $this->perFrameMetrics) { + $index = -1; + $payload['perFrameMetrics'] = []; + foreach ($v as $listValue) { + ++$index; + if (!FrameMetricType::exists($listValue)) { + throw new InvalidArgument(\sprintf('Invalid parameter "perFrameMetrics" for "%s". The value "%s" is not a valid "FrameMetricType".', __CLASS__, $listValue)); + } + $payload['perFrameMetrics'][$index] = $listValue; + } + } if (null !== $v = $this->qualityTuningLevel) { if (!H264QualityTuningLevel::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "qualityTuningLevel" for "%s". The value "%s" is not a valid "H264QualityTuningLevel".', __CLASS__, $v)); diff --git a/src/Service/MediaConvert/src/ValueObject/H265Settings.php b/src/Service/MediaConvert/src/ValueObject/H265Settings.php index 843528937..5af174878 100644 --- a/src/Service/MediaConvert/src/ValueObject/H265Settings.php +++ b/src/Service/MediaConvert/src/ValueObject/H265Settings.php @@ -3,6 +3,7 @@ namespace AsyncAws\MediaConvert\ValueObject; use AsyncAws\Core\Exception\InvalidArgument; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\H265AdaptiveQuantization; use AsyncAws\MediaConvert\Enum\H265AlternateTransferFunctionSei; use AsyncAws\MediaConvert\Enum\H265CodecLevel; @@ -329,6 +330,24 @@ final class H265Settings */ private $parNumerator; + /** + * Optionally choose one or more per frame metric reports to generate along with your output. You can use these metrics + * to analyze your video output according to one or more commonly used image quality metrics. You can specify per frame + * metrics for output groups or for individual outputs. When you do, MediaConvert writes a CSV (Comma-Separated Values) + * file to your S3 output destination, named after the video, video codec, and metric type. For example: + * video_h264_PSNR.csv Jobs that generate per frame metrics will take longer to complete, depending on the resolution + * and complexity of your output. For example, some 4K jobs might take up to twice as long to complete. Note that when + * analyzing the video quality of your output, or when comparing the video quality of multiple different outputs, we + * generally also recommend a detailed visual review in a controlled environment. You can choose from the following per + * frame metrics: * PSNR: Peak Signal-to-Noise Ratio * SSIM: Structural Similarity Index Measure * MS_SSIM: Multi-Scale + * Similarity Index Measure * PSNR_HVS: Peak Signal-to-Noise Ratio, Human Visual System * VMAF: Video Multi-Method + * Assessment Fusion * QVBR: Quality-Defined Variable Bitrate. This option is only available when your output uses the + * QVBR rate control mode. + * + * @var list|null + */ + private $perFrameMetrics; + /** * Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video quality. The * default behavior is faster, lower quality, single-pass encoding. @@ -512,6 +531,7 @@ final class H265Settings * ParControl?: null|H265ParControl::*, * ParDenominator?: null|int, * ParNumerator?: null|int, + * PerFrameMetrics?: null|array, * QualityTuningLevel?: null|H265QualityTuningLevel::*, * QvbrSettings?: null|H265QvbrSettings|array, * RateControlMode?: null|H265RateControlMode::*, @@ -560,6 +580,7 @@ public function __construct(array $input) $this->parControl = $input['ParControl'] ?? null; $this->parDenominator = $input['ParDenominator'] ?? null; $this->parNumerator = $input['ParNumerator'] ?? null; + $this->perFrameMetrics = $input['PerFrameMetrics'] ?? null; $this->qualityTuningLevel = $input['QualityTuningLevel'] ?? null; $this->qvbrSettings = isset($input['QvbrSettings']) ? H265QvbrSettings::create($input['QvbrSettings']) : null; $this->rateControlMode = $input['RateControlMode'] ?? null; @@ -608,6 +629,7 @@ public function __construct(array $input) * ParControl?: null|H265ParControl::*, * ParDenominator?: null|int, * ParNumerator?: null|int, + * PerFrameMetrics?: null|array, * QualityTuningLevel?: null|H265QualityTuningLevel::*, * QvbrSettings?: null|H265QvbrSettings|array, * RateControlMode?: null|H265RateControlMode::*, @@ -817,6 +839,14 @@ public function getParNumerator(): ?int return $this->parNumerator; } + /** + * @return list + */ + public function getPerFrameMetrics(): array + { + return $this->perFrameMetrics ?? []; + } + /** * @return H265QualityTuningLevel::*|null */ @@ -1066,6 +1096,17 @@ public function requestBody(): array if (null !== $v = $this->parNumerator) { $payload['parNumerator'] = $v; } + if (null !== $v = $this->perFrameMetrics) { + $index = -1; + $payload['perFrameMetrics'] = []; + foreach ($v as $listValue) { + ++$index; + if (!FrameMetricType::exists($listValue)) { + throw new InvalidArgument(\sprintf('Invalid parameter "perFrameMetrics" for "%s". The value "%s" is not a valid "FrameMetricType".', __CLASS__, $listValue)); + } + $payload['perFrameMetrics'][$index] = $listValue; + } + } if (null !== $v = $this->qualityTuningLevel) { if (!H265QualityTuningLevel::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "qualityTuningLevel" for "%s". The value "%s" is not a valid "H265QualityTuningLevel".', __CLASS__, $v)); diff --git a/src/Service/MediaConvert/src/ValueObject/Mpeg2Settings.php b/src/Service/MediaConvert/src/ValueObject/Mpeg2Settings.php index 64b425e69..188a5e3b4 100644 --- a/src/Service/MediaConvert/src/ValueObject/Mpeg2Settings.php +++ b/src/Service/MediaConvert/src/ValueObject/Mpeg2Settings.php @@ -3,6 +3,7 @@ namespace AsyncAws\MediaConvert\ValueObject; use AsyncAws\Core\Exception\InvalidArgument; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\Mpeg2AdaptiveQuantization; use AsyncAws\MediaConvert\Enum\Mpeg2CodecLevel; use AsyncAws\MediaConvert\Enum\Mpeg2CodecProfile; @@ -246,6 +247,24 @@ final class Mpeg2Settings */ private $parNumerator; + /** + * Optionally choose one or more per frame metric reports to generate along with your output. You can use these metrics + * to analyze your video output according to one or more commonly used image quality metrics. You can specify per frame + * metrics for output groups or for individual outputs. When you do, MediaConvert writes a CSV (Comma-Separated Values) + * file to your S3 output destination, named after the video, video codec, and metric type. For example: + * video_h264_PSNR.csv Jobs that generate per frame metrics will take longer to complete, depending on the resolution + * and complexity of your output. For example, some 4K jobs might take up to twice as long to complete. Note that when + * analyzing the video quality of your output, or when comparing the video quality of multiple different outputs, we + * generally also recommend a detailed visual review in a controlled environment. You can choose from the following per + * frame metrics: * PSNR: Peak Signal-to-Noise Ratio * SSIM: Structural Similarity Index Measure * MS_SSIM: Multi-Scale + * Similarity Index Measure * PSNR_HVS: Peak Signal-to-Noise Ratio, Human Visual System * VMAF: Video Multi-Method + * Assessment Fusion * QVBR: Quality-Defined Variable Bitrate. This option is only available when your output uses the + * QVBR rate control mode. + * + * @var list|null + */ + private $perFrameMetrics; + /** * Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video quality. The * default behavior is faster, lower quality, single-pass encoding. @@ -379,6 +398,7 @@ final class Mpeg2Settings * ParControl?: null|Mpeg2ParControl::*, * ParDenominator?: null|int, * ParNumerator?: null|int, + * PerFrameMetrics?: null|array, * QualityTuningLevel?: null|Mpeg2QualityTuningLevel::*, * RateControlMode?: null|Mpeg2RateControlMode::*, * ScanTypeConversionMode?: null|Mpeg2ScanTypeConversionMode::*, @@ -416,6 +436,7 @@ public function __construct(array $input) $this->parControl = $input['ParControl'] ?? null; $this->parDenominator = $input['ParDenominator'] ?? null; $this->parNumerator = $input['ParNumerator'] ?? null; + $this->perFrameMetrics = $input['PerFrameMetrics'] ?? null; $this->qualityTuningLevel = $input['QualityTuningLevel'] ?? null; $this->rateControlMode = $input['RateControlMode'] ?? null; $this->scanTypeConversionMode = $input['ScanTypeConversionMode'] ?? null; @@ -453,6 +474,7 @@ public function __construct(array $input) * ParControl?: null|Mpeg2ParControl::*, * ParDenominator?: null|int, * ParNumerator?: null|int, + * PerFrameMetrics?: null|array, * QualityTuningLevel?: null|Mpeg2QualityTuningLevel::*, * RateControlMode?: null|Mpeg2RateControlMode::*, * ScanTypeConversionMode?: null|Mpeg2ScanTypeConversionMode::*, @@ -615,6 +637,14 @@ public function getParNumerator(): ?int return $this->parNumerator; } + /** + * @return list + */ + public function getPerFrameMetrics(): array + { + return $this->perFrameMetrics ?? []; + } + /** * @return Mpeg2QualityTuningLevel::*|null */ @@ -797,6 +827,17 @@ public function requestBody(): array if (null !== $v = $this->parNumerator) { $payload['parNumerator'] = $v; } + if (null !== $v = $this->perFrameMetrics) { + $index = -1; + $payload['perFrameMetrics'] = []; + foreach ($v as $listValue) { + ++$index; + if (!FrameMetricType::exists($listValue)) { + throw new InvalidArgument(\sprintf('Invalid parameter "perFrameMetrics" for "%s". The value "%s" is not a valid "FrameMetricType".', __CLASS__, $listValue)); + } + $payload['perFrameMetrics'][$index] = $listValue; + } + } if (null !== $v = $this->qualityTuningLevel) { if (!Mpeg2QualityTuningLevel::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "qualityTuningLevel" for "%s". The value "%s" is not a valid "Mpeg2QualityTuningLevel".', __CLASS__, $v)); diff --git a/src/Service/MediaConvert/src/ValueObject/OutputGroupSettings.php b/src/Service/MediaConvert/src/ValueObject/OutputGroupSettings.php index 39cfff552..f17342e8b 100644 --- a/src/Service/MediaConvert/src/ValueObject/OutputGroupSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/OutputGroupSettings.php @@ -3,6 +3,7 @@ namespace AsyncAws\MediaConvert\ValueObject; use AsyncAws\Core\Exception\InvalidArgument; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\OutputGroupType; /** @@ -50,6 +51,24 @@ final class OutputGroupSettings */ private $msSmoothGroupSettings; + /** + * Optionally choose one or more per frame metric reports to generate along with your output. You can use these metrics + * to analyze your video output according to one or more commonly used image quality metrics. You can specify per frame + * metrics for output groups or for individual outputs. When you do, MediaConvert writes a CSV (Comma-Separated Values) + * file to your S3 output destination, named after the video, video codec, and metric type. For example: + * video_h264_PSNR.csv Jobs that generate per frame metrics will take longer to complete, depending on the resolution + * and complexity of your output. For example, some 4K jobs might take up to twice as long to complete. Note that when + * analyzing the video quality of your output, or when comparing the video quality of multiple different outputs, we + * generally also recommend a detailed visual review in a controlled environment. You can choose from the following per + * frame metrics: * PSNR: Peak Signal-to-Noise Ratio * SSIM: Structural Similarity Index Measure * MS_SSIM: Multi-Scale + * Similarity Index Measure * PSNR_HVS: Peak Signal-to-Noise Ratio, Human Visual System * VMAF: Video Multi-Method + * Assessment Fusion * QVBR: Quality-Defined Variable Bitrate. This option is only available when your output uses the + * QVBR rate control mode. + * + * @var list|null + */ + private $perFrameMetrics; + /** * Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, CMAF). * @@ -64,6 +83,7 @@ final class OutputGroupSettings * FileGroupSettings?: null|FileGroupSettings|array, * HlsGroupSettings?: null|HlsGroupSettings|array, * MsSmoothGroupSettings?: null|MsSmoothGroupSettings|array, + * PerFrameMetrics?: null|array, * Type?: null|OutputGroupType::*, * } $input */ @@ -74,6 +94,7 @@ public function __construct(array $input) $this->fileGroupSettings = isset($input['FileGroupSettings']) ? FileGroupSettings::create($input['FileGroupSettings']) : null; $this->hlsGroupSettings = isset($input['HlsGroupSettings']) ? HlsGroupSettings::create($input['HlsGroupSettings']) : null; $this->msSmoothGroupSettings = isset($input['MsSmoothGroupSettings']) ? MsSmoothGroupSettings::create($input['MsSmoothGroupSettings']) : null; + $this->perFrameMetrics = $input['PerFrameMetrics'] ?? null; $this->type = $input['Type'] ?? null; } @@ -84,6 +105,7 @@ public function __construct(array $input) * FileGroupSettings?: null|FileGroupSettings|array, * HlsGroupSettings?: null|HlsGroupSettings|array, * MsSmoothGroupSettings?: null|MsSmoothGroupSettings|array, + * PerFrameMetrics?: null|array, * Type?: null|OutputGroupType::*, * }|OutputGroupSettings $input */ @@ -117,6 +139,14 @@ public function getMsSmoothGroupSettings(): ?MsSmoothGroupSettings return $this->msSmoothGroupSettings; } + /** + * @return list + */ + public function getPerFrameMetrics(): array + { + return $this->perFrameMetrics ?? []; + } + /** * @return OutputGroupType::*|null */ @@ -146,6 +176,17 @@ public function requestBody(): array if (null !== $v = $this->msSmoothGroupSettings) { $payload['msSmoothGroupSettings'] = $v->requestBody(); } + if (null !== $v = $this->perFrameMetrics) { + $index = -1; + $payload['perFrameMetrics'] = []; + foreach ($v as $listValue) { + ++$index; + if (!FrameMetricType::exists($listValue)) { + throw new InvalidArgument(\sprintf('Invalid parameter "perFrameMetrics" for "%s". The value "%s" is not a valid "FrameMetricType".', __CLASS__, $listValue)); + } + $payload['perFrameMetrics'][$index] = $listValue; + } + } if (null !== $v = $this->type) { if (!OutputGroupType::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "OutputGroupType".', __CLASS__, $v)); diff --git a/src/Service/MediaConvert/src/ValueObject/ProresSettings.php b/src/Service/MediaConvert/src/ValueObject/ProresSettings.php index f6b83aeaf..e5aee2b41 100644 --- a/src/Service/MediaConvert/src/ValueObject/ProresSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/ProresSettings.php @@ -3,6 +3,7 @@ namespace AsyncAws\MediaConvert\ValueObject; use AsyncAws\Core\Exception\InvalidArgument; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\ProresChromaSampling; use AsyncAws\MediaConvert\Enum\ProresCodecProfile; use AsyncAws\MediaConvert\Enum\ProresFramerateControl; @@ -127,6 +128,24 @@ final class ProresSettings */ private $parNumerator; + /** + * Optionally choose one or more per frame metric reports to generate along with your output. You can use these metrics + * to analyze your video output according to one or more commonly used image quality metrics. You can specify per frame + * metrics for output groups or for individual outputs. When you do, MediaConvert writes a CSV (Comma-Separated Values) + * file to your S3 output destination, named after the video, video codec, and metric type. For example: + * video_h264_PSNR.csv Jobs that generate per frame metrics will take longer to complete, depending on the resolution + * and complexity of your output. For example, some 4K jobs might take up to twice as long to complete. Note that when + * analyzing the video quality of your output, or when comparing the video quality of multiple different outputs, we + * generally also recommend a detailed visual review in a controlled environment. You can choose from the following per + * frame metrics: * PSNR: Peak Signal-to-Noise Ratio * SSIM: Structural Similarity Index Measure * MS_SSIM: Multi-Scale + * Similarity Index Measure * PSNR_HVS: Peak Signal-to-Noise Ratio, Human Visual System * VMAF: Video Multi-Method + * Assessment Fusion * QVBR: Quality-Defined Variable Bitrate. This option is only available when your output uses the + * QVBR rate control mode. + * + * @var list|null + */ + private $perFrameMetrics; + /** * Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this * situation, choose Optimized interlacing to create a better quality interlaced output. In this case, each progressive @@ -173,6 +192,7 @@ final class ProresSettings * ParControl?: null|ProresParControl::*, * ParDenominator?: null|int, * ParNumerator?: null|int, + * PerFrameMetrics?: null|array, * ScanTypeConversionMode?: null|ProresScanTypeConversionMode::*, * SlowPal?: null|ProresSlowPal::*, * Telecine?: null|ProresTelecine::*, @@ -190,6 +210,7 @@ public function __construct(array $input) $this->parControl = $input['ParControl'] ?? null; $this->parDenominator = $input['ParDenominator'] ?? null; $this->parNumerator = $input['ParNumerator'] ?? null; + $this->perFrameMetrics = $input['PerFrameMetrics'] ?? null; $this->scanTypeConversionMode = $input['ScanTypeConversionMode'] ?? null; $this->slowPal = $input['SlowPal'] ?? null; $this->telecine = $input['Telecine'] ?? null; @@ -207,6 +228,7 @@ public function __construct(array $input) * ParControl?: null|ProresParControl::*, * ParDenominator?: null|int, * ParNumerator?: null|int, + * PerFrameMetrics?: null|array, * ScanTypeConversionMode?: null|ProresScanTypeConversionMode::*, * SlowPal?: null|ProresSlowPal::*, * Telecine?: null|ProresTelecine::*, @@ -285,6 +307,14 @@ public function getParNumerator(): ?int return $this->parNumerator; } + /** + * @return list + */ + public function getPerFrameMetrics(): array + { + return $this->perFrameMetrics ?? []; + } + /** * @return ProresScanTypeConversionMode::*|null */ @@ -363,6 +393,17 @@ public function requestBody(): array if (null !== $v = $this->parNumerator) { $payload['parNumerator'] = $v; } + if (null !== $v = $this->perFrameMetrics) { + $index = -1; + $payload['perFrameMetrics'] = []; + foreach ($v as $listValue) { + ++$index; + if (!FrameMetricType::exists($listValue)) { + throw new InvalidArgument(\sprintf('Invalid parameter "perFrameMetrics" for "%s". The value "%s" is not a valid "FrameMetricType".', __CLASS__, $listValue)); + } + $payload['perFrameMetrics'][$index] = $listValue; + } + } if (null !== $v = $this->scanTypeConversionMode) { if (!ProresScanTypeConversionMode::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "scanTypeConversionMode" for "%s". The value "%s" is not a valid "ProresScanTypeConversionMode".', __CLASS__, $v)); diff --git a/src/Service/MediaConvert/src/ValueObject/XavcSettings.php b/src/Service/MediaConvert/src/ValueObject/XavcSettings.php index 6de9876a8..e4844a2d7 100644 --- a/src/Service/MediaConvert/src/ValueObject/XavcSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/XavcSettings.php @@ -3,6 +3,7 @@ namespace AsyncAws\MediaConvert\ValueObject; use AsyncAws\Core\Exception\InvalidArgument; +use AsyncAws\MediaConvert\Enum\FrameMetricType; use AsyncAws\MediaConvert\Enum\XavcAdaptiveQuantization; use AsyncAws\MediaConvert\Enum\XavcEntropyEncoding; use AsyncAws\MediaConvert\Enum\XavcFramerateControl; @@ -84,6 +85,24 @@ final class XavcSettings */ private $framerateNumerator; + /** + * Optionally choose one or more per frame metric reports to generate along with your output. You can use these metrics + * to analyze your video output according to one or more commonly used image quality metrics. You can specify per frame + * metrics for output groups or for individual outputs. When you do, MediaConvert writes a CSV (Comma-Separated Values) + * file to your S3 output destination, named after the video, video codec, and metric type. For example: + * video_h264_PSNR.csv Jobs that generate per frame metrics will take longer to complete, depending on the resolution + * and complexity of your output. For example, some 4K jobs might take up to twice as long to complete. Note that when + * analyzing the video quality of your output, or when comparing the video quality of multiple different outputs, we + * generally also recommend a detailed visual review in a controlled environment. You can choose from the following per + * frame metrics: * PSNR: Peak Signal-to-Noise Ratio * SSIM: Structural Similarity Index Measure * MS_SSIM: Multi-Scale + * Similarity Index Measure * PSNR_HVS: Peak Signal-to-Noise Ratio, Human Visual System * VMAF: Video Multi-Method + * Assessment Fusion * QVBR: Quality-Defined Variable Bitrate. This option is only available when your output uses the + * QVBR rate control mode. + * + * @var list|null + */ + private $perFrameMetrics; + /** * Specify the XAVC profile for this output. For more information, see the Sony documentation at * https://www.xavc-info.org/. Note that MediaConvert doesn't support the interlaced video XAVC operating points for @@ -194,6 +213,7 @@ final class XavcSettings * FramerateConversionAlgorithm?: null|XavcFramerateConversionAlgorithm::*, * FramerateDenominator?: null|int, * FramerateNumerator?: null|int, + * PerFrameMetrics?: null|array, * Profile?: null|XavcProfile::*, * SlowPal?: null|XavcSlowPal::*, * Softness?: null|int, @@ -214,6 +234,7 @@ public function __construct(array $input) $this->framerateConversionAlgorithm = $input['FramerateConversionAlgorithm'] ?? null; $this->framerateDenominator = $input['FramerateDenominator'] ?? null; $this->framerateNumerator = $input['FramerateNumerator'] ?? null; + $this->perFrameMetrics = $input['PerFrameMetrics'] ?? null; $this->profile = $input['Profile'] ?? null; $this->slowPal = $input['SlowPal'] ?? null; $this->softness = $input['Softness'] ?? null; @@ -234,6 +255,7 @@ public function __construct(array $input) * FramerateConversionAlgorithm?: null|XavcFramerateConversionAlgorithm::*, * FramerateDenominator?: null|int, * FramerateNumerator?: null|int, + * PerFrameMetrics?: null|array, * Profile?: null|XavcProfile::*, * SlowPal?: null|XavcSlowPal::*, * Softness?: null|int, @@ -293,6 +315,14 @@ public function getFramerateNumerator(): ?int return $this->framerateNumerator; } + /** + * @return list + */ + public function getPerFrameMetrics(): array + { + return $this->perFrameMetrics ?? []; + } + /** * @return XavcProfile::*|null */ @@ -391,6 +421,17 @@ public function requestBody(): array if (null !== $v = $this->framerateNumerator) { $payload['framerateNumerator'] = $v; } + if (null !== $v = $this->perFrameMetrics) { + $index = -1; + $payload['perFrameMetrics'] = []; + foreach ($v as $listValue) { + ++$index; + if (!FrameMetricType::exists($listValue)) { + throw new InvalidArgument(\sprintf('Invalid parameter "perFrameMetrics" for "%s". The value "%s" is not a valid "FrameMetricType".', __CLASS__, $listValue)); + } + $payload['perFrameMetrics'][$index] = $listValue; + } + } if (null !== $v = $this->profile) { if (!XavcProfile::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "profile" for "%s". The value "%s" is not a valid "XavcProfile".', __CLASS__, $v));