Move recordings of live streams with a Wowza Streaming Engine Java module

This article describes how to use the built-in ModuleMediaWriterFileMover module of Wowza Streaming Engine™ media server software to copy or move files after they have been written/recorded to disk.

To add the module to your application, add the following module definition to the end of the <Modules> list in [install-dir]/conf/[application]/Application.xml:

<Module>
	<Name>ModuleMediaWriterFileMover</Name>
	<Description>ModuleMediaWriterFileMover</Description>
	<Class>com.wowza.wms.module.ModuleMediaWriterFileMover</Class>
</Module>

Then add the following application level properties to the <Properties> container at the bottom of [install-dir]/conf/[application]/Application.xml to control where to copy the file after recording is complete:

<Property>
	<Name>fileMoverDestinationPath</Name>
	<Value>${com.wowza.wms.context.VHostConfigHome}/content/acopy</Value>
</Property>
<Property>
	<Name>fileMoverDeleteOriginal</Name>
	<Value>false</Value>
	<Type>Boolean</Type>
</Property>
<Property>
	<Name>fileMoverVersionFile</Name>
	<Value>true</Value>
	<Type>Boolean</Type>
</Property>
<Property>
	<Name>fileMoverFileExtension</Name>
	<Value>mp4</Value>
	<Type>String</Type>
</Property>
-->

Where:
 
  • fileMoverDestinationPath: The destination path of the file. This property supports the following variables:
    ${com.wowza.wms.context.VHost}: vhost name
    ${com.wowza.wms.context.VHostConfigHome}: vhost folder
    ${com.wowza.wms.context.Application}: application name
    ${com.wowza.wms.context.ApplicationInstance}: appInstance name
    ${com.wowza.wms.context.StreamName}: stream name
  • fileMoverDeleteOriginal: If true, the original file is deleted after it's copied to the new location.
     
  • fileMoverVersionFile: If true, the target location file is versioned if it exists (if not, it's deleted).
     
  • fileMoverFileExtension: By default, the file mover uses an appropriate extension for the file type. Uncomment this property to force the extension to be different from the default extension.