diff -Naur mediatomb-0.12.1-orig/src/cds_resource_manager.cc mediatomb-0.12.1/src/cds_resource_manager.cc
--- mediatomb-0.12.1-orig/src/cds_resource_manager.cc	2014-01-29 08:48:17.000000000 +0100
+++ mediatomb-0.12.1/src/cds_resource_manager.cc	2014-01-29 09:05:18.613067496 +0100
@@ -428,10 +428,15 @@
         if (config->getBoolOption(CFG_SERVER_EXTEND_PROTOCOLINFO))
         {
             String extend;
+            log_debug("RBEV: %s\n", contentType.c_str());
             if (contentType == CONTENT_TYPE_MP3)
                 extend = _(D_PROFILE) + "=" + D_MP3 + ";";
             else if (contentType == CONTENT_TYPE_PCM)
                 extend = _(D_PROFILE) + "=" + D_LPCM + ";";
+            else if (contentType == CONTENT_TYPE_MPEG)
+	        extend = _(D_PROFILE) + "=" + D_MPEG_PS_PAL + ";";
+	    else if (contentType == CONTENT_TYPE_M2TS)
+	        extend = _(D_PROFILE) + "=" + AVC_TS_HD_24 + ";";
             else if (contentType == CONTENT_TYPE_JPG)
             {
                 String resolution = res_attrs->get(MetadataHandler::getResAttrName(R_RESOLUTION));
@@ -459,20 +464,23 @@
                         extend = _(D_PROFILE) + "=" + D_JPEG_LRG+";";
                 }
             }
+	    else
+	        extend = _(D_PROFILE) + "=" + D_MPEG_PS_PAL + ";";
 
 #ifdef EXTERNAL_TRANSCODING
         // we do not support seeking at all, so 00
         // and the media is converted, so set CI to 1
-        if (!isExtThumbnail && transcoded)
-        {
-            extend = extend + D_OP + "=00;" + 
-                     D_CONVERSION_INDICATOR + "=" D_CONVERSION;
-
-            if (mimeType.startsWith(_("audio")) || 
-                mimeType.startsWith(_("video")))
-                extend = extend + ";" D_FLAGS "=" D_TR_FLAGS_AV;
-        }
-        else
+//        if (!isExtThumbnail && transcoded)
+//        {
+//            log_debug("RBEV: Transcoded\n");
+//            extend = extend + D_OP + "=00;" + 
+//                     D_CONVERSION_INDICATOR + "=" D_CONVERSION;
+//
+//            if (mimeType.startsWith(_("audio")) || 
+//                mimeType.startsWith(_("video")))
+//                extend = extend + ";" D_FLAGS "=" D_TR_FLAGS_AV;
+//        }
+//        else
 #endif
         extend = extend + D_OP + "=01;" + 
                  D_CONVERSION_INDICATOR + "=" + D_NO_CONVERSION;
diff -Naur mediatomb-0.12.1-orig/src/common.h mediatomb-0.12.1/src/common.h
--- mediatomb-0.12.1-orig/src/common.h	2014-01-29 08:48:17.000000000 +0100
+++ mediatomb-0.12.1/src/common.h	2014-01-29 09:05:18.619065651 +0100
@@ -83,7 +83,35 @@
     #define D_JPEG_TN                   "JPEG_TN"
     #define D_JPEG_SM_ICO               "JPEG_SM_ICO"
     #define D_JPEG_LRG_ICO              "JPEG_LRG_ICO"
+    #define D_MPEG_PS_PAL               "MPEG_PS_PAL"
+    #define AVC_TS_HD_24		"AVC_TS_HD_24_AC3_T"
+    
+    #define D_WMVMED_BASE               "WMVMED_BASE"
+    #define D_WMA_BASE                  "WMABASE"
+
+    // shouldnt be hardcoded, aint magic - 01 for file 10 for transcoded seems like a good idea
+    #define DLNA_MAGIC			"01" 
+
+    // DLNA.ORG_OP : 1er 10 = time based seek exemple: TimeSeekRange.dlna.org :npt=187.000-
+    //                   01 = octets range (like CONTENT-RANGE)
+    //                   00 = no range, no seeking or pause possible
+    //  #define D_FLAGS 		"8d700000000000000000000000000000"
+    
+    //dlna feture bitmask (D_FLAGS)
+    #define	senderPaced			0x800
+    #define	lsopTimeBasedSeekSupported	0x400
+    #define	lsopByteBasedSeekSupported	0x200
+    #define	playcontainerSupported		0x100
+    #define	s0IncreasingSupported		 0x80
+    #define	sNIncreasingSupported		 0x40
+    #define	rtspPauseSupported		 0x20
+    #define	streamingTransferModeSupported	 0x10
+    #define	interactiveTransferModeSupported  0x8
+    #define	backgroundTransferModeSupported	  0x4
+    #define	connectionStallingSupported	  0x2
+    #define dlnaVersion15Supported		  0x1
 #endif
+
 // fixed CdsObjectIDs
 #define CDS_ID_BLACKHOLE                -1
 #define CDS_ID_ROOT                     0
diff -Naur mediatomb-0.12.1-orig/src/config_manager.cc mediatomb-0.12.1/src/config_manager.cc
--- mediatomb-0.12.1-orig/src/config_manager.cc	2014-01-29 08:48:17.000000000 +0100
+++ mediatomb-0.12.1/src/config_manager.cc	2014-01-29 09:05:18.632061697 +0100
@@ -641,10 +641,16 @@
                                            _(CONTENT_TYPE_PLAYLIST)));
     mtcontent->appendElementChild(treat_as(_("audio/x-wav"), 
                                            _(CONTENT_TYPE_PCM)));
+    mtcontent->appendElementChild(treat_as(_("audio/x-ms-wma"), 
+                                           _(CONTENT_TYPE_WMA)));
     mtcontent->appendElementChild(treat_as(_("audio/L16"), 
                                            _(CONTENT_TYPE_PCM)));
+    mtcontent->appendElementChild(treat_as(_("video/divx"), 
+                                           _(CONTENT_TYPE_AVI)));
     mtcontent->appendElementChild(treat_as(_("video/x-msvideo"), 
                                            _(CONTENT_TYPE_AVI)));
+    mtcontent->appendElementChild(treat_as(_("video/x-ms-wmv"), 
+                                           _(CONTENT_TYPE_WMV)));
     mtcontent->appendElementChild(treat_as(_("video/mp4"), 
                                            _(CONTENT_TYPE_MP4)));
     mtcontent->appendElementChild(treat_as(_("audio/mp4"), 
@@ -1351,6 +1357,7 @@
         mime_content->put(_("audio/L16"), _(CONTENT_TYPE_PCM));
         mime_content->put(_("video/x-msvideo"), _(CONTENT_TYPE_AVI));
         mime_content->put(_("video/mpeg"), _(CONTENT_TYPE_MPEG));
+        mime_content->put(_("video/m2ts"), _(CONTENT_TYPE_M2TS));
         mime_content->put(_("application/x-iso9660"), _(CONTENT_TYPE_DVD));
         mime_content->put(_("application/x-iso9660-image"), _(CONTENT_TYPE_DVD));
     }
diff -Naur mediatomb-0.12.1-orig/src/file_request_handler.cc mediatomb-0.12.1/src/file_request_handler.cc
--- mediatomb-0.12.1-orig/src/file_request_handler.cc	2014-01-29 08:48:17.000000000 +0100
+++ mediatomb-0.12.1/src/file_request_handler.cc	2014-01-29 09:16:41.057117305 +0100
@@ -357,6 +357,51 @@
                     }
             }
 
+#ifdef EXTERNAL_TRANSCODING
+	if (!is_srt && string_ok(tr_profile)) {
+        log_debug("sizeof off_t %d, statbuf.st_size %d\n", sizeof(off_t), sizeof(statbuf.st_size));
+	//transcoding
+	unsigned int tmpD_FLAGS = senderPaced | lsopTimeBasedSeekSupported | lsopByteBasedSeekSupported | playcontainerSupported | s0IncreasingSupported | sNIncreasingSupported | rtspPauseSupported | streamingTransferModeSupported | interactiveTransferModeSupported | backgroundTransferModeSupported | connectionStallingSupported | dlnaVersion15Supported;
+	char D_SONY_FLAGS[33];
+	sprintf(D_SONY_FLAGS, "%x", tmpD_FLAGS);
+	
+		header = header + _("\r\n");
+		header = header + _("contentFeatures.dlna.org: DLNA.ORG_OP=10;DLNA.ORG_CI=") + D_CONVERSION + _(";") +  _("DLNA.ORG_FLAGS=") + D_SONY_FLAGS + _("0000000000000000000000000000\r\n");
+		//String duration = item->getResource(0)->getAttribute(MetadataHandler::getResAttrName(R_DURATION));
+	header = header + _("TimeSeekRange.dlna.org: NPT=180.000-")  + _("\r\n"); //+ duration
+	} else {
+#endif
+	//not transcoding
+	unsigned int tmpD_FLAGS = senderPaced | lsopTimeBasedSeekSupported | lsopByteBasedSeekSupported | playcontainerSupported | s0IncreasingSupported | sNIncreasingSupported | rtspPauseSupported | streamingTransferModeSupported | interactiveTransferModeSupported | backgroundTransferModeSupported | connectionStallingSupported | dlnaVersion15Supported;
+	char D_SONY_FLAGS[33];
+	sprintf(D_SONY_FLAGS, "%x", tmpD_FLAGS);
+		header = header + _("\r\n");
+		header = header + _("contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=") + D_NO_CONVERSION + _(";") + _("DLNA.ORG_FLAGS=") + D_SONY_FLAGS + _("0000000000000000000000000000\r\n");
+		header = header + _("Accept-Ranges: bytes") + _("\r\n");
+#ifdef EXTERNAL_TRANSCODING
+	}
+#endif
+	
+				// DLNA.ORG_OP : 1er 10 = exemple: TimeSeekRange.dlna.org :npt=187.000-
+				//                   01 = Range par octets
+				//                   00 = pas de range, meme pas de pause possible
+	/*  from mythtv
+	 // ----------------------------------------------------------------------
+	    // Temp Hack to process DLNA header
+	
+	    QString sValue = GetHeaderValue( "getcontentfeatures.dlna.org", "0" );
+	
+	    if (sValue == "1")
+	        sHeader += "contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;"
+	                   "DLNA.ORG_FLAGS=01500000000000000000000000000000\r\n";
+	*/
+	
+	//String duration = item->getResource(0)->getAttribute(MetadataHandler::getResAttrName(R_DURATION));
+	//header = header + _("TimeSeekRange.dlna.org: NPT=0.000-")  + _("\r\n"); //+ duration
+	/* from ps3mediaserver
+	http://code.google.com/p/ps3mediaserver/source/browse/trunk/ps3mediaserver/net/pms/network/RequestHandler.java?spec=svn273&r=273
+	*/
+
         if (!string_ok(mimeType))
             mimeType = item->getMimeType();
 
@@ -730,6 +775,32 @@
                 header = header + _("Accept-Ranges: bytes");
             }
 
+#ifdef EXTERNAL_TRANSCODING
+	    if (!is_srt && string_ok(tr_profile)) {
+	    //transcoding
+	    unsigned int tmpD_FLAGS = senderPaced | lsopTimeBasedSeekSupported | lsopByteBasedSeekSupported | playcontainerSupported | s0IncreasingSupported | sNIncreasingSupported | rtspPauseSupported | streamingTransferModeSupported | interactiveTransferModeSupported | backgroundTransferModeSupported | connectionStallingSupported | dlnaVersion15Supported;
+	    char D_SONY_FLAGS[33];
+	    sprintf(D_SONY_FLAGS, "%x", tmpD_FLAGS);
+	     
+	    header = header + _("\r\n");
+	    header = header + _("contentFeatures.dlna.org: DLNA.ORG_OP=10;DLNA.ORG_CI=") + D_CONVERSION + _(";") +  _("DLNA.ORG_FLAGS=") + D_SONY_FLAGS + _("0000000000000000000000000000\r\n");
+	    //String duration = item->getResource(0)->getAttribute(MetadataHandler::getResAttrName(R_DURATION));
+	    //header = header + _("TimeSeekRange.dlna.org: NPT=180.000-")  + _("\r\n"); //+ duration
+	    header = header + _("TimeSeekRange.dlna.org: NPT=180.000-"); //+ duration
+	    } else {
+#endif
+	    //not transcoding
+	    unsigned int tmpD_FLAGS = senderPaced | lsopTimeBasedSeekSupported | lsopByteBasedSeekSupported | playcontainerSupported | s0IncreasingSupported | sNIncreasingSupported | rtspPauseSupported | streamingTransferModeSupported | interactiveTransferModeSupported | backgroundTransferModeSupported | connectionStallingSupported | dlnaVersion15Supported;
+	    char D_SONY_FLAGS[33];
+	    sprintf(D_SONY_FLAGS, "%x", tmpD_FLAGS);
+	    	header = header + _("\r\n");
+	    	header = header + _("contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=") + D_NO_CONVERSION + _(";") + _("DLNA.ORG_FLAGS=") + D_SONY_FLAGS + _("0000000000000000000000000000\r\n");
+	    //	header = header + _("Accept-Ranges: bytes") + _("\r\n");
+	    	header = header + _("Accept-Ranges: bytes");
+#ifdef EXTERNAL_TRANSCODING
+	    }
+#endif
+
 #ifdef EXTEND_PROTOCOLINFO
             header = getDLNAtransferHeader(mimeType, header);
 #endif
@@ -750,5 +821,28 @@
             PlayHook::getInstance()->trigger(obj);
             return io_handler;
         }
+    
+    /*  from mythtv
+     // ----------------------------------------------------------------------
+        // Temp Hack to process DLNA header
+    
+        QString sValue = GetHeaderValue( "getcontentfeatures.dlna.org", "0" );
+    
+        if (sValue == "1")
+            sHeader += "contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;"
+                       "DLNA.ORG_FLAGS=01500000000000000000000000000000\r\n";
+    */
+    /* from ps3mediaserver
+    http://code.google.com/p/ps3mediaserver/source/browse/trunk/ps3mediaserver/net/pms/network/RequestHandler.java?spec=svn273&r=273
+    */
+    /*
+    when seeking the client will send a request like that: (when using time based seek)
+    
+    GET /content/media/object_id/10/res_id/0/ext/file.mpeg HTTP/1.1
+    TimeSeekRange.dlna.org: npt=65.400-66.400
+    
+    how would one catch that properly from inside mt and do the seek, and in case of transcoding pass it to the script (%ss?)
+    */
+
     }
 }
diff -Naur mediatomb-0.12.1-orig/src/metadata_handler.h mediatomb-0.12.1/src/metadata_handler.h
--- mediatomb-0.12.1-orig/src/metadata_handler.h	2014-01-29 08:48:16.000000000 +0100
+++ mediatomb-0.12.1/src/metadata_handler.h	2014-01-29 09:05:18.639059565 +0100
@@ -55,8 +55,11 @@
 #define CONTENT_TYPE_PCM        "pcm"
 #define CONTENT_TYPE_AVI        "avi"
 #define CONTENT_TYPE_MPEG       "mpeg"
+#define CONTENT_TYPE_M2TS       "m2ts"
 #define CONTENT_TYPE_DVD        "dvd"
 #define CONTENT_TYPE_QUICKTIME  "quicktime"
+#define CONTENT_TYPE_WMA        "wma"
+#define CONTENT_TYPE_WMV        "wmv"
 #define CONTENT_TYPE_MKV        "mkv"
 #define CONTENT_TYPE_MKA        "mka"
 
diff -Naur mediatomb-0.12.1-orig/src/tools.cc mediatomb-0.12.1/src/tools.cc
--- mediatomb-0.12.1-orig/src/tools.cc	2014-01-29 08:48:17.000000000 +0100
+++ mediatomb-0.12.1/src/tools.cc	2014-01-29 09:05:18.650056214 +0100
@@ -430,13 +430,48 @@
 
 String mime_types_to_CSV(Ref<Array<StringBase> > mimeTypes)
 {
+    #ifdef EXTEND_PROTOCOLINFO
+        bool extend = ConfigManager::getInstance()->getBoolOption(CFG_SERVER_EXTEND_PROTOCOLINFO);
+    
+        Ref<Dictionary> mappings;
+        if (extend)
+            mappings = ConfigManager::getInstance()->
+              getDictionaryOption(CFG_IMPORT_MAPPINGS_MIMETYPE_TO_CONTENTTYPE_LIST);
+    #endif
+
     Ref<StringBuffer> buf(new StringBuffer());
+    String last = _(":*");
     for (int i = 0; i < mimeTypes->size(); i++)
     {
         if (i > 0)
             *buf << ",";
         String mimeType = mimeTypes->get(i);
-        *buf << "http-get:*:" << mimeType << ":*";
+	#ifdef EXTEND_PROTOCOLINFO
+	        if (extend)
+	        {
+	        /// \todo remove these hacks once we add proper DLNA support
+	            String ct = mappings->get(mimeType);
+	            if (ct == CONTENT_TYPE_MP3)
+	                last = _(":" D_PROFILE) + "=" + D_MP3 + ";" + D_OP + "=01";
+	            else if (ct == CONTENT_TYPE_PCM)
+	                last = _(":" D_PROFILE) + "=" + D_LPCM + ";" + D_OP + "=01";
+	            else if (ct == CONTENT_TYPE_JPG)
+	                last = _(":" D_PROFILE) + "=" + D_JPEG_MED + ";" + D_OP + "=01";
+	            else if (ct == CONTENT_TYPE_MPEG)
+	                last = _(":" D_PROFILE) + "=" + D_MPEG_PS_PAL + ";" + D_OP + "=" + DLNA_MAGIC;
+		    else if (ct == CONTENT_TYPE_M2TS)
+	                last = _(":" D_PROFILE) + "=" + AVC_TS_HD_24 + ";" + D_OP + "=" + DLNA_MAGIC;
+	            else if (ct == CONTENT_TYPE_AVI)
+	                last = _(":" D_PROFILE) + "=" + D_MPEG_PS_PAL + ";" + D_OP + "=" + DLNA_MAGIC;
+	            else if (ct == CONTENT_TYPE_WMV)
+	                last = _(":" D_PROFILE) + "=" + D_WMVMED_BASE + ";" + D_OP + "=01";
+	            else if (ct == CONTENT_TYPE_WMA)
+	                last = _(":" D_PROFILE) + "=" + D_WMA_BASE + ";" + D_OP + "=01";
+	            else
+	                last = _(":*");
+	        }
+	#endif
+	*buf << "http-get:*:" << mimeType << last;
     }
 
     return buf->toString();
diff -Naur mediatomb-0.12.1-orig/src/upnp_xml.cc mediatomb-0.12.1/src/upnp_xml.cc
--- mediatomb-0.12.1-orig/src/upnp_xml.cc	2014-01-29 08:48:17.000000000 +0100
+++ mediatomb-0.12.1/src/upnp_xml.cc	2014-01-29 09:05:18.654054995 +0100
@@ -217,10 +217,15 @@
         //we do not do DLNA yet but this is needed for bravia tv (v5500)
         Ref<Element> DLNADOC(new Element(_("dlna:X_DLNADOC")));
         DLNADOC->setText(_("DMS-1.50"));
-//      DLNADOC->setText(_("M-DMS-1.50"));
+        DLNADOC->setText(_("M-DMS-1.50"));
         DLNADOC->setAttribute(_("xmlns:dlna"), 
                                         _("urn:schemas-dlna-org:device-1-0"));
         device->appendElementChild(DLNADOC);
+
+        Ref<Element> DLNACAP(new Element(_("dlna:X_DLNACAP")));
+        DLNACAP->setText(_("av-upload,image-upload,audio-upload"));
+        DLNACAP->setAttribute(_("xmlns:dlna"), _("urn:schemas-dlna-org:device-1-0"));
+        device->appendElementChild(DLNACAP);
     }
 #endif
 
