Jump to content

Add Customize UPNP Device


Tomate Lam

Recommended Posts

I want to add my upnp device by modifying the uPnPProfilesV2.xml. Is there any documentation for those options so that i could make my own profile?

 

For example:

1. What is the use for "<Extensions>" and "<LiveExtensions>"?

2. Those <MediaFormat> element under <Ext name="######">, are they the type supported by the device or vice versus?

3. If i want certain type to be transcoded before streaming to the device, how could i do that?

 

A simple instruction would be very helpful, can anyone help? :)

Link to comment

3. not possible with the Recording Service.

 

And the other things are only to change the name of some formats. Because some clients only work if they get expect the expected message.

Link to comment

3. not possible with the Recording Service.

 

And the other things are only to change the name of some formats. Because some clients only work if they get expect the expected message.

 

So is there any way i can get the expected message of my device? Seems i cannot see any relevant message in the upnpdebug.log (Upnp debug already enabled)

 

Here is my modified profile, but when i try to play the video (*.mkv, *.ts), nothing was streamed to the device.

Is there any problem with my profile?

<profile name="KWorld M200">
     <UserAgent/>
     <X-AV-Client-Info>.*AVOS/1.1 libhttp/1.1 UPnP/1.0 DLNADOC/1.50.*</X-AV-Client-Info>
     <Extensions>
	<Ext name=".ts">
         <MediaFormat mime-type="video/mpeg" special="MPEG2">*</MediaFormat>
         <MediaFormat mime-type="video/mpeg" special="H264">*</MediaFormat>
       </Ext>
	<Ext name=".mkv">
         <MediaFormat mime-type="video/x-matroska" special="">MATROSKA</MediaFormat>
       </Ext>
  </Extensions>
     <AudioExtensions/>
  <LiveExtensions>
	<Ext name=".ts">
         <MediaFormat mime-type="video/mp2t" special="H264" alias=".mpgts" transcode="0" hassize="0" allaudio="0" bufsize="0">*</MediaFormat>
         <MediaFormat mime-type="video/mp2t" special="MPEG2" alias=".mpg" transcode="0" hassize="0" allaudio="0" bufsize="0">*</MediaFormat>
       </Ext>
       <Ext name=".mp2">
         <MediaFormat mime-type="audio/wav" special="" alias=".wav" transcode="-1" hassize="-1" allaudio="0" bufsize="0">DLNA.ORG_OP=00</MediaFormat>
       </Ext>
     </LiveExtensions>
     <PhotoExtensions>
       <Ext name=".jpg">
         <MediaFormat mime-type="image/jepg" special="" maxWidth="160" maxHeight="160">JPEG_TN</MediaFormat>
         <MediaFormat mime-type="image/jepg" special="" maxWidth="640" maxHeight="480">JPEG_SM</MediaFormat>
         <MediaFormat mime-type="image/jepg" special="" maxWidth="1024" maxHeight="768">JPEG_MED</MediaFormat>
         <MediaFormat mime-type="image/jepg" special="" maxWidth="4096" maxHeight="4096">JPEG_LRG</MediaFormat>
       </Ext>
       <Ext name=".png">
         <MediaFormat mime-type="image/png" special="" maxWidth="160" maxHeight="160">PNG_TN</MediaFormat>
         <MediaFormat mime-type="image/png" special="" maxWidth="4096" maxHeight="4096">PNG_LRG</MediaFormat>
       </Ext>
     </PhotoExtensions>
   </profile>

 

Anyway, thanks for your help :)

Link to comment

What can you stream with the standard xml? Can you see the "DVBViewer Media Server" in your device? If not, you have to fix the set-up first.

btw. adding media types doesn't mean that the device can handle it ;)

Link to comment

What can you stream with the standard xml? Can you see the "DVBViewer Media Server" in your device? If not, you have to fix the set-up first.

btw. adding media types doesn't mean that the device can handle it ;)

 

I cannot stream anything with the standard xml, that's why i try to make my own profile. I used to use TVersity (another Upnp server) to stream the media (mkv, rmvb, ts...etc), it has no problem (except it start charging for license now). Today, i just saw RS support UPnp too (sorry, i did not visit here for a long time, since DVBViewer is really stable :)), so i just want to give it a try. I can see the "DVBViewer Media Server" in my device, just when i play the file, nothing is stream to the device.

 

Thanks for the advice.

 

Btw, here is my device specification:

http://us.kworld-global.com/main/prod_in.aspx?mnuid=1306&modid=10&prodid=629&flag=1

I think it support pretty much file format, just i cannot sure what mimetype it is expecting.

 

Below is my TVersity profile which works with my device

<profile id="99ab8762-w706-6674-bdd1-fa14a3222cb7">
	<friendlyName>KWorld M200</friendlyName>
	<manufacturerName>KWorld</manufacturerName>
	<modelName>KWorld M200</modelName>
	<icon>/images/device_icon_ps3.png</icon>

	<!-- 
		inUASubstr - Used to identify the media hub we are dealing with.
		Via web browser:
		User-Agent: AVOS/1.1 libhttp/1.1 UPnP/1.0 DLNADOC/1.50

		Note: The PS3 has similar user agent. The VGP user agent is a subsring of the PS3 and hence the PS3 profile has to be considerd before the Vaio so that PS3 won't mistakenly be identified as Vaio, this means the profile has to be in the file AFTER the Vaio
	 -->		 
	<HTTPHeader inUASubstr="AVOS/1.1 libhttp/1.1 UPnP/1.0 DLNADOC/1.50"/>

	<!-- The Name of the media serverdevice description file that should be used in conjunction with a player that
            corresponds to this profile -->
	<deviceDescription name="UPNP_AV_MediaServer_1.0.default.xml"/>

	<!-- The container identifier media players of this profile expect -->
	<contentDirectory shortUrl="true" friendlyFilename="true"/>

	<!-- When transcoding is needed to which format should we transcode -->
	<transcodeTarget audio="audio/mpeg" video="video/mpeg2" photo="image/jpeg"
                        onlineAudio="audio/mpeg" onlineVideo="video/mpeg2" onlinePhoto="image/jpeg"
                        adjustReadStartPos="false"/>

	<maxVideoInfo width="1920" height="1080" bitrate="2000000" fps="25"></maxVideoInfo><!-- MPEG1,2,4 at 1080p is supported -->
	<minVideoInfo width="0" height="0" bitrate="0" fps="0"></minVideoInfo>

	<maxImageInfo width="1920" height="1080"></maxImageInfo>
	<minImageInfo width="0" height="0"></minImageInfo>

	<maxAudioInfo sampleRate="48000" bitsperSample="16" nchannels="2" bitrate="320000"></maxAudioInfo>
	<minAudioInfo sampleRate="11025" bitsperSample="16" nchannels="1" bitrate="32000"></minAudioInfo>		

	<!-- <fileInfo maxVideoSize="4294967295" maxAudioSize="2147483647"/> -->

	<mimetypeList>
		<mimetype value="audio/x-wav"/><!-- WAV audio format-->
		<mimetype value="audio/wav" rename="audio/x-wav"/><!-- Another mume type used for WAV audio format-->
		<mimetype value="audio/wave" rename="audio/x-wav"/><!-- Another mume type used for WAV audio format-->
		<mimetype value="audio/x-pn-wav" rename="audio/x-wav"/><!-- Another mume type used for WAV audio format-->
		<mimetype value="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/mp3"  rename="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/x-mpeg" rename="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/x-mp3" rename="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/mpeg3" rename="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/x-mpeg3" rename="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/mpg" rename="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/x-mpg" rename="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/x-mpegaudio" rename="audio/mpeg"/><!-- MP3 audio format-->
		<mimetype value="audio/x-ms-wma"><!--WMA audio format--> <!-- WMA DRM, pro, lossless not supported -->
			<codec name="WMAV1"/>
			<codec name="WMAV2"/>
			<!-- Not supported<codec name="0x0162"/><codec name="WMAPRO"/>--><!-- WMA 9 Professional-->
			<!-- Not supported<codec name="0x0163"/>--><!-- WMA 9 Lossless-->
		</mimetype>
		<mimetype value="audio/x-ms-asf" rename="audio/x-ms-wma"/>
		<mimetype value="audio/mp4">
			<codec name="AAC"/><!-- MPEG4 AAC-->
		</mimetype> 
		<mimetype value="audio/m4a" rename="audio/mp4"/><!--MPEG4 audio format-->
		<mimetype value="audio/x-aac" rename="audio/mp4"/><!--MPEG4 audio format-->
		<mimetype value="audio/aac" rename="audio/mp4"/><!--MPEG4 audio format-->

		<mimetype value="image/bmp"/><!-- BMP image format-->
		<mimetype value="image/jpeg"/><!-- jpeg image format-->
		<mimetype value="image/png"/><!-- PNG image format-->

		<mimetype value="video/mpeg"/><!-- MPEG (1 or 2 program or transport stream) video format-->
		<mimetype value="video/mp1s" rename="video/mpeg"/><!-- MPEG1 system stream video format-->			
		<mimetype value="video/mpeg2" rename="video/mpeg"/><!-- MPEG2 (program or transport stream) video format-->
		<mimetype value="video/mp2p" rename="video/mpeg"/><!-- MPEG2 program stream (VOB) video format-->
		<mimetype value="video/dvd" rename="video/mpeg"/><!-- MPEG2 program stream (VOB) video format-->
		<mimetype value="video/mp2t"/><!-- MPEG2 transport stream video format-->

		<mimetype value="video/mp4"><!-- MPEG4 video format-->
			<codec name="MPEG4"/><!-- XVID, h263, DIVX version 4/5 and any mpeg4 ASP (layer 5) compliant stream (H264, AKA MPEG4 AVC or MPEG4 layer 10 or MPEG4.10, is not included here)-->
			<codec name="H264"/> <!-- H264, AKA MPEG4 AVC or MPEG4 layer 10 or MPEG4.10 -->
			<codec name="AC3"/><!-- Dolby Digital AC3 Audio-->
			<codec name="DTS"/><!-- DTS Audio-->
			<codec name="AAC"/><!-- MPEG4 AAC-->
			<codec name="MP3" maxBitrate="320000"/><!-- MPEG1 Layer 3 Audio-->
		</mimetype>
		<mimetype value="video/MP4V-ES" rename="video/mp4"/><!-- MPEG4 video format-->
		<mimetype value="video/h264" rename="video/mp4"/><!-- MPEG4 video format-->
		<mimetype value="video/mp4v" rename="video/mp4"/><!-- MPEG4 video format-->

		<mimetype value="video/avi"><!-- AVI video format-->
			<codec name="MPEG4"/><!-- XVID, h263, DIVX version 4/5 and any mpeg4 ASP (layer 5) compliant stream (H264, AKA MPEG4 layer 10, is not included here)-->
			<codec name="H264"/> <!-- H264, AKA MPEG4 AVC or MPEG4 layer 10 or MPEG4.10 -->
			<codec name="MP2"/><!-- MPEG2 Audio--><!-- never tested in AVI-->
			<codec name="AC3"/><!-- Dolby Digital AC3 Audio-->
			<codec name="DTS"/><!-- DTS Audio-->
			<codec name="MP3"/><!-- MPEG1 Layer 3 Audio-->
		</mimetype>
		<mimetype value="video/x-msvideo" rename="video/avi"/><!-- AVI video format-->

		<mimetype value="video/x-ms-asf" rename="video/x-ms-wmv"/>
		<mimetype value="application/x-ms-asf" rename="video/x-ms-wmv"/>

		<!-- matroska -->
		<mimetype value="video/matroska">
			<codec name="MPEG4"/>
			<codec name="H264"/>
			<codec name="AC3"/>
			<codec name="DTS"/>
			<codec name="AAC"/>
		</mimetype>
		<mimetype value="video/x-mkv" rename="video/matroska"/>

		<mimetype value="video/quicktime"><!-- MOV video format-->
			<codec name="H264" /> <!-- H264, AKA MPEG4 AVC or MPEG4 layer 10 or MPEG4.10 -->
			<codec name="AAC" /><!-- MPEG4 AAC-->
		</mimetype>

		<mimetype value="video/mp2t"><!-- MPEG2 TS video format-->
			<codec name="H264" /> <!-- H264, AKA MPEG4 AVC or MPEG4 layer 10 or MPEG4.10 -->
			<codec name="AAC" /><!-- MPEG4 AAC-->
			<codec name="MP3" /><!-- MPEG1 Layer 3 Audio-->
		</mimetype>
	</mimetypeList>
</profile>

Edited by Tomate Lam
Link to comment
×
×
  • Create New...