<Profile id="RokuMPApp" name="Roku Media Player" extendsProfileId="1">
		<Detection>
			<HttpHeaders>
				<User-Agent>.*ROKU.*</User-Agent>
			</HttpHeaders>
		</Detection>
		<MediaFormatProfiles>
			<MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_SD_AAC_MULT5</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_SD_MPEG1_L3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_SD_AC3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_HD_720p_AAC</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_HD_1080i_AAC</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">AVC_MP4_HP_HD_AAC</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">AVC_MP4_LPCM</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">MPEG4_P2_MP4_ASP_AAC</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">MPEG4_P2_MP4_SP_L6_AAC</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/mp4">MPEG4_P2_MP4_NDSD</MediaFormatProfile>
			<MediaFormatProfile mime-type="audio/mpeg">MP3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AC3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AC3_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AC3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HP_SD_MPEG1_L2_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HP_SD_MPEG1_L2_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AAC_MULT5</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AAC_MULT5_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AAC_MULT5_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_MPEG1_L3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_MPEG1_L3_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_MPEG1_L3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AC3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AC3_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AC3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HD_DTS_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HD_DTS_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HD_50_LPCM_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HP_HD_MPEG1_L2_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HP_HD_MPEG1_L2_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AAC</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AAC_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AAC_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AC3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AC3_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AC3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG1_L3</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG1_L3_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG1_L3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG2_L2</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG2_L2_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG2_L2_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">VC1_TS_AP_L1_AC3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">VC1_TS_AP_L2_AC3_ISO</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">VC1_TS_HD_DTS_T</MediaFormatProfile>
			<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">VC1_TS_HD_DTS_ISO</MediaFormatProfile>
		</MediaFormatProfiles>
		<Transcoding>
			<!-- Transcode if H.264 level is too high -->
			<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000" forceVTranscoding="true" targetACodec="ac3" aBitrate="320" maxWidth="1920" maxHeight="1080">
				<!-- for no surround passthrough 
				<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000" forceVTranscoding="true" targetACodec="aac" aBitrate="128" forceStereo="true"> 
				-->
				<Matches container="*" vCodec="h264" profile="high_10" />
				<Matches container="*" vCodec="h264" profile="high" levelGreaterThan="4.1" />
				<Matches container="*" vCodec="h264" profile="main" levelGreaterThan="4.1" />
				<Matches container="*" widthGreaterThan="1920" />
			</Video>
			<!-- Remux audio and video streams - for DivX/Xvid in AVI/Matroska -->
			<Video targetContainer="mpegts">
				<Matches container="*" vCodec="mpeg4" aCodec="aac" />
				<Matches container="*" vCodec="msmpeg4" aCodec="aac" />
				<!-- for no surround passthrough comment out the following two lines -->
				<Matches container="*" vCodec="mpeg4" aCodec="ac3" />
				<Matches container="*" vCodec="msmpeg4" aCodec="ac3" />
				<Matches container="*" vCodec="mpeg4" aCodec="eac3" />
				<Matches container="*" vCodec="msmpeg4" aCodec="eac3" />
			</Video>
			<!-- Remux video stream, transcode audio only - for DivX/Xvid in AVI/Matroska -->
			<Video targetContainer="mpegts" targetACodec="aac" aBitrate="128">
				<Matches container="avi" vCodec="mpeg4" />
				<Matches container="avi" vCodec="msmpeg4" />
				<!-- for no surround passthrough uncomment the following two lines -->
				<!-- <Matches container="*" vCodec="mpeg4" aCodec="ac3" /> -->
				<!-- <Matches container="*" vCodec="msmpeg4" aCodec="ac3" /> -->
			</Video>
			<!-- Remux supported audio, transcode H.264 video if bitrate is too high, transcode non-H.264 video -->
			<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000">
				<!-- for no surround passthrough comment out the following four lines -->
				<Matches container="*" vCodec="h264" aCodec="ac3" />
				<Matches container="*" vCodec="h264" aCodec="eac3" />
				<Matches container="*" vCodec="h264" aCodec="dca" />
				<Matches container="*" vCodec="mpeg2video" aCodec="ac3" />
				<Matches container="*" vCodec="mpeg2video" aCodec="eac3" />
				<Matches container="*" vCodec="mpeg2video" aCodec="dca" />
				<!-- comment the following line if you have files with 5.1ch AAC, Roku only supports 2 channel AAC -->
				<Matches container="*" vCodec="h264" aCodec="aac" />
			</Video>
			<!-- Transcode all audio, transcode H.264 video if bitrate is too high, transcode all other video -->
			<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000" targetACodec="ac3" aBitrate="320">
				<!-- for no surround passthrough 
				<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000" targetACodec="aac" aBitrate="128" forceStereo="true"> 
				-->
				<Matches container="*" />
			</Video>
			<Audio targetContainer="mp3">
				<Matches container="*" />
			</Audio>
		</Transcoding>
		<OnlineTranscoding>
			<Video targetContainer="applehttp"> <!-- dont transcode to ac3 -->
				<Matches container="mp4" />
				<Matches container="flv" vCodec="h264" />
				<Matches container="applehttp" vCodec="h264" />
			</Video>
		</OnlineTranscoding>
		<AudioTrackRemux>
			<Video targetContainer="mpegts" targetACodec="ac3">
				<Matches container="*" vCodec="h264" />
				<Matches container="*" vCodec="mpeg2video" /> 
				<Matches container="*" vCodec="mpeg1video" />
				<Matches container="*" vCodec="mpeg4" />
				<Matches container="*" vCodec="msmpeg4" />
			</Video>
		</AudioTrackRemux>
		<GenericTranscoding>
			<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000" forceVTranscoding="true" targetACodec="ac3" aBitrate="320" />
		</GenericTranscoding>
		<AutomaticImageRotation>true</AutomaticImageRotation> 
		<LimitImageResolution>false</LimitImageResolution>
	</Profile>

	<Profile id="Roku4kMPApp" name="Roku 4K Media Player (2016+)" extendsProfileId="RokuMPApp">
		<!-- NOTE:
		-This profile does not restrict the audio to 2 channel stereo. If you are encountering audio issues, add forceStereo="true" to the
		targetContainer line after the targetACodec setting.
		-These Roku models should be able to play videos without requiring the maxVBitrate setting. You can experiment if desired.
		-Roku players do not support mepg2 video.
		-Every effort has been made to capture videos correctly. If you discover a file being transcoded unnecessarily, please report it
		in the Serviio forum in the Transcoding section.
			-->
		<Transcoding>
			<!-- transcode HD video unsupported by device, transcode audio regardless of codec -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="vc1" />
			</Video>
			<!-- Remux h264 video stream, transcode audio only -->
			<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="h264" aCodec="truehd" />
				<!-- if you have audio issues with DTS HD audio, uncomment the following line to transcode DTS-HD to DD -->
				<!--<Matches container="*" vCodec="h264" aCodec="dts-hd" /> -->
			</Video>
			<!-- Transcode non-H.264 video or FLAC audio -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" >
				<Matches container="*" vCodec="wmv2"/>
				<Matches container="*" aCodec="flac"/>
				<Matches container="*" vCodec="mpeg1video"/>
				<Matches container="*" vCodec="mpeg2video" />
				<!-- transcode non-supported containers regardless of codec -->
				<Matches container="wtv"/>
				<Matches container="avi" />
				<Matches container="mpegvideo"/>
				<Matches container="mpeg"/>
			</Video>
			<!-- Remux audio and video streams - for DivX/Xvid in AVI/Matroska -->
			<Video targetContainer="mpegts">
				<Matches container="avi" vCodec="mpeg4" />
				<Matches container="avi" vCodec="msmpeg4" />
			</Video>
			<!-- if you have issues playing audio files, uncomment the following section to transcode MP3 -->
			<!-- <Audio targetContainer="mp3">
				<Matches container="*" />
			</Audio> -->
		</Transcoding>
		<OnlineTranscoding>
			<Video targetContainer="applehttp"> <!-- dont transcode to ac3 -->
				<Matches container="mp4" />
				<Matches container="flv" vCodec="h264" />
			</Video>
		</OnlineTranscoding>
		<GenericTranscoding>
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" />
		</GenericTranscoding>
		<AutomaticImageRotation>true</AutomaticImageRotation> 
		<LimitImageResolution>false</LimitImageResolution>
	</Profile>

	<Profile id="RokuNo4kApp" name="Roku 1080 Media Player (2016+)" extendsProfileId="RokuMPApp">
		<!-- NOTE:
            This profile does not restrict the audio to 2 channel stereo. If you are encountering audio issues, add forceStereo="true" to the targetContainer line after the targetACodec setting.
            The player should be able to play videos without requiring the maxVBitrate setting. You can experiment if desired.
            Roku players do not support mepg2 video.
            Every effort has been made to capture videos correctly. If you discover a file being transcoded unnecessarily, please report it in the Serviio forum in the Transcoding section.
                -->
		<Transcoding>
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" aBitrate="512" maxWidth="1920" maxHeight="1080">
				<Matches container="*" widthGreaterThan="1920" />
			</Video>
			<!-- transcode HD video unsupported by device, transcode audio regardless of codec -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="vc1" />
				<Matches container="*" vCodec="h265" />
			</Video>
			<!-- Remux h264 video stream, transcode audio only -->
			<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="h264" aCodec="truehd" />
				<Matches container="*" vCodec="h264" aCodec="aac" aMultichannel="true" /> 
				<!-- if you have audio issues with DTS HD Audio, uncomment the following line to transcode DTS-HD to DD -->
				<!--<Matches container="*" vCodec="h264" aCodec="dts-hd" /> -->
			</Video>
			<!-- Transcode non-H.264 video or FLAC audio -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" >
				<Matches container="*" vCodec="wmv2"/>
				<Matches container="*" aCodec="flac"/>
				<Matches container="*" vCodec="mpeg1video"/>
				<Matches container="*" vCodec="mpeg2video" />
				<!-- transcode non-supported containers regardless of codec -->
				<Matches container="wtv"/>
				<Matches container="avi" />
				<Matches container="mpegvideo"/>
				<Matches container="mpeg"/>
			</Video>
			<!-- Remux audio and video streams - for DivX/Xvid in AVI/Matroska -->
			<Video targetContainer="mpegts">
				<Matches container="avi" vCodec="mpeg4" />
				<Matches container="avi" vCodec="msmpeg4" />
			</Video>
			<!-- if you have issues playing audio files, uncomment the following section to transcode MP3 -->
			<!-- <Audio targetContainer="mp3">
				<Matches container="*" />
			</Audio> -->
		</Transcoding>
		<OnlineTranscoding>
			<Video targetContainer="applehttp"> <!-- dont transcode to ac3 -->
				<Matches container="mp4" />
				<Matches container="flv" vCodec="h264" />
				<Matches container="applehttp" vCodec="h264" />
			</Video>
		</OnlineTranscoding>
		<GenericTranscoding>
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3"/>
		</GenericTranscoding>
		<AutomaticImageRotation>true</AutomaticImageRotation> 
		<LimitImageResolution>false</LimitImageResolution>
	</Profile>

	<Profile id="RokuTV" name="Roku TV (non 4K)" extendsProfileId="RokuMPApp">
		<!-- NOTE:
		This profile does not restrict the audio to 2 channel stereo. Roku TVs handle multi-channel AC3 without issue.
		Some TVs will be able to play videos without requiring the maxVBitrate setting. You can experiment if desired.
		Most Roku TVs do not support DTS audio in any format, so it is transcoded to AC3. If you are using an external AVR for audio, you can most likely comment out the DTS lines.
		Roku TVs support mepg2 video, so they are not transcoded here.
		Every effort has been made to capture videos correctly. If you discover a file being transcoded unnecessarily, please report it in the Serviio forum in the Transcoding section.
			-->
		<Detection>
			<HttpHeaders>
				<User-Agent>.*Roku/5000X.*</User-Agent>
			</HttpHeaders>
		</Detection>
		<Transcoding>
			<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="20000" forceVTranscoding="true" targetACodec="ac3" aBitrate="512" maxWidth="1920" maxHeight="1080">
				<Matches container="*" widthGreaterThan="1920" />
			</Video>
			<!-- transcode any video with DTS audio to ac3, leaving video remuxed -->
			<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="h264" aCodec="dca" />
				<Matches container="*" vCodec="mpeg2video" aCodec="dca" />
				<Matches container="*" aCodec="dts-hd" />
			</Video>
			<!-- transcode HD video unsupported by device, transcode audio regardless of codec -->
			<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="20000" forceVTranscoding="true" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="vc1" />
				<Matches container="*" vCodec="h265"/>
				<Matches container="*" vCodec="h264" profile="high" levelGreaterThan="4.1" />
			</Video>
			<!-- Remux h264 video stream, transcode audio only -->
			<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="h264" aCodec="truehd" />
				<Matches container="*" vCodec="h264" aCodec="aac" aMultichannel="true" /> 
			</Video>
			<!-- Transcode non-H.264 video or FLAC audio -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" >
				<Matches container="*" vCodec="wmv2"/>
				<Matches container="*" aCodec="flac"/>
				<Matches container="*" vCodec="mpeg1video"/>
			</Video>
			<!-- remux non-supported containers with MPEG2 or MP4 video and AC3 audio, which are supported by the Roku TV -->
			<Video targetContainer="mpegts"  >
				<Matches container="wtv"/>
				<Matches container="avi" />
				<Matches container="mpegvideo"/>
				<Matches container="mpeg"/>
			</Video>
			<!--<Audio targetContainer="mp3">
				<Matches container="*" aCodec="flac"/>
			</Audio> -->
		</Transcoding>
		<OnlineTranscoding>
			<Video targetContainer="mpegts"> <!-- don't transcode to ac3 -->
				<Matches container="flv" vCodec="h264" />
				<Matches container="applehttp" vCodec="h264" />
			</Video>
		</OnlineTranscoding>
		<GenericTranscoding>
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" aBitrate="512" />
			<!--<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" />-->
		</GenericTranscoding>
		<AutomaticImageRotation>true</AutomaticImageRotation> 
		<LimitImageResolution>false</LimitImageResolution>
	</Profile>

	<Profile id="Roku4kTV" name="Roku 4K TV" extendsProfileId="RokuMPApp">
		<!-- NOTE:
		This profile does not restrict the audio to 2 channel stereo. Roku TVs handle multi-channel AC3 without issue.
		4K TVs should be able to play videos without requiring the maxVBitrate setting. If constant buffering occurs, first
		test with the non-4k TV profile. If that resolves the buffering issue, the add maxVBitrate="20000" forceVTranscoding="true" to the transcoding line.
		Most Roku TVs do not support DTS audio in any format, so it is transcoded to AC3. If you are using an external AVR for audio, you can most likely comment out the DTS lines.
		Roku TVs support mepg2 video, so they are not transcoded here.
		Every effort has been made to capture videos correctly. If you discover a file being transcoded unnecessarily, please report it in the Serviio forum in the Transcoding section.
			-->
		<Detection>
			<HttpHeaders>
				<User-Agent>.*Roku/6000X.*</User-Agent>
			</HttpHeaders>
		</Detection>
		<Transcoding>
			<!-- transcode any video with DTS audio to ac3, leaving video remuxed -->
			<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="h264" aCodec="dca" />
				<Matches container="*" vCodec="mpeg2video" aCodec="dca" />
				<Matches container="*" aCodec="dts-hd" />
			</Video>
			<!-- transcode HD video unsupported by device, transcode audio regardless of codec -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="vc1" />
			</Video>
			<!-- Remux h264 video stream, transcode audio only -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="h264" aCodec="truehd" />
			</Video>
			<!-- Transcode non-H.264 video or FLAC audio -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" >
				<Matches container="*" vCodec="wmv2"/>
				<Matches container="*" vCodec="mpeg1video"/>
			</Video>
			<!-- transmux non-supported containers with MPEG2 or MP4 video and AC3 audio, which are supported by the Roku TV -->
			<Video targetContainer="mpegts"  >
				<Matches container="wtv"/>
				<Matches container="avi" />
				<Matches container="mpegvideo"/>
				<Matches container="mpeg"/>
			</Video>
			<!--<Audio targetContainer="mp3">

			</Audio> -->
		</Transcoding>
		<OnlineTranscoding>
			<Video targetContainer="mpegts"> <!-- don't transcode to ac3 -->
				<Matches container="flv" vCodec="h264" />
				<Matches container="applehttp" vCodec="h264" />
			</Video>
		</OnlineTranscoding>
		<GenericTranscoding>
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" aBitrate="512" />
		</GenericTranscoding>
		<AutomaticImageRotation>true</AutomaticImageRotation> 
		<LimitImageResolution>false</LimitImageResolution>
	</Profile>
	<Profile id="Roku4kMPM2" name="Roku 4K Media Player w/MPEG2" extendsProfileId="RokuMPApp">
		<!-- NOTE:
		-This profile does not restrict the audio to 2 channel stereo. If you are encountering audio issues, add forceStereo="true" to the
		targetContainer line after the targetACodec setting.
		-These Roku models should be able to play videos without requiring the maxVBitrate setting. You can experiment if desired.
		-Roku players do not support mepg2 video.
		-Every effort has been made to capture videos correctly. If you discover a file being transcoded unnecessarily, please report it
		in the Serviio forum in the Transcoding section.
			-->
		<Transcoding>
			<!-- transcode HD video unsupported by device, transcode audio regardless of codec -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="vc1" />
			</Video>
			<!-- Remux  video stream, transcode audio only -->
			<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="512">
				<Matches container="*" vCodec="h264" aCodec="truehd" />
				<Matches container="*" vCodec="h265" aCodec="truehd" />
				<!-- if you have audio issues with DTS HD audio, uncomment the following line to transcode DTS-HD to DD -->
				<Matches container="*" vCodec="h264" aCodec="dts-hd" /> 
				<Matches container="*" vCodec="h265" aCodec="dts-hd" />
				<Matches container="wtv"/>

			</Video>
			<!-- Transcode non-H.264 video or FLAC audio -->
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" >
				<Matches container="*" vCodec="wmv2"/>
				<Matches container="*" aCodec="flac"/>
				<Matches container="*" vCodec="mpeg1video"/>
				<!--<Matches container="*" vCodec="mpeg2video" /> -->
				<!-- transcode non-supported containers regardless of codec -->
				<Matches container="avi" />
				<Matches container="mpegvideo"/>
				<Matches container="mpeg"/>
			</Video>
			<!-- Remux audio and video streams - for DivX/Xvid in AVI/Matroska -->
			<Video targetContainer="mpegts">
				<Matches container="avi" vCodec="mpeg4" />
				<Matches container="avi" vCodec="msmpeg4" />
			</Video>
			<!-- if you have issues playing audio files, uncomment the following section to transcode MP3 -->
			<!-- <Audio targetContainer="mp3">
				<Matches container="*" />
			</Audio> -->
		</Transcoding>
		<OnlineTranscoding>
			<Video targetContainer="applehttp"> <!-- dont transcode to ac3 -->
				<Matches container="mp4" />
				<Matches container="flv" vCodec="h264" />
			</Video>
		</OnlineTranscoding>
		<GenericTranscoding>
			<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" />
		</GenericTranscoding>
	</Profile>