Mediatomb and Samsung Smart TV

Help
coccobill
2013-01-09
2013-05-30
  • coccobill
    coccobill
    2013-01-09

    Hi all,

    I have just bought a new Samsung Smart Tv and so I decided to set up my linux box as a media server.
    I decided to use mediatomb, after having also tried minidlna.

    I must say that minidlna worked out of the box, whereas with mediatomb I ran through all known problems with Samsung tvs… :-(

    Nevertheless, for many reasons I still prefer to use MT.

    For the probles:

    - To be able to see any file inside the server, I had to apply the patch by swiergot:
    https://sourceforge.net/tracker/?func=detail&aid=3532724&group_id=129766&atid=715782

    - To be able to play playable formats, I had to modify the headers:
    <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>

    - To be able to play movies done by my camera, I had to "mask" quicktime:
    <treat mimetype="video/mp4" as="mp4"/>

    Having done all of this, I have a nearly complete and working media server.
    Still, there are three points that I would fix.

    1. On the tv, I can't use  fast/reverse forward, nor pause. I have read somewhere that it should suffice to change the above FLAGS from 01700 to 02500 to obtain this. Yet, it doesn't work. How to get this?

    2. I can't see any picture thumbnail. This must be a mediatomb problem, since with minidlna I got thumbnails. How can I get them in mediatomb? Is it possible to have them for movie as well?

    3. I still need some transconding, but I can't get it to work. Namely:
    3.1 I need to resize pictures: they are too big and rendering is quite slow. I would like to resize them to *x1080. I followed the clues in
    https://sourceforge.net/projects/mediatomb/forums/forum/440751/topic/4746249
    but without success.
    3.2 I have some movie which needs reencoding.
    The relevant part of config.xml for point 3 is

      <transcoding enabled="yes">
        <mimetype-profile-mappings>
          <transcode mimetype="video/x-msvideo" using="mencoder"/>
          <transcode mimetype="image/jpg" using="jpeg-small"/>
        </mimetype-profile-mappings>
        <profiles>
          <profile name="jpeg-small" enabled="yes" type="external">
            <mimetype>image/jpeg</mimetype>
            <agent command="/usr/local/bin/jpeg-resize.sh" arguments="%in %out"/>
            <accept-url>no</accept-url>
            <first-resource>yes</first-resource>
            <hide-original-resource>yes</hide-original-resource>
            <buffer size="4000000" chunk-size="20000" fill-size="20000"/>
            <resolution>1920x1080</resolution>
          </profile>
          <profile name="mencoder" enabled="yes" type="external">
            <mimetype>video/mpeg</mimetype>
            <accept-url>yes</accept-url>
            <first-resource>yes</first-resource>
            <accept-ogg-theora>yes</accept-ogg-theora>
            <agent command="mencoder" arguments="%in -oac lavc -ovc lavc -of mpeg -lavcopts vcodec=mpeg2video:keyint=1:vbitrate=200000:vrc_maxrate=9000:vrc_buf_size=1835 -mpegopts muxrate=12000 -vf harddup -o %out"/>
            <buffer size="14400000" chunk-size="512000" fill-size="120000"/>
          </profile>
        </profiles>
      </transcoding>

    but it doesn't work. What should I modify?

    Thank you in advance for your attention

     
  • Jin
    Jin
    2013-01-09

    Hi,

    1. On the tv, I can't use fast/reverse forward, nor pause. I have read somewhere that it should suffice to change the above FLAGS from 01700 to 02500 to obtain this. Yet, it doesn't work. How to get this?

    That's the mystery about DLNA… it also depends if your TV supports only time based seek request or if it also supports the "normal" HTTP range requests. A good start is to find a server that works and to compare what flags it is sending, then apply those changes to the MediaTomb configuration.

    2. I can't see any picture thumbnail. This must be a mediatomb problem, since with minidlna I got thumbnails. How can I get them in mediatomb? Is it possible to have them for movie as well?

    Again, probably some DLNA magic strings that are missing… I think I partially did add DLNA thumbnail profile strings, but well.. also worth comparing to another server.

    3. I still need some transconding, but I can't get it to work. Namely:

    Well, what happens? Are you not able to press "play" on the selected item or is it just not displayed? Do you see that your transcoding script triggered if you watch MT's log output (maybe turn on debug output too).

    Kind regards,
    Jin

     
  • coccobill
    coccobill
    2013-01-09

    Following your suggestions, I tried again minidlna, but I couldn't find any clue for both problem.
    If somebody can read better than me, I include a link to the logs for both servers in debug mode:

    http://dl.dropbox.com/u/7972796/mediatomb.log
    http://dl.dropbox.com/u/7972796/minidlna.log

    Note that the file movie-no.avi is a file which doesn't lay properly. It is the file that I am trying to transcode. As for fast forward, it doesn't work in minidlna either. What I get is that in minidlna the only working funcions are play/pause. In mediatomb no function at all.

    As I said, thumbnails are ok in minidlna, empty in MT.

    I forgot to say that in MT I get plenty of errors of the type
    ERROR: ActionRequest::update(): response is nil, code -115
    If I am not wrong, this happens every time I change directory.
    ERROR: ActionRequest::update(): response is nil, code -115
    Regards

     
  • Jin
    Jin
    2013-01-09

    Following your suggestions, I tried again minidlna, but I couldn't find any clue for both problem. If somebody can read better than me, I include a link to the logs for both servers in debug mode:

    That's not quite what I meant, I was referring to the communication log between the server and player, i.e. a wireshark network traffic capture where the actual XML with all those DLNA flags is sent around.

    ERROR: ActionRequest::update(): response is nil, code -115

    That most likely means that MT can not parse something that the TV is sending, so there's surely a some problem there.

     
  • coccobill
    coccobill
    2013-01-10

    I never used wireshark.
    I will give it a try as soon as I can. Maybe during the weekend.
    Perhaps, if you think it is worth to MT development and something specific is needed to debug the problem, please let me know.

    Thanks again.

     
  • coccobill
    coccobill
    2013-01-12

    I am trying to post a message but the system blocks me saying that it looks like spam and cannot be posted.

    You can find the message here:

    http://dl.dropbox.com/u/7972796/message.txt

    Please post it at my place.

     
  • Jin
    Jin
    2013-01-14

    Hi,

    thanks, got your logs. I guess we just do not support DLNA - that's the main reason. But some of the hacks that are in place might still help you.

    About the flags, I read something up:
    01700000 means: streaming transfer mode, background mode, pause via http stalling supported, DLNA 1.5 version set

    02500000 means: rtp pause, background mode, DLNA 1.5

    So I'd go back to 0170, the 0250 flags seem wrong for us.

    Try setting <protocolInfo extend="yes"/> in your config.xml, if it still does not help, let it on and remove the transferMode header setting.

    Generally we'll have to rewrite some portions of MT and add proper DLNA support, current options are mostly hacks but they might get you going.

     
  • coccobill
    coccobill
    2013-01-15

    Inserting the line you suggested has been an improvement: it provided jpg thumbnails and functionig pause/play buttons while playing movies.

    Thanks.

    I still am not able to transcode movies/pictures, but for this I think I just need to guess the right command in the relative profile. Yet, I have no idea…