Note: For use with Wowza Media Server® 3 and greater.
Contents
Tutorial
- Hardware and driver requirements
- Supported video and audio codecs for ingest
- About Transcoder templates
- Server.license configuration (Wowza Media Server Perpetual Edition)
- Application.xml configuration
- Template configuration
- Adaptive bitrate streaming with StreamNameGroups
- How to control the transcoding process
Troubleshooting
Related Articles
- Wowza Transcoder AddOn Overview
- How to verify which Wowza Transcoder implementation is invoked
- Wowza Transcoder AddOn Performance Benchmark
- How to enable hardware accelerated transcoding when running as a Windows service
- How to configure Quick Sync accelerated encoding on Linux
- How to get images from Wowza Transcoder with an HTTPProvider
- How to add graphic overlays to live streams with Wowza Transcoder AddOn
- How to configure bi-directional frame (B-frame) support when using Wowza Transcoder
Tutorial
Hardware and driver requirements
Wowza Transcoder is supported on 64-bit versions of the Windows® and Linux® operating systems. 32-bit operating systems are not supported and the Mac OS® X operating system is not supported.
To run Wowza Transcoder on 64-bit versions of the Windows Server operating system, the following server features are required:
- .NET Framework 3.5.1
- Desktop Experience
Hardware acceleration
Wowza Transcoder supports Intel® Quick Sync accelerated encoding on Windows and Linux and NVIDIA® CUDA® accelerated encoding on Windows. The following articles provide more information about the hardware requirements for each of these technologies:
- Intel Quick Sync acceleration on Windows
- Intel Quick Sync acceleration on Linux
- NVIDIA CUDA acceleration on Windows
Note: It is always best to get transcoding working using the default encoder first before trying to get accelerated transcoding to work. For more information about how to debug the hardware encoding, see How to verify which Wowza Transcoder implementation is invoked.
Note: On newer Windows operating systems, hardware acceleration (Intel Quick Sync and NVIDIA CUDA) may not be available when running Wowza Media Server as a system service due to a security measure called Session 0 Isolation. To workaround this issue, see How to enable hardware accelerated transcoding when running as a Windows service.
Note: When using Windows Remote Desktop, Quick Sync acceleration may not be available.
Supported video and audio codecs for ingest
Wowza Transcoder supports the following video and audio codecs:
- Video decoding: H.264, MPEG-2, MPEG-4 Part 2
- Video encoding: H.264, H.263v2
- Audio decoding: AAC, MP3, MPEG-1 Layer 1/2, Speex, G.711 (µ-law and A-law)
- Audio encoding: AAC
Note: The following MP3 sample rates are supported: 48000, 44100, and 32000.
About Transcoder templates
Wowza Transcoder uses a templating system to match the incoming stream to an encoding template that is used to control the encoding parameters of the resultant transcoded streams. There are three default templates in the [install-dir]/transcoder/templates folder that cover the most common workflows: transrate.xml, transcode.xml, and audioonly.xml. For more information about how to customize your template, see Template configuration.
The Wowza Transcoder templating system provides a method to group streams together in logical groups (called Stream Name Groups) for live playback. These groups are defined in the template and are available using the ngrp: stream name prefix for adaptive bitrate delivery.
Server.license configuration (Wowza Media Server Perpetual Edition)
License keys for Wowza Media Server 3.5 and premium AddOns (including Wowza Transcoder AddOn) are stored in [install-dir]/conf/Server.license.
- %WMSCONFIG_HOME%\conf\Server.license- Windows
- /Library/WowzaMediaServer/conf/Server.license- Mac OS X
- /usr/local/WowzaMediaServer/conf/Server.license- Linux/Unix
Trial, Daily, and Monthly Edition subscribers will have a single license key while Perpetual Edition users may have more than one key to enable premium AddOns.
To enable premium AddOns, open the Server.license file in a text editor and enter each new license key on a new line. When the standalone server is restarted, the new license(s) will be in effect. Licenses are additive, so when adding additional licenses, be sure to retain the original license information in the file and add each new license key on its own new line. The order in which the keys are listed isn't important. The first and last five digits of the license key are displayed in the console window.
The following is an example Server.license file for a Perpetual Edition user with a Wowza Media Server 3.5 license key, two Wowza Transcoder AddOn license keys, and one Wowza nDVR AddOn license key:
SVRP3-LaGpC-ZrTD9-F4Y3S-a9bR2-h5t3C
TRN23-Ry6qe-4mT8J-yKj2W-4N5sH-2Td3a
TRN13-y9Gj2-kneqT-2zjHp-GadzB-N6fwa
DVRA3-k3r3R-nzxCB-ypjs5-Sk3y9-ahFdF
Application.xml configuration
To set up an application for live streaming and to configure the Application.xml file for use with Wowza Transcoder, do the following:
- Create an application folder named [install-dir]/applications/live.
- Create a configuration folder named [install-dir]/conf/live and copy the [install-dir]/conf/Application.xml file to this new folder.
- Open the newly copied Application.xml file in a text editor and make the following changes (some of these settings may already be present):
- Set the Streams/StreamType property value to:
Code:<StreamType>live</StreamType>
- Set the HTTPStreamers property value to:
Code:<HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
- Set the Streams/LiveStreamPacketizers property value to:
Code:<LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer</LiveStreamPacketizers>
- Set the RTP/Authentication/PlayMethod value to:
Code:<PlayMethod>none</PlayMethod>
- Set the Transcoder/LiveStreamTranscoder value to:
Code:<LiveStreamTranscoder>transcoder</LiveStreamTranscoder>
- If the incoming stream is H.264 video and AAC or MP3 audio and you want to create multi-bitrate renditions of the incoming stream for adaptive bitrate delivery, set the Transcoder/Templates value to:
If the incoming stream is MPEG-2 or MPEG-4 Part 2 video and requires transcoding to H.264 and AAC for delivery to supported player technologies such as Adobe® Flash® Player, Apple® iOS devices, and Microsoft® Silverlight®, set the Transcoder/Templates value to:Code:<Templates>${SourceStreamName}.xml,transrate.xml</Templates>
Code:<Templates>${SourceStreamName}.xml,transcode.xml</Templates>Note: Adaptive bitrate delivery is supported when using transcode.xml. - If the source stream that you want to transcode is a SHOUTcast or Icecast MP3 stream, add the following property to the MediaCaster/Properties container to configure Wowza Media Server to send one MP3 frame per-packet:
Code:<Property> <Name>shoutcastMP3GroupCount</Name> <Value>1</Value> <Type>Integer</Type> </Property>
- Set the Streams/StreamType property value to:
- (RTSP/RTP encoder only) Open [install-dir]/conf/publish.password in a text editor and add a username and password to control RTSP/RTP publishing access. The following is an example of the file with the username myuser and password mypassword).
Code:# Publish password file (format [username][space][password]) # username password myuser mypassword
- Start Wowza Media Server.
With this setup, you can now follow one of the following live streaming tutorials to further modify [install-dir]/conf/live/Application.xml and then send a stream from your encoder to Wowza Media Server for transcoding:
- How to set up live streaming using an RTMP-based encoder
- How to set up live streaming using an RTSP/RTP based encoder
- How to publish and play a live stream (MPEG-TS based encoder)
- How to set up live streaming using a native RTP encoder with SDP file
- How to re-stream video from an IP camera (RTSP/RTP re-streaming)
- How to do basic server-side publishing with Stream class streams
Template configuration
If you use the installed transrate.xml or transcode.xml template files, the transcoded streams will have the following stream names:
- [stream-name]_360p: Main Profile stream
- [stream-name]_160p: Baseline Profile stream
- ngrp:[stream-name]_all: Adaptive bitrate stream for Apple HTTP Live Streaming (cupertino), Microsoft Smooth Streaming, and Adobe HTTP Dynamic Streaming (sanjose)
[stream-name] is the name of the stream that the encoder sends to Wowza Media Server. For example, if the incoming stream from the encoder is myStream, then the transcoded streams will be myStream_360p, myStream_160p, and ngrp:myStream_all.
The way it works is very simple. All incoming streams that are published to the live application will also be transcoded based on the template that is configured using the Transcoder/Templates setting in the [install-dir]/conf/[application]/Application.xml file. You can transcode a single incoming stream to as many new streams as you like.
Let's take a closer look at a transcoder template. The following is the transrate.xml template file that ships with Wowza Media Server:
Code:
<!-- Example template for transrate, producing four new streams at different bitrates. Resultant streams can be played back individually or as a group. source, 360p and 160p encode blocks are enabled through the Enable property, other examples are not enabled. Add additional encode blocks to your template as needed. -->
<Root>
<Transcode>
<Encodes>
<!-- Example Encode block for source, not required unless Member of StreamNameGroup. -->
<Encode>
<Enable>true</Enable>
<Name>source</Name>
<StreamName>mp4:${SourceStreamName}_source</StreamName>
<Video>
<!-- H.264, H.263, PassThru, Disable -->
<Codec>PassThru</Codec>
<Bitrate>${SourceVideoBitrate}</Bitrate>
<Parameters>
</Parameters>
</Video>
<Audio>
<!-- AAC, PassThru, Disable -->
<Codec>PassThru</Codec>
<Bitrate>${SourceAudioBitrate}</Bitrate>
<Parameters>
</Parameters>
</Audio>
<Properties>
</Properties>
</Encode>
<!-- Setup for 720p, high bandwith, main profile for desktop or set-top box -->
<Encode>
<Enable>false</Enable>
<Name>720p</Name>
<StreamName>mp4:${SourceStreamName}_720p</StreamName>
<Video>
<!-- H.264, H.263, PassThru, Disable -->
<Codec>H.264</Codec>
<!-- default, CUDA, QuickSync -->
<Transcoder>default</Transcoder>
<GPUID>-1</GPUID>
<FrameSize>
<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
<FitMode>fit-height</FitMode>
<Width>1280</Width>
<Height>720</Height>
<!-- <Crop>0,0,0,0</Crop> -->
<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
</FrameSize>
<Profile>main</Profile>
<Bitrate>1300000</Bitrate>
<KeyFrameInterval>
<FollowSource>true</FollowSource>
<Interval>60</Interval>
</KeyFrameInterval>
<Overlays>
<Overlay>
<Enable>false</Enable>
<Index>0</Index>
<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
<CheckForUpdates>false</CheckForUpdates>
<Opacity>100</Opacity>
<Location>
<X>5</X>
<Y>5</Y>
<Width>${ImageWidth}</Width>
<Height>${ImageHeight}</Height>
<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
<Align>left,top</Align>
</Location>
</Overlay>
</Overlays>
<Parameters>
</Parameters>
</Video>
<Audio>
<!-- AAC, PassThru, Disable -->
<Codec>PassThru</Codec>
<Bitrate>${SourceAudioBitrate}</Bitrate>
<Parameters>
</Parameters>
</Audio>
<Properties>
</Properties>
</Encode>
<!-- Setup for 360p, high bandwith, main profile for desktop -->
<Encode>
<Enable>true</Enable>
<Name>360p</Name>
<StreamName>mp4:${SourceStreamName}_360p</StreamName>
<Video>
<!-- H.264, H.263, PassThru, Disable -->
<Codec>H.264</Codec>
<!-- default, CUDA, QuickSync -->
<Transcoder>default</Transcoder>
<GPUID>-1</GPUID>
<FrameSize>
<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
<FitMode>fit-height</FitMode>
<Width>640</Width>
<Height>360</Height>
<!-- <Crop>0,0,0,0</Crop> -->
<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
</FrameSize>
<Profile>main</Profile>
<Bitrate>850000</Bitrate>
<KeyFrameInterval>
<FollowSource>true</FollowSource>
<Interval>60</Interval>
</KeyFrameInterval>
<Overlays>
<Overlay>
<Enable>false</Enable>
<Index>0</Index>
<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
<CheckForUpdates>false</CheckForUpdates>
<Opacity>100</Opacity>
<Location>
<X>5</X>
<Y>5</Y>
<Width>${ImageWidth}</Width>
<Height>${ImageHeight}</Height>
<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
<Align>left,top</Align>
</Location>
</Overlay>
</Overlays>
<Parameters>
</Parameters>
</Video>
<Audio>
<!-- AAC, PassThru, Disable -->
<Codec>PassThru</Codec>
<Bitrate>${SourceAudioBitrate}</Bitrate>
<Parameters>
</Parameters>
</Audio>
<Properties>
</Properties>
</Encode>
<!-- Setup for 240p, medium bandwidth, baseline profile -->
<Encode>
<Enable>false</Enable>
<Name>240p</Name>
<StreamName>mp4:${SourceStreamName}_240p</StreamName>
<Video>
<!-- H.264, H.263, PassThru, Disable -->
<Codec>H.264</Codec>
<!-- default, CUDA, QuickSync -->
<Transcoder>default</Transcoder>
<GPUID>-1</GPUID>
<FrameSize>
<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
<FitMode>fit-height</FitMode>
<Width>360</Width>
<Height>240</Height>
<!-- <Crop>0,0,0,0</Crop> -->
<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
</FrameSize>
<Profile>baseline</Profile>
<Bitrate>350000</Bitrate>
<KeyFrameInterval>
<FollowSource>true</FollowSource>
<Interval>60</Interval>
</KeyFrameInterval>
<Overlays>
<Overlay>
<Enable>false</Enable>
<Index>0</Index>
<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
<CheckForUpdates>false</CheckForUpdates>
<Opacity>100</Opacity>
<Location>
<X>5</X>
<Y>5</Y>
<Width>${ImageWidth}</Width>
<Height>${ImageHeight}</Height>
<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
<Align>left,top</Align>
</Location>
</Overlay>
</Overlays>
<Parameters>
</Parameters>
</Video>
<Audio>
<!-- AAC, PassThru, Disable -->
<Codec>PassThru</Codec>
<Bitrate>${SourceAudioBitrate}</Bitrate>
<Parameters>
</Parameters>
</Audio>
<Properties>
</Properties>
</Encode>
<!-- Setup for 160p, low bandwith, baseline profile for 3G mobile devices such as iOS, Android, Blackberry -->
<Encode>
<Enable>true</Enable>
<Name>160p</Name>
<StreamName>mp4:${SourceStreamName}_160p</StreamName>
<Video>
<!-- H.264, H.263, PassThru, Disable -->
<Codec>H.264</Codec>
<!-- default, CUDA, QuickSync -->
<Transcoder>default</Transcoder>
<GPUID>-1</GPUID>
<FrameSize>
<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
<FitMode>fit-height</FitMode>
<Width>284</Width>
<Height>160</Height>
<!-- <Crop>0,0,0,0</Crop> -->
<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
</FrameSize>
<Profile>baseline</Profile>
<Bitrate>200000</Bitrate>
<KeyFrameInterval>
<FollowSource>true</FollowSource>
<Interval>60</Interval>
</KeyFrameInterval>
<Overlays>
<Overlay>
<Enable>false</Enable>
<Index>0</Index>
<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
<CheckForUpdates>false</CheckForUpdates>
<Opacity>100</Opacity>
<Location>
<X>5</X>
<Y>5</Y>
<Width>${ImageWidth}</Width>
<Height>${ImageHeight}</Height>
<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
<Align>left,top</Align>
</Location>
</Overlay>
</Overlays>
<Parameters>
</Parameters>
</Video>
<Audio>
<!-- AAC, PassThru, Disable -->
<Codec>PassThru</Codec>
<Bitrate>${SourceAudioBitrate}</Bitrate>
<Parameters>
</Parameters>
</Audio>
<Properties>
</Properties>
</Encode>
<!-- Setup for H.263, low bandwith, streaming to older mobile devices -->
<Encode>
<Enable>false</Enable>
<Name>h263</Name>
<StreamName>mp4:${SourceStreamName}_h263</StreamName>
<Video>
<!-- H.264, H.263, PassThru, Disable -->
<Codec>H.263</Codec>
<!-- default, CUDA, QuickSync -->
<Transcoder>default</Transcoder>
<GPUID>-1</GPUID>
<FrameSize>
<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
<FitMode>letterbox</FitMode>
<Width>176</Width>
<Height>144</Height>
<!-- <Crop>0,0,0,0</Crop> -->
<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
</FrameSize>
<Profile>baseline</Profile>
<Bitrate>150000</Bitrate>
<KeyFrameInterval>
<FollowSource>false</FollowSource>
<Interval>60</Interval>
</KeyFrameInterval>
<Overlays>
<Overlay>
<Enable>false</Enable>
<Index>0</Index>
<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
<CheckForUpdates>false</CheckForUpdates>
<Opacity>100</Opacity>
<Location>
<X>5</X>
<Y>5</Y>
<Width>${ImageWidth}</Width>
<Height>${ImageHeight}</Height>
<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
<Align>left,top</Align>
</Location>
</Overlay>
</Overlays>
<Parameters>
</Parameters>
</Video>
<Audio>
<!-- AAC, PassThru, Disable -->
<Codec>AAC</Codec>
<Bitrate>64000</Bitrate>
<Parameters>
</Parameters>
</Audio>
<Properties>
</Properties>
</Encode>
</Encodes>
<Decode>
<Video>
<Deinterlace>false</Deinterlace>
<Overlays>
<Overlay>
<Enable>false</Enable>
<Index>0</Index>
<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
<CheckForUpdates>false</CheckForUpdates>
<Opacity>100</Opacity>
<Location>
<X>5</X>
<Y>5</Y>
<Width>${ImageWidth}</Width>
<Height>${ImageHeight}</Height>
<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
<Align>left,top</Align>
</Location>
</Overlay>
</Overlays>
<Parameters>
</Parameters>
</Video>
<Properties>
</Properties>
</Decode>
<StreamNameGroups>
<!-- Note: Play stream using stream name ngrp:[stream-name] -->
<StreamNameGroup>
<Name>${SourceStreamName}_all</Name>
<Members>
<Member>
<EncodeName>source</EncodeName>
</Member>
<Member>
<EncodeName>720p</EncodeName>
</Member>
<Member>
<EncodeName>360p</EncodeName>
</Member>
<Member>
<EncodeName>240p</EncodeName>
</Member>
<Member>
<EncodeName>160p</EncodeName>
</Member>
</Members>
</StreamNameGroup>
<StreamNameGroup>
<Name>${SourceStreamName}_mobile</Name>
<Members>
<Member>
<EncodeName>240p</EncodeName>
</Member>
<Member>
<EncodeName>160p</EncodeName>
</Member>
</Members>
</StreamNameGroup>
</StreamNameGroups>
<Properties>
</Properties>
</Transcode>
</Root>
- <Encode>...</Encode>: This block represents an encode. A single template can have multiple <Encode> blocks.
- Enable: If set to true, the encode block is active. If set to false, the encode block is ignored. The default template has multiple <Encode> block examples, not all of which are enabled. You can enable or add additional encode blocks to your template as needed.
- Name: Each encode block is given a name that is used in logging. This name must be unique in a given transcoding template.
- StreamName: The transcoded stream name. The ${SourceStreamName} is replaced with the source stream name. Again, the resultant stream name must be unique for a given application. It is best to always use the source stream name as part of the destination stream name.
- Video/Codec: The video codec to use:
- H.264: Transcode video to H.264. Also use when modifying source H.264 to achieve a different bitrate, profile, etc.
- H.263: Transcode video to H.263.
- PassThru: Pass the source video stream through to the resultant stream without making any changes.
- Disable: Disable video in the transcoded streams.
- Video/Transcoder: The transcoder implementation to use:
- default: MainConcept software encoder (not hardware accelerated).
- QuickSync: Intel Quick Sync encoding acceleration. If your hardware does not support the Quick Sync instruction set, the unaccelerated software encoder is used.
- CUDA: (Windows only): NVIDIA CUDA encoding acceleration. If your hardware does not support the CUDA instruction set, the unaccelerated software encoder is used.
- Video/GPUID: The CUDA GPUID to use for transcoding. A value of -1 tells the software to select the highest capacity GPU. GPUs are numbered starting at zero and are enumerated when the transcoder is started.
- Video/FrameSize:The transcoded frame size to use:
- letterbox: Maintains the aspect ratio of the source video and scales to fit the destination frame size with black bars to fill empty space.
- fit-width: Adjusts the height to fit the specified width and maintains the incoming aspect ratio.
- fit-height: Adjusts the width to fit the specified height and maintains the incoming aspect ratio.
- crop: Maintains the aspect ratio of the source video and scales to fit the destination frame size and crops the source video to fit destination frame size.
- stretch: Stretches the video to the fit the specified width and height.
- match-source: Frame width and height are the same as the source video.
- Video/Crop: Crops the source video frame. The values represent the number of pixels to crop on the left, right, top, and bottom of the source video frame. Cannot be used with Video/SourceRectangle.
- Video/SourceRectangle: Gives you the ability to select only a portion of the source video frame. The values represent the top, left, width, and height of the rectangle. Cannot be used with Video/Crop.
- Video/Profile: The video profile to use:
- baseline: Lowest complexity stream for mobile streaming
- main: Higher complexity and quality stream for desktop and over-the-top streaming
- Video/Bitrate: The target video bitrate to use, in bits per second (bps).
- Video/KeyFrameInterval: The key frame interval to use.
- Video/KeyFrameInterval/FollowSource: If set to true, the key frame interval of the transcoded video is the same as the key frame interval of the source video. If set to false, the Video/KeyFrameInterval/Interval value determines the key frame interval.
- Video/KeyFrameInterval/Interval: Specifies how often key frames are generated. (Every Nth frame is a key frame.) Value specified must be an integer.
- Video/Overlays: Container for specifying a graphic overlay such as a watermark. You can apply overlays to both the decoded stream and each newly encoded individual stream. If you want to have the same overlay for all encoded streams, then you should apply the overlay to the decoded stream.
- Video/Overlays/Overlay/Enable: Set to true to enable graphic overlays. Overlays with a transparency require extra CPU resources.
- Video/Overlays/Overlay/Index: Graphic overlay z-order.
- Video/Overlays/Overlay/ImagePath: Path to the graphic overlay image (JPEG, PNG, and BMP image file formats are supported).
- Video/Overlays/Overlay/CheckForUpdates: When set to true, Wowza Transcoder checks for updates to the image file every 750 milliseconds and updates the overlay if it changes.
Note: When using the Video/Overlays/Overlay/CheckForUpdates feature to dynamically monitor for overlay image file updates, be sure to properly update the image file in a single atomic operation. This will ensure that Wowza Transcoder gets the complete image file when it determines that an update has occured. For more information about atomic file updates and file modification date issues in Windows, see the following:
- Video/Overlays/Overlay/Opacity: Overlay opacity. Valid values range from 0 (completely transparent) to 100 (completely opaque).
- Video/Overlays/Overlay/Location/X & Y: Offset of overlay from base position. Negative values are valid.
- Video/Overlays/Overlay/Location/Width & Height: Width and height of overlay. If set to ${ImageWidth} and ${ImageHeight}, the image size is used.
- Video/Overlay/Location/Align: Default location of overlay. For example, if set to right, bottom and Video/Overlays/Overlay/Location/X & Y set to -10 and -10, the overlay is placed 10 pixels from the bottom right corner of the output frame.
- Video/Parameters: Implementation-specific encoding parameters that control the encoding process (this feature will be documented later).
- Audio/Codec: The audio codec to use:
- AAC: Transcode audio to AAC.
- PassThru: Pass the source audio stream through to this resultant stream without making any changes.
- Disable: Disable the audio in transcoded streams.
- Audio/Bitrate: The target audio bitrate to use, in bits per second (bps). The value is ignored if Audio/Codec is set to PassThru.
- ${SourceStreamName}: Variable that is replaced with the source stream name.
- ${SourceVideoBitrate}: Variable that is replaced with the video bitrate of the source stream. This can only be used if Video/Codec is set to PassThru.
- ${SourceAudioBitrate}: Variable that is replaced with the audio bitrate of the source stream. This can only be used if Audio/Codec is set to PassThru.
- <Decode>...</Decode>: This block represents the decoding process. A template has a single <Decode> block.
- Decode/Video/Deinterlace: If set to true, the source video stream is deinterlaced.
- Decode/Video/Overlays/Overlay/[Elements]: A decode-level graphic overlay is the same as an encode-level graphic overlay except that the overlay is applied to the decoded stream. This means that all encodes will include the overlay, making this the recommended place to define an overlay if you want the same overlay for all encoded streams. Note that overlays with any transparency require extra CPU resources.
- Decode/Video/Parameters: Implementation-specific decoding parameters that control the decoding process (this feature will be documented later).
- <StreamNameGroup>...</StreamNameGroup>: This block represents a group of streams that can be played using adaptive bitrate streaming. The <Name> is the name of the stream name group and is used to play the multiple-bitrate stream when using Apple HLS, Adobe HDS, or Microsoft Smooth Streaming. For example, if the incoming stream name is myStream, then the above stream name group name is myStream_all. When customizing your template, you should define and successfully playback individual resultant streams before defining your group.
Adaptive bitrate streaming with StreamNameGroups
Newly encoded multiple bitrate streams are key frame aligned with each other to enable adaptive bitrate delivery from Wowza Media Server for Adobe Flash HTTP Dynamic Streaming (HDS) or RTMP, Microsoft Smooth Streaming, and Apple HTTP Live Streaming (HLS). Stream Name Groups serve the same purpose as a Synchronized Multimedia Integration Language (SMIL) playlist file.
To play a multiple bitrate live stream, the URLs using each of the player technologies would be the following:
Apple iOS device (Cupertino/Apple HTTP Live Streaming)
Code:
http://[wowza-ip-address]:1935/live/ngrp:myStream_all/playlist.m3u8
Code:
http://[wowza-ip-address]:1935/live/ngrp:myStream_all/manifest.f4m
Code:
http://[wowza-ip-address]:1935/live/ngrp:myStream_all/Manifest
Note: To include the incoming stream in a stream name group for adaptive bitrate streaming, it is best to add it as an <Encode> item with both Video/Codec and Audio/Codec set to PassThru. The <StreamName> element must result in a unique name from the incoming stream name.
Note: You can create a stream name group for Apple HLS streaming with an audio-only rendition as described in How to create Apple App Store compliant streams. If you do this, add a <MediaListRendition> element to the stream name group with a <WowzaAudioOnly> element set to true. The following is an example:
Code:
<StreamNameGroup>
<Name>${SourceStreamName}_all</Name>
<Members>
<Member>
<EncodeName>source</EncodeName>
</Member>
<Member>
<EncodeName>360p</EncodeName>
</Member>
<Member>
<EncodeName>160p</EncodeName>
</Member>
<Member>
<EncodeName>160p</EncodeName>
<MediaListRendition>
<WowzaAudioOnly>true</WowzaAudioOnly>
</MediaListRendition>
</Member>
</Members>
</StreamNameGroup>
How to control the transcoding process
All transcoding sessions use the same transcoder template. This is the default configuration.
To configure all transcoding sessions for a particular application to use the same transcoder template, do the following:
Note: In all of the instructions, replace [application] with the name of the application being configured.
- Open [install-dir]/conf/[application]/Application.xml in a text editor and change the Transcoder/Templates value to [application].xml.
Code:<Templates>[application].xml</Templates>
- Copy the [install-dir]/transcoder/templates/transrate.xml file and name it [install-dir]/transcoder/templates/[application].xml. This file will become your transcoding template for this application.
The transcoder template that is used can also be based on the stream name. To configure all transcoding sessions for a particular stream to use the same transcoder template, do the following:
Note: In all of the instructions, replace [streamName] with the name of the stream being configured.
- Open [install-dir]/conf/[application]/Application.xml in a text editor and change the Transcoder/Templates value to [streamName].xml.
Code:<Templates>[streamName].xml</Templates>
- Copy the [install-dir]/transcoder/templates/transrate.xml file and name it [install-dir]/transcoder/templates/[streamName].xml. This file will become your transcoding template for this stream.
Troubleshooting
Logging
Wowza Transcoder leverages the existing Wowza Media Server log files, [install-dir]/logs. For more information about logging capabilities, see the Wowza Media Server User's Guide.
Running the Wowza Server in standalone mode allows you to view these messages real time from the console window. For a list of messages, scenarios that may cause these messages, and suggestions for resolution, see How to troubleshoot using Wowza Media Server log messages.
Logging messages in the wowzamediaserver_access.log file will indicate if Wowza Media Server and Wowza Transcoder AddOn are configured properly. If so, the logs will show that the transcoder libraries and templates have been loaded, the detected hardware information, and the transcoded streams being published.
Troubleshooting tests
Test #1: Basic live streaming
Use one of the following tutorials to verify that your basic live setup is working properly without transcoding. In this test, the Transcoder/LiveStreamTranscoder property should be disabled in the Application.xml file.
- How to set up live streaming using an RTMP-based encoder
- How to set up live streaming using an RTSP/RTP based encoder
- How to publish and play a live stream (MPEG-TS based encoder)
- How to set up live streaming using a native RTP encoder with SDP file
Test #2: Playback a single transcoded stream
After you have verified that Wowza Media Server is configured correctly for live streaming and you can playback a live stream successfully, playback a single transcoded stream.
- Re-enable transcoding in the Application.xml file by setting the Transcoder/LiveStreamTranscoder property value to transcoder.
Code:<LiveStreamTranscoder>transcoder</LiveStreamTranscoder>
- Use the "Playback" section of the tutorial that you used to set up basic live streaming as a reference to test the playback of a single transcoded stream.
- If you cannot playback the newly encoded stream, use the following troubleshooting checklist and look for verification information in the [install-dir]/logs/wowzamediaserver_access.log file:
- Did the Transcoder libraries load? Failure of the libraries to load could be caused by malformed XML in Application.xml, a faulty installation, or a permissions issue. The following is an example message from a Windows 64-bit installation:
Code:Comment server INFO 200 TranscoderSessionNative.loadLibrary: Load transcoder list: C:\Program Files (x86)\Wowza Media Systems\Wowza Media Server 3.5.0/lib-native/win64/transcoder.list
- Did the Transcoder template load? Failure could be due to specifying a template in Application.xml that does not exist or the template is not in the specified location. Sample templates are located in [install-dir]/transcoder/templates. The following example shows one of the default template files, transrate.xml, being loaded.
Code:comment server INFO 200 LiveStreamTranscoder.init[live/_definst_/myStream]: Load transcoder template: C:\Program Files (x86)\Wowza Media Systems\Wowza Media Server 3.5.0/transcoder/templates/transrate.xml
- Is the source stream being published?
If not, go back to Test #1, Basic live streaming.Code:publish stream INFO 200 myStream_360p
- Are input source streams being decoded?
If not, verify that the source stream is using a supported codec.Code:decoder-video-start transcoder INFO 200 myStream {codec:H264, profile:Main, level:3.0, frameSize:224x168, displaySize:224x168, frameRate:30.0} decoder-audio-start transcoder INFO 200 myStream {codec:AAC, objectType:LC, sampleRate:44100, channels:2}
- Are streams being encoded as defined in the template? The following example shows activity for myStream_360p and myStream_160p, as defined in the sample templates. Failure could be due to a different template specified in Application.xml or problems from earlier in this checklist.
Code:encoder-video-start transcoder INFO 200 myStream {name:"360p", bitrate:850000, codec:H264, profile:Main, level:3.0, frameSize:480x360, displaySize:480x360, frameRate:30.0} encoder-audio-start transcoder INFO 200 myStream {name:"360p", bitrate:96000, codec:AAC, objectType:LC, sampleRate:44100, channels:2}
- Did the Transcoder libraries load? Failure of the libraries to load could be caused by malformed XML in Application.xml, a faulty installation, or a permissions issue. The following is an example message from a Windows 64-bit installation:
Test #3: Playback a group
After you have played a resultant stream successfully, playback a group.
- Is the group being created? Verify that the StreamNameGroups\StreamNameGroup section of the template is correct. The following example shows that the myStream_mobile group is being added, as specified in the sample templates.
Code:comment server INFO 200 TranscoderStreamNameGroup.addInternal[live/_definst_/myStream]: Add name group: myStream_mobile
- Is the source file missing audio?
- Does the name specified in the URL match the StreamNameGroup/Name property?
- Is the expected template being loaded? If a different template is being loaded, the name of your group and, therefore, your URL syntax are likely to be different.
- Do the StreamNameGroup/Members/Member/EncodeName values match the Encodes/Encode/Name values?
Problems transcoding with a custom template or source
Verify configuration
- Is the correct Wowza Transcoder template file being loaded?
In this example, the template name being loaded is myTemplate.xml. If the wrong template is being loaded, check the Transcoder/Templates value in Application.xml. Remember that you can have multiple templates specified in Application.xml. The first template name listed that Wowza Media Server finds will be used, so order matters.Code:comment server INFO 200 LiveStreamTranscoder.init[live/_definst_/myStream]: Load transcoder template: C:\Program Files (x86)\Wowza Media Systems\Wowza Media Server 3.0.0/transcoder/templates/myTemplate.xml
- Do the StreamNameGroup/Members/Member/EncodeName values match the Encodes/Encode/Name values?
- Are you playing back the source of an unsupported codec? Remember that additional codecs are supported for transcoding only and so you do not want to specify those source files as part of your StreamNameGroup.
Verify source
- Is your source missing audio?
- Is your source file encoded with one of the supported ingest codecs?
Missing frame rate
If you see the following WARN message in your wowzamediaserver_access.log file, you can set the frame rate to your preference by adding the sourceStreamFrameRate property to the Properties container in your Transcoder template. For more information about how to do this, see How to fix missing frame rate issue when using Wowza Transcoder.
TranscoderWorkerVideoDecoder.handlePacket[_defaultVHost_:live/_definst_/myStream]: Source stream frame rate could not be calculated. Using default source stream frame rate: 29.97
Updated: For Wowza Media Server 3.5.0 on 11/08/2012
- Click here, if you are having problems or would like to discuss this article.
- Leave a comment below, if there is some aspect of this article you would like to see changed or improved.


Article List
Categories
Wowza Media