OTMM Event listener which listen the event Analysis data from Azure is deleted (5006). This event is launched once the Rich Media Analysis (RMA) has finished.
NOTE: The data from Azure is deleted regardless of whether the extraction of media analytics succeeded or not.
Once the Analysis data from Azure is deleted the transcription is available (only when the RMA has finished successfully).
This add-on search for bad words in the video transcription, stored on ARTESIA.FIELD.MEDIAANALYSIS.VIDEO.SPEECH.TEXT field. If some bad words are found, It are stored in this custom fields:
- CUSTOM.FIELD.MEDIAANALYSIS.VIDEO.SPEECH.PROFANITY.BAD_WORD
- CUSTOM.FIELD.MEDIAANALYSIS.VIDEO.SPEECH.PROFANITY.START.TIME
NOTE: These custom field must be created from TEAMS admin panel.
- Copy this paragraph:
<!-- Custom event listener (Profanity detection) -->
<listener>
<listener-class>com.opentext.otmm.sc.evenlistener.AnalysisDataFromAzureIsDeletedEventListenerRegistration</listener-class>
</listener>
- Open web.xml file located at C:\Apps\MediaManagement\ear\artesia\otmmux\WEB-INF
- Paste the paragraph under the web-app label
- Copy the folder structure under the <PROJECT_HOME>\bin
- Paste the com folder under C:\Apps\MediaManagement\ear\artesia\otmmux\WEB-INF\classes
Log4j is a simple and flexible logging framework. The most common configuration options issuing log4j2.xml
Follow these steps:
- Copy these text:
<!-- Custom added by Joaquín -->
<Logger name="com.opentext.otmm.sc.evenlistener" level="DEBUG" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="FILE"/>
</Logger>
<Logger name="com.opentext.otmm.sc.evenlistener.handler" level="DEBUG" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="FILE"/>
</Logger>
<Logger name="com.opentext.otmm.sc.evenlistener.helper" level="DEBUG" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="FILE"/>
</Logger>
<Logger name="com.opentext.otmm.sc.evenlistener.util" level="DEBUG" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="FILE"/>
</Logger>
<Logger name="com.opentext.otmm.sc.modules.profanitydetector" level="DEBUG" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="FILE"/>
</Logger>
- Paste the paragraph after the </Loggers> label into C:\Apps\MediaManagement_TomEE\conf\log4j2.xml
In order to store the bad words said in the video you must create some metadata.
- Access to TEAMS (<OTMM_SERVER>/teams)
- Browse to Metadata > Custom table editor at the top menu
- Click on Tabular Metadata tables at the left menu
- Click on New Tabular Metadata table button
- Create a new table called: PROFANITY_VIDEO_TAB
- Add two new fields:
- BAD_WORD (CHARACTER)
- START_TIME (CHARACTER)
- Click on Save button
- Browse to Metadata > Metadata editor at the top menu
- Click on Tabular Fields at the left menu
- Click on New Tabular Field button
- Create a new tabular field called: CUSTOM.TABLE.MEDIA ANALYSIS.PROFANITY
- Id: CUSTOM.TABLE.MEDIA ANALYSIS.PROFANITY
- Name: Profanity
- Database Table: PROFANITY_VIDEO_TAB Tabular Fields
- Add two new fields:
- CUSTOM.FIELD.MEDIAANALYSIS.VIDEO.SPEECH.PROFANITY.BAD_WORD
- CUSTOM.FIELD.MEDIAANALYSIS.VIDEO.SPEECH.PROFANITY.START.TIME
- Click on Save button
- Browse to Metadata > Metadata editor at the top menu
- Click on Field Groups at the left menu
- Click on New Field Group button
- Create a new tabular Field group called: CUSTOM.CATEGORY.MEDIA ANALYSIS VIDEO.PROFANITY
- Id: CUSTOM.CATEGORY.MEDIA ANALYSIS VIDEO.PROFANITY
- Name: Profanity
- Click on Available Tabular Fields tab
- Search Profanity field
- Select Profanity field
- Click on Add selected button
- Click on Save button
- Browse to Metadata > Metadata editor at the top menu
- Click on Models at the left menu
- Click on Edit link close to Time Based Asset Properties (CUSTOM.MODEL.STOCK VIDEO)
- Search Profanity field
- Select Profanity field
- Click on Add selected button
- Click on Save button
NOTE: You can add the Field Group to all the Models that require this information
Once we have created all the metadata you must deploy your changes in your OTMM instance.
- Browse to Metadata > Metadata editor at the top menu
- Click on Validate button at the bottom of the screen
- Click on Apply button at the bottom of the screen
Follow these steps:
- Open SQL Server Management Studio
- Browse to OTMM-BASE (SQL Server - sa) > Databases > MM > Tables
- Select table mm.EVENT_CTXTS
- Edit row with EVENT_ID = 5006 which corresponds with ‘Analysis data from Azure is deleted’ event
- Set IS_ENABLED_EXTERNAL = 'Y'
UPDATE [mm].[EVENT_CTXTS]
SET [IS_ENABLED_EXTERNAL] = 'Y'
WHERE EVENT_ID = '5006'
GO
- Right click on Project folder
- Click on Export
- Select JAR file
- Click on Next
- Select only src folder at Select the resource to export list
- Check Select class files an resource
- Set Select the export destination: JAR file: OTMM-condition-evaluation.jar
- Click on Finish
This section is only included to know the original location of the .jar files used in the project.
Import the indicated set of files to the indicated project folders:
Set 1
- From: C:\Apps\MediaManagement\jars
- artesia-server-tools.jar
- commons-httpclient-3.1.jar
- commons-io-2.6.jar
- commons-logging-1.2.jar
- TEAMS-common.jar
- TEAMS-mock-services.jar
- TEAMS-sdk.jar
- TEAMS-toolkit.jar
- To project folder: lib
Set 2
- From: C:\Apps\MediaManagement_TomEE\lib
- servlet-api.jar
- To project folder: lib
Set 3
- From: C:\Apps\MediaManagement\deploy\commons
- commons-collections-3.2.2.jar
- commons-collections4-4.3.jar
- commons-fileupload-1.3.3.jar
- commons-lang-2.4.jar
- To project folder: lib
Set 4
- From: C:\Apps\MediaManagement\deploy\artesia
- otmm-rest-interfaces.jar
- otmm-server-ext-api.jar
- To project folder: lib
Set 4
- From: *C:\Apps\MediaManagement\ear\artesia*
- artesia-ejb.jar
- To project folder: lib
- Initial version, released on August 2019 - Compatible with OTMM 16.5.2
- Version 20.4, released on January 2021 - Compatible with OTMM 20.4