This article describes how to adjust the audio in transcoded output from Wowza Streaming Engine™ media server software through audio encoding parameters. Users with advanced encoding knowledge can log all of the audio encoding parameters that are available, and their current values, and use this information to adjust the transcoding parameters for adaptive bitrate output renditions.
Logging available audio encoding parameters
When using Transcoder, you can log all available audio encoding parameters with their current values for a given <Encode> block to the wowzastreamingengine_access.log file. To do this, open the Transcoder template file in a text editor and add the following property to the <Properties> container in each <Encode> block in the Transcoder template:
<Property> <Name>logAudioEncodingParameters</Name> <Value>true</Value> <Type>Boolean</Type> </Property>
A section of the data logged in the wowzastreamingengine_access.log file might look like this:
# long: channel copy: 0=donothing, 1=copy-left-over-right, 2=copy-right-over-left
mainconcept.channel_copy: 0 #
You can then use this information as a basis for adjusting the transcoded audio output using the available audio encoding parameters that are logged.
Note: The data logged will vary depending on the codec applied to each transcoded output rendition.
Configuring audio encoding parameters
You must use a text editor to configure audio parameters in the Transcoder template files ([install-dir]/transcoder/templates) in your Wowza Streaming Engine installation. They can't be configured using Wowza Streaming Engine Manager.
Open the Transcoder template in a text editor and add a <Parameter> section to the <Audio>/<Parameters> container in each <Encode> block that you want to modify, as shown in the example below. A single template can have multiple <Encode> blocks (one for each encoded bitrate in the output stream). Then restart Wowza Streaming Engine for the changes to take effect.
Note: Older versions of the example Transcoder templates may not have a <Parameters> container for the <Audio> encoding section. Add the container if it's missing from your Transcoder template.
Example configuration
As an example, for these audio parameters defined as available in the wowzastreamingengine_access.log file:
# long: channel copy: 0=donothing, 1=copy-left-over-right, 2=copy-right-over-left
mainconcept.channel_copy: 0
# double: gain: audio gain in decibels (default 0.0)
opus.gain: 0.0
You can add the following <Parameter> section to the <Audio>/<Parameters> container in an <Encode> block in your template file:
<Parameter> <Name>mainconcept.channel_copy</Name> <Value>1</Value> <Type>Long</Type> </Parameter>
The above example adds the mainconcept.channel_copy audio parameter to an <Encode> block and changes its value to 1, which copies the left audio channel over the right audio channel.
<Parameter> <Name>opus.gain</Name> <Value>12.5</Value> <Type>Double</Type> </Parameter>
The above example adds the opus.gain parameter to an <Encode> block and changes its value to 12.5, which adjusts the volume on audio transcoded to Opus.
Note: Logs do not report a warning or error for invalid parameter values. If you specify an invalid value, the Transcoder uses the default value for the parameter instead, which is reflected in the logs.