Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Samsung sets, MKV and transcoding

Help
Ioannis
2011-09-25
2013-05-30
  • Ioannis
    Ioannis
    2011-09-25

    Hello all,

    I have been trying for while to setup the Mediatomb with my Samsing TV(s) and Blue-ray and today I had a breakthrough that led me to a dead end so I hope that you may be able to help me. The fact is that Samsug(s) supports H.264 natively so no need to transcode mkv or mp4 that contain this video codec. They are streamed beautifully to the appliances as long as the config.xml contains the following:

    <custom-http-headers>
    <add header="transferMode.dlna.org: Streaming"/>
    <add header="contentFeatures.dlna.org: DLNA.ORG_OP=10;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000"/>
    </custom-http-headers>
    

    However, enabling transcode with this custom-http-header does not work. In fact in order to transcode for example a .3gp file using an ffmpeg the custome-http-header must be changed to:

    <custom-http-headers>
    <add header="transferMode.dlna.org: Streaming"/>
    <add header="contentFeatures.dlna.org: DLNA.ORG_OP=00;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000"/>
    </custom-http-headers>
    

    Please note that 01 became 00 and 0 became 1. When this custome-http-header is used the transcode works like a charm but the mkv and mp4 cannot be streamed. In fact I am not even getting a message about wrong format with this scenario, instead the TV seems to be loading the content and then it just bombs out to the next available playable file (my 3gp in this scenario) or to its main menu. So, it seems that I am in a situation that I can only stream or I can only transcode(?). Any help will be much appreciated.

    Kind Regards
    Ioannis

     
  • Ioannis
    Ioannis
    2011-10-01

    Hi again,

    Not sure if anybody is interested in this thread. However I had some more findings that may help the Samsung owners. So apparently there are 2 DLNA client flavours on Samsung sets. The one that I will name "old user interface" and can be seen in TV sets like the UE40B7000/7020 seems to be happy with this header (happy means both stream directly and transcode):

    <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=01700000000000000000000000000000"/> 
    </custom-http-headers>
    

    However, if you have a newer TV set or a BluRay player like the BD-C8200 then the above configuration will stream but will fail in transcoding. The newer Samsung DLNA enabled models have some more codecs available, for example they can not only play H264 but also MS Media VC1.

    The second configuration I listed in my first post (the one that 01 becomes 00 and 0 becomes 1) it enables viewing of transcoded files to the newest Samsung DLNA enabled sets but it stops any normal streaming. As for the older DLNA enabled models it makes no difference.

    My intention is to use my Bluray set instead of the TV to access the DLNA as it requires less transcoding since it supports more codecs. However having the issue that I described, I am stick with the TV set and the older user interface. Any hint by anybody as to what is the problem?

    Kind Regards
    Yiannis

     
  • BT
    BT
    2011-10-02

    Hi,

    I have a Samsung LA32C650 TV and thanks to your post I'm now able to stream transcoded audio and video.

    Previously I was only able stream supported codecs (no transcoding) using the following config:

    <add header="transferMode.dlna.org: Streaming"/>
    <add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01500000000000000000000000000000"/>
    

    I'm now using:

    <add header="transferMode.dlna.org: Streaming"/>
    <add header="contentFeatures.dlna.org: DLNA.ORG_OP=00;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000"/>
    

    As for your problem, I don't know what it could be. If you need any help testing different configs, let me know.

     
  • Ioannis
    Ioannis
    2011-10-02

    Hello and thank you for the replay,

    Indeed this settings seems to be the most stable and the one with the most view(able) options. I must make something clear here which is a big mistake from my side, actually I have just noticed. This setting will let you transcode (I am using a simple ffmpeg script see below) and stream supported formats as long as these formats are not an MKV/H264 etc!! This is my actual problem. I can transcode using:

    1
    2
    #!/bin/bash 
    exec "/usr/bin/ffmpeg" -i "${1}" -f mpeg -y "${2}"
    

    And I can view divx, xvid avi files straight out of the box without transcoding. But when I choose an HD MKV file the TV just bombs out to its menu. Not even a "format not supported". However using the "other header" you will notice that you can see all supported formats (MKV included) but the transcoded content will never reach your TV. Actually my bedroom Samsung even switches itself off after 30 seconds attempting to "do something" with the transcoded content.

    Finally, not sure if I am correct but the way I fish those settings is by looking the mediatomb log at /var/log. What I noticed is that my 2 "new" Samsung appliances (TV and BlueRay) that work with the 00-1 header, they "request" or "register" (I am not an expert on how DLNA is working) two different headers. When i select a transcoding content it seems that it requests the 00-1 and when I select an MKV content it requests a 01-0 header (you can see it by tail -f /var/log/mediatomb). That possible explains why when one is set manually in the config it excludes the functionality of the other. I tried yesterday to have both headers and what happened was the the first one was considered. So then, if this is the issue, we need to ask the mediatomb people if there is a way to automate the headers via a script or have mediatomb detect them and set them automatically.

    Kind Regards and thank you for the answer
    Yiannis

     
  • BT
    BT
    2011-10-02

    Yes you are correct regarding the MKV/H.264 files. I initially didn't notice this since most of my videos are MP4/H.264. I actually have no need to transcode since all my videos are supported. I was just testing to see if it worked in case I need it. I was more interested in getting my FLAC files to transcode.

    I think the problem really comes down to the fact that MediaTomb is not a DLNA server. The devs did implement some DLNA bits to make it work with certain devices e.g. PS3. If you want a real DLNA server, you're better of using MiniDLNA, but it doesn't support transcoding.

    You could run two instances of MediaTomb to workaround this problem. One with transcoding enabled and one without. I believe it's possible to share a single database as well. It's not the ideal solution but I doubt you'll see any action from the MediaTomb devs. This is because MediaTomb is unfortunately almost dead as a project.

     
  • Ioannis
    Ioannis
    2011-10-02

    Thanks for this, is it really dead as a project? I think I am moving to Twonky as it supports trancoding and it is a DLNA Linux server although it seems to have its issues as well. For 15 euros it is not a bad deal and seems to be supported. My problem is that the whole family has a gazillion of different formatted videos from cameras etc and if I don't get a transcoding option that will do all, I must spend my life converting files. Anyway, if you find anything about mediatomb or along the lines of a solid DLNA with transcoding option pleas drop me a line.

    Much appreciate the responses
    Yiannis

     
  • BT
    BT
    2011-10-02

    I would say it's dead. I contacted the main dev earlier in the year and although he said it's not abandoned, it was very unlikely that there would be any support or development, as he just doesn't have the time to work on it.

    I haven't used Twonky so I can't help there. You could try PS3 Media Server. It was originally written for use with a PS3, but it now supports other DLNA devices. It also has a transcoding option.

    I actually only use MediaTomb occasionally with my Samsung TV. I previously used it all the time when my primary device was a PS3. I now use XBMC which supports all codecs imaginable, so there is no need for transcoding. It also supports various network protocols like SMB and NFS. I highly recommend XBMC, but it does require dedicated hardware. I've installed it on a ASRock ION 330HT. A cheaper option would be to get a Western Digital TV Live.

     
  • Ioannis
    Ioannis
    2011-10-03

    I see what you mean. I tried Twonky yesterday but its transcoding abilities are kinda buggy while Mediatomb's are better. In essence I will give PS3MS and XBMC a try as well but quite possible I will stick with mediatomb and will bite the bullet to transcode the MKVs even though my TV supports them. I will just need a better media server than what I have. One thing I need to ask you, what do you mean by XBMC "supports all codecs with no need for transcoding"? I thought that you need transcode if your player does not support one, so if for example I have the x format that my TV does not support, how XBNC will stream it without transcoding?

    Thanks again
    YIannis

     
  • BT
    BT
    2011-10-03

    XBMC does include a basic UPnP client/server but I wasn't referring to that. What I meant was you can install XBMC, which is a media center application on dedicated hardware and access your content through XBMC. The output will go directly to your TV via HDMI so the TV doesn't need to do anything. It's a more expensive solution since you need to buy hardware to install it on. But it's way better than any media capabilities you will find in a TV.

     
  • Ioannis
    Ioannis
    2011-10-03

    Got it now….. I have the feeling that Mediatomb is still the best solution if only the devs could put some more effort :((