1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Media Share - Mediatomb Is Now Working

Discussion in 'DIRECTV Tips and Resources' started by boilerjt, May 18, 2008.

  1. Jun 4, 2008 #181 of 637
    GregLee

    GregLee Hall Of Fame

    1,701
    19
    Dec 28, 2005
    I posted in the Mediatomb Discussion forum about the correction for playlist parsing.
     
  2. Jun 4, 2008 #182 of 637
    boilerjt

    boilerjt Icon

    908
    0
    Jan 11, 2007
    Hopefully Jin will have an answer in the morning. I tried out your Phiily stations and edited my previous post.
     
  3. Jun 4, 2008 #183 of 637
    GregLee

    GregLee Hall Of Fame

    1,701
    19
    Dec 28, 2005
    That's probably it -- my vlc is " version 0.9.0-git Grishenko".

    Yes, it does cut off after asking for pledges.
     
  4. Jun 5, 2008 #184 of 637
    skyboysea

    skyboysea Icon

    540
    0
    Nov 1, 2002
    I am having the same problem with my local NPR station but not always. Every once in a while it plays the pledge and then it goes to the program stream.
     
  5. Jun 5, 2008 #185 of 637
    GregLee

    GregLee Hall Of Fame

    1,701
    19
    Dec 28, 2005
    Here is a playlist with the rates indicated in the titles, for convenience of testing. Also, they're all classical music stations. The comments in the titles are not mine. Only the higher bit rate stations work for me, currently. My name for the file is "classical-web-radios.pls":
    Code:
    [playlist]
    NumberOfEntries=14
    
    Title1=Station: Beethoven Radio [22 Kbps]
    File1=URL: http://classicalwebcast.com/beethoven.asx
    
    Title2=Station: Classical Music America [93 Kbps]
    File2=URL: http://classicalwebcast.com/cmd.asx
    
    Title3=Station: KBAQ [48 Kbps]
    File3=URL: http://kbaq.org/livestream/connect.asx?classicalwebcast.com
    
    Title4=Station: KBYU Classical 89 [32 Kbps]
    File4=URL: http://www.classical89.org/streaming/Formats/kbyufm.asx
    
    Title5=Station: Mostly Classical [32 Kbps]
    File5=URL: http://www.mostlyclassical.com/wma/classical_medium.asx
    
    Title6=Radio Classique (Paris) [128 kbps]
    File6=http://str0.creacast.com:74
    
    Title7=Radio Classique HD [192 kbps ! ]
    File7=http://str2.creacast.com:86
    
    Title8=Radio Classique Zen (zen.o.buro) [128 kbps]
    File8=http://str2.creacast.com:82
    
    Title9=Radio Classique Lounge [128 kbps]
    File9=http://str2.creacast.com:84
    
    Title10=R'Classiques [misc including some pop] [128 kbps]
    File10=http://str2.creacast.com:88
    
    Title11=France Vivace [64 kbps, but good content]
    File11=http://viphttp.yacast.net/V4/radiofrance/francevivace_hd.m3u
    
    Title12=France Musique [64 kbps, but good content]
    File12=http://viphttp.yacast.net/V4/radiofrance/francemusique_hd.m3u
    
    Title13=Radio Stephansdom Vienna [128 kbps, excellent 24 hour content]
    File13=http://srvhost24.serverhosting.apa.net:8000/rsdstream128.m3u
    
    Title14=BBC Radio 3 [only 48 kbps classical music]
    File14=http://www.bbc.co.uk/radio3/wm_asx/aod/radio3_hi.asx
    
     
  6. Jun 5, 2008 #186 of 637
    boilerjt

    boilerjt Icon

    908
    0
    Jan 11, 2007
    I am seeing a few things with this.

    1. A lot of these stations are not streaming. This can be verified by open the VLC player, open network stream, and input the URL.

    2. A lot of the lower bitrate ones are sampled at 22050 Hz and the HR2x cannot play anything below 32000 Hz. The vlcaudio script does not resample at this time. Since there is no file, mediainfo will probably be useless determining sample rate. Since the mimetype of these are audio/mpeg, they will be processed exactly the same as my mp3 collection and I would rather not force a samplerate on these because this affects the quality. Perhaps by parsing the input vlcaudio can distinguish between file and URL. If it is a file, do not resample. If it is a stream, resample. I'll look into this. Also, vlc 0.9.0 may have a resampling bug so you also have to take this into account.

    3. The *.m3u ones are probably a problem for mediatomb. This is a playlist within a playlist and mediatomb probably has trouble with this. The best thing to do is to download the .m3u to your computer, open it with a text editor, and use the URL within the file.
     
  7. Jun 5, 2008 #187 of 637
    skyboysea

    skyboysea Icon

    540
    0
    Nov 1, 2002
    I am using ffmpeg for the conversion and the low bit rate stations were playing too fast. I fixed it changing the ffmpegaudio script to specify the audio sampling frequency.
    Code:
    #!/bin/bash
    exec /usr/bin/ffmpeg -i "$1" -f wav -ar 44100 - > "$2"
    
     
  8. Jun 5, 2008 #188 of 637
    boilerjt

    boilerjt Icon

    908
    0
    Jan 11, 2007
    The reason I prefer vlc is because ffmpeg is not very good with using a URL as the input. FFmpeg is really picky and will abort the streaming when it doesn't have to, such as a less than ideal connection. In the transcoding profiles in config.xml, there is an <accept-url> parameter. If this is set to yes, the URL is passed directly to the script and ffmpeg will use the URL. If is set to no, mediatomb will "proxy" the stream and send a fifo as the input. The proxy will buffer the stream, thus sending a better input into ffmpeg. FFmpeg works a lot better with the fifo, but the proxy will only work with HTTP, not MMS or RSTP. With vlc, I can get reliable playback when directly using the URL and thus and play all formats.

    How far have you gotten with Mediatomb?
     
  9. Jun 5, 2008 #189 of 637
    skyboysea

    skyboysea Icon

    540
    0
    Nov 1, 2002
    I am using ffmpeg because I don't want to compile vlc. I have a custom built minimal server and avoid to add any software on it that I don;t really need.
    I am testing ffmpeg with both fifo and url and for what I've seen until now, letting ffmpeg handle the url is way more reliable.
    One problem I have with Mediatomb is that it is not reliable importing playlists. Sometimes I change something (or just restart the server) and the playlist doesn't get imported or get dropped. I have tried to trace the problem and all I know for know is that the readln() function return empty lines for some reason so the problem is somewhere in the C code.
    Other problems are with the HR20. It locks if I browse the music author and album list. From what I see, any time you page down through the list the HR sends a lot of useless requests to the server. I think it is requesting to much data and choking on it.
    A part from that, music plays fine and all the videos I have tried played without any problem (no HD test yet). I have not done much with photos yet a part from testing the slideshow (working) and noticing that the thumbnails are not displayed. Now, if we could have FF and REW working... :)
    BTW, I have an Archos 605 WIFI and Mediatomb works great with it. It is much faster than the HR20 in all functions.
     
  10. Jun 5, 2008 #190 of 637
    GregLee

    GregLee Hall Of Fame

    1,701
    19
    Dec 28, 2005
    There might be some connection with setting directories to autoscan and inotify. I had a playlist in such a directory which showed up in the Database PC Directory but did not get imported as a virtual object in the Playlist directory. I removed and re-added it to the Database several times, but it just would not import. But it did get imported after I removed its directory and added it back not using autoscan.
     
  11. Jun 5, 2008 #191 of 637
    boilerjt

    boilerjt Icon

    908
    0
    Jan 11, 2007
    I'm still playing with the online audio and I noticed something weird when I tried to import your classical radio playlist. From the web UI, I opened a playlist entry and it listed the URL like this:

    URL: http://classicalwebcast.com/beethoven.asx

    The weird thing is the "URL: " was passed along with the real URL to vlc and it generated a "no suitable access module" error. I then removed the "URL: " prefix from the URL in the web UI and I didn't get the vlc error, but could not establish a connection (expected with this station). It did not put the "URL: " prefix on all stations, only a couple of them. There are definitely some playlist import issues to get pass along to Jin.

    EDIT: Duh... I see the "URL: " is in the playlst. Can't blame MediaTomb for this one :)
     
  12. Jun 5, 2008 #192 of 637
    boilerjt

    boilerjt Icon

    908
    0
    Jan 11, 2007
    The "useless" requests the HR2x passes to MediaTomb are "search" requests which are optional in the uPnP spec and not supported by MediaTomb. I think the search requests are gathering all items in a container for the SHUFFLE ALL item, which is not shown when MediaTomb is used. For me, this is not causing a problem and sometimes takes a few seconds to generate the list. I have over 14k tracks in my collection and so far MediaTomb has worked better than any other server I've tried. I also have edited the import.js script to provide an A,B,C, etc. menu for the artists.

    I seriously doubt we'll ever see the FF and REW with Mediatomb. When MediaTomb transcodes, it dumps the data into a FIFO. There is no way to FF and REW because the data is not written to a file, it is dumped into the bit bucket after streamed to the HR2x. :)
     
  13. Jun 5, 2008 #193 of 637
    boilerjt

    boilerjt Icon

    908
    0
    Jan 11, 2007
    Looks like you are not the only one with the readln() function...

    http://sourceforge.net/forum/forum.php?thread_id=2051982&forum_id=440751
     
  14. Jun 5, 2008 #194 of 637
    bhelton71

    bhelton71 Cutting Edge: ECHELON '09

    2,390
    0
    Mar 7, 2007
    Beethoven.com

    http://marlinbroadcasting.wmlivesvc...inbroadcasting_vitalstream_com_beethoven-com1
     
  15. Jun 5, 2008 #195 of 637
    boilerjt

    boilerjt Icon

    908
    0
    Jan 11, 2007
    Which translates to this:

    mms://marlinbroadcasting.wmlivesvc.vitalstreamcdn.com/live_marlinbroadcasting_vitalstream_com_beethoven-com1?MSWMExt=.asf

    The problem with online radio is that the URLs change so often, its tough to keep a link working. Of course, they all want you to listen from their website and try to hide the actual URL :rolleyes:


    Thanks Bill :)
     
  16. Jun 5, 2008 #196 of 637
    skyboysea

    skyboysea Icon

    540
    0
    Nov 1, 2002
    I have the directory set as inotify and four playlists in it (all valid). The last time I restarted Mediatomb only one of them showed up as a virtual object. Then, with Mediatomb running, I opened the other three with vim, added an empty line, saved the file and they immediately popped up in the Playlist object. I then shut down the server, restarted, and I was back to only one playlist. Repeated the above and all four are back. I don't know what's going on.
     
  17. Jun 5, 2008 #197 of 637
    GregLee

    GregLee Hall Of Fame

    1,701
    19
    Dec 28, 2005
    Why don't you try what I did, just to see if it works.

    Tentatively, I'll suggest that when autoscan+inotify are turned on, other means of triggering importation into the database are turned off. But then for some reason, autoscan+inotify doesn't work right. (I don't think my version of the kernel knows about inotify, which would explain why it's not working for me.)
     
  18. Jun 5, 2008 #198 of 637
    skyboysea

    skyboysea Icon

    540
    0
    Nov 1, 2002
    That's not what I am talking about. When you select album on the HR20 it send the server a browse request asking for 20 titles (index 0-19), then it asks for another 20 titles (index 20-39), and so on until it gets to index 119. All this while you're waiting for the UI to update. When you page down another series of browse requests starts, each for 20 titles up to index 119 (and you're still waiting even if the 10 title the HR20 has to display have been requested with the first request about).
    I can think of several ways to do this but the way Directv is doing it not among them. You can send a request for 10 items, get them, update the UI and when the user scrolls down you request the next 10 items and so on. You can request all the items and keep them in a buffer to speed up scrolling. You can request a number of items, buffer them and update the buffer when the user scroll out of boundaries. The way the HR20 is working now just slows the UI and load the server for no reason.

    Don't be a pessimist. :)
    With the Archos I can FF and slow motion while streaming from Mediatomb. As long as the client can download fast enough it will work. And if the client keeps some buffer at least a limited rewinding should work as well. Both done on client side.
    Couldn't it be done on the server side too if the input file is re-transcoded? Maybe not a REW but a skip back might work.
     
  19. Jun 5, 2008 #199 of 637
    skyboysea

    skyboysea Icon

    540
    0
    Nov 1, 2002
    Tried and no luck. The playlist get processed (I see the entry in the log) but nothing is added. The readln() function still return an empty string instead of a line from the playlist.
     
  20. Jun 5, 2008 #200 of 637
    boilerjt

    boilerjt Icon

    908
    0
    Jan 11, 2007
    I see what you are talking about. It is pretty inefficient and slow, but it doesn't seem to cause any ill effects for me. I just have to wait for the menu to update.

    Maybe this will work. The HR2x can have MediaTomb send the data as fast as it can be sent (or as fast as can be transcoded) and the HR2x will buffer the video on the hard drive and playback at normal speed. This way, the HR2x controls the trick play with the data it has buffered. Now back to reality... :roundandr

    It is possible to do it on the server side (ViiV is doing it), but MediaTomb would have to add another buffering layer somewhere. From what I've read, the HR2x is the only hardware client I've seen that relies on the server for transport controls and Intel does not appear to be sharing this information...
     

Share This Page