• How to add an audio track to a video-only stream (AddAudioTrack)

    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. Microsoft Smooth Streaming and 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.


    For developers


    Wowza Streaming Engine 4.0.0 or later is required.


    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.


    To enable this module, add the following module definition to your application configuration. See Configure modules for details.

    Fully Qualified Class Name
    ModuleAddAudioTrack Adds audio to a video-only stream. com.wowza.wms.plugin.AddAudioTrack


    After enabling the module, you can adjust the default settings by adding the following properties to your application. See Configure properties for details.

    /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)


    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.

    Note: The new streams count toward the maximum of three inbound connections allowed for Developer or Trial licenses. Therefore, if you have a Developer or Trial license and use this module, you can only create one inbound connection to your Wowza Streaming Engine media server instance.

    For Developers

    Source code is available on GitHub.

    Wowza Media Systems™ provides developers with a platform to create streaming applications and solutions. See Wowza Developer Tools to learn more about our APIs and SDK.
    Wowza media server software and all components, including modules, source code, and other related items offered on this page, are copyrighted (c) 2006-2016 by Wowza Media Systems, LLC, all rights reserved, and are licensed pursuant to the Wowza Media Software End User License Agreement.
    Originally Published: on 02-26-2014.
    Updated: 09-28-2016.

    If you're having problems or want to discuss this article, post in our forum.