Closed Caption Live Module and Code


This package includes a single module, ModuleCCDetectLiveCaptions, that detects onTextData, onCaption, onCaptionInfo and CEA-608/CEA-708 closed caption data in a live video stream. When configured, the module will print the detected captions to the log file.

Note: Wowza Media Server 4.0.0 or later is required.

To install

  1. Copy [package]/lib/wms-plugin-cc-detectlivecaptions.jar to the [install-dir]/lib folder.

  2. Add and configure ModuleCCDetectLiveCaptions in [install-dir]/conf/[application]/Application.xml:

    1. Add the ModuleCCDetectLiveCaptions module to the end of the <Modules> list:
      <Module>
      	<Name>ModuleCCDetectLiveCaptions</Name>
      	<Description>ModuleCCDetectLiveCaptions</Description>
      	<Class>com.wowza.wms.plugin.closedcaption.live.ModuleCCDetectLiveCaptions</Class>
      </Module>
      
    2. Add the following properties to the application-level <Properties> container at the bottom of the file (be sure to get the correct <Properties> container - there are several in the Application.xml file):
      <Property>
      	<Name>ccDetectCEA608Field1</Name>
      	<Value>true</Value>
      	<Type>Boolean</Type>
      </Property>
      <Property>
      	<Name>ccDetectCEA608Field2</Name>
      	<Value>true</Value>
      	<Type>Boolean</Type>
      </Property>
      <Property>
      	<Name>ccDetectCEA608XDS</Name>
      	<Value>true</Value>
      	<Type>Boolean</Type>
      </Property>
      <Property>
      	<Name>ccDetectOnTextData</Name>
      	<Value>true</Value>
      	<Type>Boolean</Type>
      </Property>
      <Property>
      	<Name>ccDetectOnCaption</Name>
      	<Value>true</Value>
      	<Type>Boolean</Type>
      </Property>
      			
      
      <Property>
      	<Name>ccDetectCEA608Maximum</Name>
      	<Value>25</Value>
      	<Type>Integer</Type>
      </Property>
      <Property>
      	<Name>ccDetectCEA608XDSMaximum</Name>
      	<Value>25</Value>
      	<Type>Integer</Type>
      </Property>
      <Property>
      	<Name>ccDetectOnTextDataMaximum</Name>
      	<Value>25</Value>
      	<Type>Integer</Type>
      </Property>
      <Property>
      	<Name>ccDetectOnCaptionMaximum</Name>
      	<Value>25</Value>
      	<Type>Integer</Type>
      </Property>
      
      

      Where:

      • ccDetectCEA608Field1: Determines if CEA-6-8 field 1 captions are detected. (default:true)
      • ccDetectCEA608Field2: Determines if CEA-6-8 field 2 captions are detected. (default: true)
      • ccDetectCEA608XDS: Determines if CEA-6-8 XDS captions are detected. (default: false)
      • ccDetectOnTextData: Determines if AMF onTextData captions are detected. (default: true)
      • ccDetectOnCaption: Determines if AMF onCaption and onCaptionInfo captions are detected. (default: true)
      • ccDetectCEA608Maximum: Maximum number of CEA608 captions logged (0 means no limit). (default: 100)
      • ccDetectCEA608XDSMaximum: Maximum number of CEA-608 XDS events logged (0 means no limit). (default: 250)
      • ccDetectOnTextDataMaximum: Maximum number of AMF onTextData captions logged (0 means no limit). (default: 100)
      • ccDetectOnCaptionMaximum: Maximum number of AMF onCaption* captions logged (0 means no limit). (defualt: 100)


  3. Turn off any modules that insert captions into the stream or that convert captions from one format to another. These will interfere with determining what captions live in the input stream
  4. Start Wowza Media Server and publish a live stream to the server. For this example, we'll use the stream name myStream.

  5. After publishing the live stream for a few minutes, stop the server and inspect the logs to see what cations were detected.