Telegent Airmedia TG100

2005-05-08
2013-05-30
  • Hi,
    I recently bought the TG100 and was surprised how crappy their delivered server software is - besides it is windows-only, it refuses to allow resources from network shares (my mp3s live all on my linux box).

    So I came across to try mediatomb and was fairly impressed. It's very stable, fast and easy to install, setup and run.

    AlthoughI ran into one problem: mp3 playlists (both .m3u and .pls) - neither gets recognized correctly.
    I tried fiddling with the mime types (tried manually setting to "audio/x-mpegurl" and "audio/x-scpls"), but no go - the device says "unsupported content".
    For reference, I tried Intel's demo server "from the UPnP Tools package" and it serves mp3 playlists well (but again: windows only, no sources).

    I fiddled with ethereal on both boxes and it seems not to look very different:

    On Linux (mediatomb)
    ----------8<----------8<-------------
    GET /content/media?object%5Fid=4 HTTP/1.1
    Host: 192.168.194.1
    User-Agent: dma/1.0 (http://www.cybertan.com.tw/)
    getcontentFeatures.dlna.org: 1
    Icy-MetaData:0

    HTTP/1.1 200 OK
    CONTENT-LENGTH: 187
    CONTENT-TYPE: application/octet-stream
    DATE: Sun, 08 May 2005 20:26:13 GMT
    LAST-MODIFIED: Sun, 08 May 2005 18:57:55 GMT
    SERVER: Linux/2.4.21-286-smp4G, UPnP/1.0, Intel SDK for UPnP devices /1.2
    CONNECTION: close

    [playlist]
    numberofentries=2
    File1=http://205.188.234.4:8006
    Title1=FlareSOUND DeepBeats 1
    Length1=-1
    File2=http://205.188.209.193:80/stream/1033
    Title2=FlareSOUND DeepBeats 2
    Length2=-1
    ----------8<----------8<-------------

    on Windows (Intel Server):
    ----------8<----------8<-------------
    GET /MediaServerContent_0/3/0000000000000008/0_0_playlists%20-%20flaresound-boulevard_pls.pls HTTP/1.1
    HOST: 192.168.194.2

    HTTP/1.1 200 OK
    Transfer-Encoding: Chunked
    Server: Intel CEL / CLR MiniWebServer
    Content-Type: application/octet-stream

    104
    [playlist]
    numberofentries=2
    File1=http://205.188.234.4:8006
    Title1=FlareSOUND DeepBeats - A Deep, Jazzy, Sexy Somthin - FlareSOUND.com
    Length1=-1
    File2=http://205.188.209.193:80/stream/1033
    Title2=FlareSOUND DeepBeats - A Deep, Jazzy, Sexy Somthin
    Length2=-1

    0

    ----------8<----------8<-------------

    The only difference I saw is that on mediatomb, the device first issues a HEAD to the $URL, followed by a GET, while when talking to the Intel server no HEAD ist requested.

    Could you give me some hints on how to enable mp3 playlist support or is there something I can tweak in the config file (had to patch my /usr/share/misc/mime to recognize m3u files as audio/x-mpegurl but as I told, no effect).

    Anyway, it its planned for next releases so I would appreciate to place this issue on your wish list ;-))

    Thanks for your work!

    Greetings from Germany,
    Marv

     
    • Jin
      Jin
      2005-05-09

      Hi!

      Nice to hear that you liked the server, thanks :)

      I downloaded the AirMediaServer and looked at how it servers m3u playlists. I think the HTTP stuff has nothing to do with the problem you are having. Quite interesting to see, that they use application/octet-stream as the mime-type for m3u playlists... but I think I know why your device refuses to recognize the playlist as a playlist - it's probably because of the upnp:class.

      Try setting the upnp:class of your playlist to: object.item.playlistItem and see if that helps...

      We already have automatic mime-type to upnp:class mappings (can be set in the config file), next version will also introduce a file-extension to mime-type mapping so you could  build a chain there: mapping all m3u files to audio/x-mpegurl mimetype and then mapping this to the object.item.playlistItem upnp:class.

      Please tell me if this solved your problem!

      Greetings from Austria,
      Jin

       
    • Hey,
      thanks for your quick reply. You're better than commercial support, hehe!

      > Try setting the upnp:class of your playlist to:
      > object.item.playlistItem and see if that helps...

      Well, I tested this already, unfortunately not successful.

      What I did so far:
      - patched my /usr/share/misc/magic and magic.mime to recognise .m3u and .pls files as audio/x-mepgurl (or audio/x-scpls resp.).
      - modified mediatomb's config.xml to:
              <map from="audio/x-mpegurl" to="object.item.playlistItem"/>
              <map from="audio/x-scpls" to="object.item.playlistItem"/>
              <map from="application/octet-stream" to="object.item.playlistItem"/>

      But all NO-GO.

      What could I've bee missing?
      Thangs again for your help.

      Greets,
      Marv

       
    • Jin
      Jin
      2005-05-09

      hmmm....
      I can try to compare tomorrow again... but actually now one thing came to my mind. looking at what you pasted... your unit does download the playlist, right?

      and that's what is really strange... because indeed, if it starts the download, then it does not bother about the mime/type or the upnp:class - else it would probably refuse do download the data.

      just to make sure that it's not the webservers fault we can try the following: using the UI add an external link (put your playlist to some webserver, apache maybe?) and see if this works. but to be honest I somewhat doubt that this is the problem.

      I will try to look for differences between the servers again.. maybe we are missing something.

      good luck and keep us posted!
      Jin

       
    • > using the UI add an external link (put your playlist to
      > some webserver, apache maybe?) and see if this
      > works. but to be honest I somewhat doubt that this is the
      > problem.
      Sorry, I don't know exactly what your're meaning with that.
      1.) Put the .m3u file on a webserver
      2.) go to mediatomb's webinterface and add "http://my.server.address/path/to/playlist.m3u
      or what do you mean?

      I agree with you that the unit downloads the playlist file since I  see the http GET request in the ethereal log. It just not evaluates nor "plays" it.

      Maybe its the communication before the download of the m3u file. Using Intel's (or AirMedia's) server, the whole directory contents (including content) of all files gets downloaded (for example, a m3u file consisting of more than one mp3 file will be "expanded" by the server, sending the m3u file as upnp:class "container", consisting of several "object.item.playlist" items. The unit may show the playlist as a browseable/openable item then.
      (I don't remeber if this is true for .pls only).
      So obscure things happen...

      Thanks again for your help.
      Greets,
      Marv

       
    • Jin
      Jin
      2005-05-10

      >Sorry, I don't know exactly what your're meaning with that.
      >1.) Put the .m3u file on a webserver
      >2.) go to mediatomb's webinterface and add >"http://my.server.address/path/to/playlist.m3u
      >or what do you mean?

      yes, I meant that... but reading what you wrote next gives me a hint.

      you are saying that the server expands the m3u playlist and creates containers and items - that means, that the server supports the m3u format, the player does not.

      that again means, that you will not be able to use m3u playlists with mediatomb and your device right now - because we do not yet support m3u or any other playlist :(

      well, using the intel tools call the GetProtocolInfo function on your renderer, it should list all supported formats... that should tell you what it can and can not stream...

      Regards,
      Jin

       
    • > yes, I meant that... but reading what you wrote next
      > gives me a hint.

      Does not work.
      Error:
      An error has occured. Press Back in your browser to return to the previous page.

      Error message: Failed to stat /http:
      (Wanted to add "http://www.netzwerk-aktiv.com/~mheerling/nocoy.m3u")

      Not every (wondooze) server software I tried so far does the expansion of the m3u playlist on server side. What I've tested so far:
      - Win: Telegent AirMedia Server (crappy!)
      - Win: Zensonic Server (ok)
      - Win: D-Link (same as Zensonic???)
      - Win: Intel Server from UPnP SDK Package (ok)
      - Linux: Cyberlink (does not work witzh my device)
      - Linux: gmediaserver (does also not work)
      - Linux: mediatomb (works pretty well ... ahem ... ;-))
      - Linux Intel MediaServer: crashes on more than 500+ MP3s

      What Intel does provide is a "UPnP Proxy" or some sort of a reflector or gateway. If you're interested, I could set up such a beast here.

      Basically it simulates a local-LAN based UPnP server, while forwarding "subscribe" requests to another server to be configured on the gateway. Just provide me with an address to forward to ;-))

      Cheers,
      Marv

       
    • Jin
      Jin
      2005-05-10

      uhm... you did click the icon with the green "+" sign, and then you selected External Link (URL) from the dropdown list, right? it works here... so I hope it's not really broken, else we have a bug that needs attention.
      could you please recheck?

      about the gateway.. interesing idea! we should definetely arrange something and try that. maybe closer to the weekend? I am moving to a new flat, so pretty busy right now.. also not much coding is done :(

      btw, could you please send me one of your m3u files, one that works on the intel server for example?

      thanks,
      Jin

       
    • Eh yeah...uhm... my fault.
      Works (sort of). Adding an external playlist via a http URL can be added - but the device refuses to play it. Adding an external stream source although works and the device plays it nicely.

      Regarding the gateway stuff: I'm going to Berlin on thursday for one week of vacation, so I'll be back on tuesday or wednesday.

      For the servers:
      I checked again the server features. One more server I tried is SMC's "EZ-Stream Universal Wireless Mediaserver", which does no expansion of playlists, but the TG100 plays both generic .m3u files as well as .pls.

      Intel's server also does not resolve lists, while D-Link and Zensonic (same software obviously) do the serverbased expansion of playlists both on m3u and pls "multiline" playlist files by interpreting the pls/m3u file as a container and allowing to "browse" inside the m3u/pls. The TG100 plays them all fine.

      So I think you will not need any m3u/pls examples as simple shoutcast files will do the trick.

      M3U:
      #EXTM3U
      #EXTINF:0,http://205.188.234.67:8012/
      http://205.188.234.67:8012/

      PLS:
      [playlist]
      numberofentries=2
      File1=http://205.188.234.4:8006
      Title1=FlareSOUND DeepBeats - A Deep, Jazzy, Sexy Somthin - FlareSOUND.com
      Length1=-1
      File2=http://205.188.209.193:80/stream/1033
      Title2=FlareSOUND DeepBeats - A Deep, Jazzy, Sexy Somthin
      Length2=-1

      Let me know if I can send further details or can anyhow else be of assistance.

      And again, thanks for your help!

      Greets,
      Marv
      P.S. Could you post some details on "Active Items"? I was not able to get it working - a matter of my poor understanding maybe...

       
    • Hi,
      /me cannot sleep
      and thus here again. Is it possible that the problems with my device are related with the missing
         Transfer-Encoding: chunked
      header? mediatomb never sends chunked, Intel (and the other servers) do it all the time.
      I was lookin in src/server.cc but could not find referneces for changing the server's behaviour, only in /usr/include/upnp/upnp.h there is a
      #define UPNP_USING_CHUNKED                      -3
      line.
      What do you think?

      Cheers,
      Marv

       
    • Well, it seems there IS a difference.

      Intel server on Linux:

      [---REQUEST from TG100 ---]
      GET /web/nocoy.m3u HTTP/1.1
      HOST: 192.168.194.1

      [---RESPONSE from linux box---]
      HTTP/1.1 200 OK
      Transfer-Encoding: chunked
      Server: Intel CEL / MicroMediaServer
      Accept-Range: bytes
      Content-Type: audio/x-mpegurl

      5F
      #EXTM3U
      #EXTINF:0,http://nocoy.netzwerk-aktiv.com:8888/
      http://nocoy.netzwerk-aktiv.com:8888/

      0
      ---8<---
      Plays nicely.

      mediatomb:
      [---REQUEST from TG100 ---]
      GET /content/media?object%5Fid=6150 HTTP/1.1
      Host: 192.168.194.1
      User-Agent: dma/1.0 (http://www.cybertan.com.tw/)
      getcontentFeatures.dlna.org: 1
      Icy-MetaData:0

      [---RESPONSE from mediatomb box---]
      HTTP/1.1 200 OK
      CONTENT-LENGTH: 95
      CONTENT-TYPE: application/octet-stream
      DATE: Wed, 11 May 2005 03:16:47 GMT
      LAST-MODIFIED: Fri, 06 May 2005 01:19:14 GMT
      SERVER: Linux/2.4.21-286-smp4G, UPnP/1.0, Intel SDK for UPnP devices /1.2
      CONNECTION: close

      #EXTM3U
      #EXTINF:0,http://nocoy.netzwerk-aktiv.com:8888/
      http://nocoy.netzwerk-aktiv.com:8888/

      -----8<----------
      So it seems that HTTP/1.1 uses "Transfer-encoding:chunked", "Accept-Range: bytes" and no content-length?

      What do you think?
      Good n8,
      Marv

       
    • Jin
      Jin
      2005-05-11

      well, I doubt that chunked encoding is the problem.

      There are basically two ways (at least known to me) on how an HTTP server provides the data: the "usual" one, and chunked.
      As far as I know you can not do range requests when chunked encoding is used, it is also not necessary that the length of the data is known. The difference in the log that you saw (for example this 5F thing) is because of the chunked encoding.

      You can do one thing to test if the m3u is not being played because of the encoding type: on your windows PC look at the URL of your m3u that resides on AirMedia server (use the intel device controller). Then, go to mediatomb, and create an external url item, which points to the URL of your m3u that lies on the AirMedia server. Also make sure to match the upnp class and the mimetype. If you do everything correctly, and the m3u still does not play - then we can be sure that it's not the encoding type. So basically.. UPnP browse will be done on mediatomb, but the file will be server from the AirMedia server.

      One other thing that could help me... could you please make an ethereal capture of the following:
      browse to your m3u playlist on your unit and press play until the first song starts playing. If I could get a full log of that, it could maybe give me a hint on what the unit is doing.

      About Active Items - have you looked at the help in the UI?
      (the "Help" link, next to "Browse Filesystem")
      I know it's kind of stupid that I put it there and not in the README, I will fix that; however the text in the UI help describes active items in detail, and also gives some examples. I think we also provide an example python script... please tell me if you already know the active item documentation in the UI help text.. if it's still unclear I will try to explain :) By the way, does your unit listen to container updates?

      About our test.. well, we're not in a hurry :) I am moving to a new flat so I also do not know for sure when I will have the time, let's try it after your holidays?

      Kind regards,
      Jin

       
    • Hi and thanks again. I did what you mentioned and it works, e.g. I put a m3u file on AirMedia's server, grabbed it's Content-URI and added that URL to mediatomb's database as "audio-x-mpegurl" and "object.item.playlistItem.
      The TG100 plays it nicely.

      For the captures:
      I created two capture snaps, one from AirMedia's server oand one from mediatomb. You will find them here:
      www.netzwerk-aktiv.com/~mheerling/ethereal_captures/

      For the "Active Item" stuff:
      Yes, I read the HTML help, but was not sure on how it is supposed to work. I have it running now, but me device refuses every now and then to update. What is unclear to me is: how to use this feature? I definitely miss some point here - maybe I'm a little confused about all that UPnP stuff - sorry for that.

      Good luck for your new flat and thanks again.

      Greets,
      Marv

       
    • Jin
      Jin
      2005-05-13

      hmmmm.... I looked at the captures. Nothing really special there... I could see we have a little bug regarding connection manager subscriptions, but I do not believe that the playlist problem is related to that.

      the strangest thing is that in both cases your unit does download the M3U file... which means that it knows that it is dealing with something it can play. There must be something, some tiny detail that we are missing. I also aggree, that it is quite strange that the unit does an HTTP HEAD first... but we reply to it correctly. I still had no time to look into the other servers extensively.. I hope I will have more when you return from your holidays :)

      About the Active Items: well, it's an experimental feature, it is not part of any UPnP specificatoin, it's more an invention of our own. Those items give you the possibility to execute a script on your PC, when the item is being triggered. The script can do whatever you want... so theoretically, if you are lying in bed and finished watching your movie and want to go to sleep and you want to shutdown your PC - you can do that without having to go anywehere. You could create a container with those active items, put a "Shutdown" item there, write a script that does "shutdown -h now". So when you select that item on your unit and press "play" your server-pc would run the script and shut down.

      Look at the source distribution, there should be a sample script in the scripts directory. If you still have no clue on how to use them I can write a howto :)

       
    • Ok, back from my holidays. I hope you managed the move to your new flat at least fairly well... good luck for then!

      I was able to implement the "active item" thingie, althoug my device mostly refuses to update the image. But when requesting the resource via curl or wget I see it changing - so it is supposed to work. Well done!

      Please let me know if I you plan some other steps or if I can support you with some other snaps or data.

      Thanks again,
      Marv

       
    • Jin
      Jin
      2005-05-18

      Hey,

      I hope you had nice holidays, welcome back :)

      Interesting, that your device does not serve the new image... does it at least update the name of the item? On UPnP level changes in the content directory are propagated via the container update IDs - however, not all devices implemented support for it. MediaTomb does send out container updates when changes in the content directory take place.

      Thanks for your support offer, actually I am still pretty clueless regarding the m3u thing, on the other hand I still did not have the time to analyze the other servers, only went through your ethereal captures and could not find anything suspicious there...

      We do work on the next version of the server, however the progress is quite slow at the moment because of various real life issues :)

      Greetings,
      Jin

       
    • Hi Jin,
      I have a new problem with mediatomb when running over a longer period (> 24 hours). It seems to "eat" CPU resources, my system load ("top") is increasing up to 3.5.
      When I stop mediatomb, it decreases back to 0.2 ~ 0.3 in less than 10 minutes.

      CPU is a P4/3,4 Ghz, HyperThreading OFF, 1 GB RAM, 2.4.21-286-smp4G.suse, SuSE 9.0. Do you have any hints for debugging?

      Thanks in advance,
      Marv

       
    • Jin
      Jin
      2005-05-19

      hmm.... does not sound nice. I have it running permanently, sometimes for 2 weeks and could not see any memory growth or resource consumption.

      but that of course does not mean anything - there still can be a bug somewhere.

      I gotta run now, so can't say much now, give me time till tomorrow, I will talk to Gena and look up some resources on the web on how to track such issues.

      I'll get back to you tomorrow!
      Thanks for reporting!

      Kind regards,
      Jin

       
    • Jin
      Jin
      2005-05-21

      well :) I did not forget about it... I just do not yet know what do say.

      currently I am playing around with valgrind, it has some memory leak detection utility, but no results yet.

      what exactly is mediatomb eating on your system, really CPU resources, or memory? does anything happen in the UI? Is it still responsive and so on?

      I will continue to look around.. if you get an idea - please let me know.

      Greetings,
      Jin

       
    • It just eats CPU resources, memory usage is fairly normal. The UI is still normal responsive, browsing via the medai device gets slower. A restart of mediatomb fixes all issues  temporary.

      Greetings,
      Marv

       
    • Jin
      Jin
      2005-05-23

      hmm... weird, because jason just reported a memory leak. well, I found one info on cpu eating, there is some profiling built into gcc. I do not yet know how it works and if it will really help, but if I understood correctly it should show where something is running too slow or using too much resources or whatever.

      I'll post my findings and I will probably ask you to reproduce/check on your system, once I know what can be done :)

      Thanks,
      Jin

       
    • Jin
      Jin
      2005-05-24

      Hi!

      ok, I got a nice hint from a friend, that's at least a start :)

      run the server in a debugger, when it starts eating cpu interrupt it and save a backtrace, then continue until it starts eating cpu resource again and make another backtrace. that should at least tell us where to look...

      could you please do that? because I can not reproduce the problem here

      thanks,
      Jin

       
    • Hi,
      I'm kind of "sorted out" since I had a tooth pull on monday. All is going better since yesterday but I had not much time for doing real things...

      Contact me if I should do the debugger thing (need to read some man pages then - I'm no coding expert)

      Greets,
      Marv

       
    • Jin
      Jin
      2005-05-30

      Ughhh! tooth pull is quite tough... I hope it was not too bad.

      Well, we have 0.8 almost ready, we fixed some memory leaks as well as couple of other things - maybe one of those was responsible for the problem that you have.

      Please check if the problem appears in 0.8 - if it is still there we will try to figure it out.

      So stay tuned.. some cool features are coming up :>

       
    • jason
      jason
      2005-05-30

      Sure, I will test it. Let me know when it comes out.