I have a  Samsung TV. So the whole explanation below is based on this TV. I guess that it will also work for the other TV’s.

The solution given below is done with MediaTomb DLNA server.

$ sudo apt-get install mediatomb

$ vim /etc/mediatomb/config.xml

remove the comment tags around the <custom-http-headers> section and make that section look like this:

<custom-http-headers>
<add header=”transferMode.dlna.org: Streaming”/>
<add header=”contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=017000 00000000000000000000000000″/>
</custom-http-headers>

Under <mappings>, add

<map from=”avi” to=”video/mpeg”/>

<map from=”mkv” to=”video/mpeg”/>

save and close config.xml and restart mediatomb

$ vim /etc/default/mediatomb

Add additional option

OPTIONS=” –port 49152 “

$ /etc/init.d/mediatomb restart

And now, open with firefox http://ip_raspberrypi:49152 and tell it where to start looking for files.