Add an audio track to a video-only stream with a Wowza Streaming Engine Java module

The ModuleAddAudioTrack module for Wowza Streaming Engine™ media server software can be used to add an audio track to a live stream that doesn't have one. Some service providers, such as Akamai and YouTube, require that streams have both video and audio tracks. You can use this module to insert audio into a video-only stream—for example, a stream from an IP camera—before pushing it to a CDN or player that requires audio.

Contents


Prerequisites
Installation
Configuration
Properties
Usage
For developers

Prerequisites


Wowza Streaming Engine 4.0.0 or later is required.

Installation


  1. Download wse-plugin-addaudiotrack.zip.
     
  2. Extract the contents from the downloaded (zipped) package, and then copy the lib/wse-plugin-addaudiotrack.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).
     
  3. Restart Wowza Streaming Engine.

Configuration


To enable this module, add the following module definition to your application configuration. See Configure modules for details.
 
Name
Description
Fully Qualified Class Name
ModuleAddAudioTrack Adds audio to a video-only stream. com.wowza.wms.plugin.AddAudioTrack

Properties


After enabling the module, you can adjust the default settings by adding the following properties to your application. See Configure properties for details.
 
Path
Name
Type
Value
Notes
/Root/Application addAudioTrackAudioSourceFilename String myAudioFile.mp4 Name of file that contains the audio track. The same file is used for all streams. (default: mp4:sample.mp4)

Usage


The module creates two streams for every incoming stream connected to the Wowza Streaming Engine live application. The new streams have -audiodestin and -audiodestin-audiosource appended to the source stream name. If, for example, the source stream is myStream, the module creates the streams myStream-audiodestin and myStream-audiodestin-audiosource.

The -audiodestin stream contains the original source video and the audio from the file specified by the addAudioTrackAudioSourceFilename property. It is the playback stream. Use it in players and to push to a CDN.

The -audiodestin-audiosource stream is used internally and loops continuously while the source stream is active. The audio track is read from this stream. By default, the module looks for sample.mp4 in the StorageDir of the Wowza Streaming Engine application.

Notes:
  • The new streams count toward the maximum of three inbound connections allowed for Trial licenses. Therefore, if you have a Trial license and use this module, you can only create one inbound connection to your Wowza Streaming Engine instance.
  • If you're using this workflow to replace the original audio track of your source stream, the replacement audio file must use the same audio encoding as the original.

For developers