

# Disabling content quality analysis
<a name="disable-content-quality-analysis"></a>

You can disable the content quality analysis feature without losing your previously configured settings for individual metrics. If you re-enable content quality analysis in the future, your custom thresholds for individual metrics are preserved so that you don’t have to reconfigure them. 

This page guides you through the process of disabling the content quality analysis feature.

## Prerequisites
<a name="disable-content-quality-analysis-prerequisites"></a>

The following procedure assumes that you have already enabled content quality analysis for a flow. You can disable content quality analysis on an active or inactive flow. If the flow is active, you don't have to stop it first.

## Procedure
<a name="disable-content-quality-analysis-procedure"></a>

You can disable content quality analysis through the AWS Management Console, the AWS CLI, and the MediaConnect API.

------
#### [ Console ]

**To disable content quality analysis**

1. Open the MediaConnect console at [https://console.aws.amazon.com/mediaconnect/](https://console.aws.amazon.com/mediaconnect/).

1. From the **Flows** screen, select the flow for which you want to disable content quality analysis.

1. On the flow details page, choose the **Sources** tab.

1. In the **Source monitoring configuration **section, choose **Edit**.

1. Choose one of the following options:

   1. To disable all metrics, turn off **Content quality analysis state**.

   1. To disable specific metrics, turn off one or more of the following metrics:  
****    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/disable-content-quality-analysis.html)

1. Choose **Update **to save your changes.

------
#### [ AWS CLI ]

**To disable all metrics**  
Run the [update-flow](https://docs.aws.amazon.com/cli/latest/reference/mediaconnect/update-flow.html) command as shown in the following example:

```
aws mediaconnect update-flow \
--flow-arn "flowARN" \
--source-monitoring-config ContentQualityAnalysisState=DISABLED
```

In the following example response, `ContentQualityAnalysisState` is now disabled, but individual metric settings remain unchanged:

```
{
   "Flow": {
              "FlowArn": "<arn>",
              ...
              "SourceMonitoringConfig": {
                "ContentQualityAnalysisState": "DISABLED",
                "ThumbnailState": "ENABLED",
                "AudioMonitoringSettings": [
                    {
                        "SilentAudio": {
                            "State": "ENABLED",
                            "ThresholdSeconds": 30
                        }
                    }
                ],
                "VideoMonitoringSettings": [
                    {
                        "BlackFrames": {
                            "State": "ENABLED",
                            "ThresholdSeconds": 30
                        },
                        "FrozenFrames": {
                            "State": "ENABLED",
                            "ThresholdSeconds": 10
                        }
                    }
                ]
            }
         }
}
```

**Note**  
When `ContentQualityAnalysisState` is set to `DISABLED`, it takes precedence over the individual metric settings. This means that even though individual metrics (`SilentAudio`, `BlackFrames`, `FrozenFrames`) show as `ENABLED`, they are not active. This enables you to maintain your preferred configuration for individual metrics without having to reconfigure them each time you toggle the overall `ContentQualityAnalysisState`.  
When you want to re-enable content quality analysis, set `ContentQualityAnalysisState` back to `ENABLED`. Your previously configured individual metric settings will then become active again.

**To disable specific metrics**  
Run the [update-flow](https://docs.aws.amazon.com/cli/latest/reference/mediaconnect/update-flow.html) command with the `--source-monitoring-config parameter` configured as shown below. 

The following example command disables the two video monitoring metrics while preserving the custom thresholds for future use: 

```
aws mediaconnect update-flow \
 --flow-arn "FlowArn" \
 --source-monitoring-config ContentQualityAnalysisState=ENABLED \
 '{"VideoMonitoringSettings": [ \
 {"FrozenFrames": {"State": "DISABLED", "ThresholdSeconds": 10}}, \
 {"BlackFrames": {"State": "DISABLED", "ThresholdSeconds": 15}}], \
 "AudioMonitoringSettings": [ \
 {"SilentAudio": {"State": "ENABLED", "ThresholdSeconds": 25}}]}'
```

In the following example response, `ContentQualityAnalysisState` remains enabled, but both of the video monitoring metrics are now disabled:

```
{
   "Flow": {
              "FlowArn": <arn>,
              ...
              "SourceMonitoringConfig": {
                "ContentQualityAnalysisState": "ENABLED",
                "AudioMonitoringSettings": [
                    {
                        "SilentAudio": {
                            "State": "ENABLED",
                            "ThresholdSeconds": 25
                        }
                    }
                ],
                "VideoMonitoringSettings": [
                    {
                        "BlackFrames": {
                            "State": "DISABLED",
                            "ThresholdSeconds": 15
                        },
                        "FrozenFrames": {
                            "State": "DISABLED",
                            "ThresholdSeconds": 10
                        }
                    }
                ]
            }
         }
}
```

Keep in mind the following:
+ You don’t have to change or remove the existing thresholds for individual metrics. If you re-enable content quality analysis in the future, your custom thresholds are preserved so that you don’t have to reconfigure them. 
+ You can disable one, two, or all three of the following metrics: 


****  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/disable-content-quality-analysis.html)

------

## Next steps
<a name="disable-content-quality-analysis-next-steps"></a>

You can re-enable the content quality analysis feature at any time. For instructions, see [Enabling content quality analysis in an existing flow](enable-content-quality-analysis.md#enable-content-quality-analysis-procedure-existing-flow).