<!-- 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, PassThru, Disable -->
					<Codec>PassThru</Codec>
					<Bitrate>${SourceVideoBitrate}</Bitrate>
					<Parameters>
					</Parameters>
				</Video>
				<Audio>
					<!-- AAC, PassThru, Disable -->
					<Codec>PassThru</Codec>
					<Bitrate>${SourceAudioBitrate}</Bitrate>
				</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, 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>
							<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>
				</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, 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>
							<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>
				</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, 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>
							<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>
				</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, 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>
							<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>
				</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>
						<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>
