insights_to_extract= "AllInsights", # Video Analyzer can also run in Video only mode. mode= "Standard", # Video analyzer can also process audio in basic or standard mode when using All Insights experimental_options= { # Optional settings for preview or experimental features # "SpeechProfanityFilterMode="None" " # Disables the speech-to-text profanity filtering })) # Ensure that you have customized transforms for the AudioAnalyzer. This is really a one time setup operation. print("Creating Audio Analyzer transform...") # Adding transform details my_transform = Transform() my_transform.description = "A simple Audio Analyzer Transform" my_transform.outputs = [audio_transform_output] print(f"Creating transform {audio_transform_name}") transform = client.transforms.create_or_update( resource_group_name=resource_group, account_name=account_name, transform_name=audio_transform_name, parameters=my_transform) print(f"{audio_transform_name} created (or updated if it existed already). ") # Ensure that you have customized transforms for the VideoAnalyzer. This is really a one time setup operation. print("Creating Video Analyzer transform...") # Adding transform details my_transform2 = Transform()
# Create a new Standard encoding Transform for Built-in Copy Codec print(f"Creating Encoding transform named: {transform_name}") # For this snippet, we are using 'BuiltInStandardEncoderPreset' transform_output = TransformOutput( preset=BuiltInStandardEncoderPreset(preset_name="ContentAwareEncoding"), # What should we do with the job if there is an error? on_error=OnErrorType.STOP_PROCESSING_JOB, # What is the relative priority of this job to others? Normal, high or low? relative_priority=Priority.NORMAL) print("Creating encoding transform...") # Adding transform details my_transform = Transform() my_transform.description = "Transform with Stream Files" my_transform.outputs = [transform_output] print(f"Creating transform {transform_name}") transform = client.transforms.create_or_update( resource_group_name=resource_group, account_name=account_name, transform_name=transform_name, parameters=my_transform) print(f"{transform_name} created (or updated if it existed already). ") job_name = 'StreamFilesSample' + uniqueness print(f"Creating custom encoding job {job_name}") files = (source_file) # Create Job Input and Ouput Asset