WDTV Tools

May 14, 2009

Preview Release Shoutcast / Internet Radio Application

Filed under: shoutcast — Tags: , , — Elmar Weber @ 21:51

As kind of a byproduct I have been working on while getting the WDTV Tools project started is a proof-of-concept implementation of a Shoutcast / Internet Radio application that delivers you the Shoutcast Radio Stations to the WDTV.

This is a preview release for a shoutcast filesystem for the WDTV. It just contains an unsorted, unchecked, un-everything browse by genre function that for the most part works.

This release is targeted at people who know know their WDTV box and Linux because there is a rather high probability that it will not work directly on your box, so you have to mount it from the command line to find the error.

Tested with ext-boot-0.9.2.

You can get the image at http://sourceforge.net/project/showfiles.php?group_id=261153&package_id=322629&release_id=682670.

Known issues:

  • sometimes the downloaded list of stations / genres has an error (you’ll see an empty folder), in this case just use another genre. If this happens at the “Browse by Genre” directory you have to reboot your device (or remount the application) and try again.
  • if you see everything but no stations plays try installing streamripper in optware, I’m not sure I have included all dependencies
  • there will sometimes be left over stream caches at your boot usb stick
  • will not work if /boot is not your USB stick, this is no problem on ext3-boot, but I don’t know about WDLXTV
  • if you play a low bandwidth stream (e.g. 64k) the first few seconds will have breaks in them because the WDTV can’t handle a half full cache, I did not observe this problem with 128k and larger streams
Screenshot of browsing a genre.

Screenshot of browsing a genre.

20 Comments »

  1. Nice things !

    Browsing runs, but there are simply too much i-radio and after 10-20 page advancing, osd freeze and I must reboot wdtv.

    So a suggestion: insted of browsing entire listing of i-radio, why can’t you simply create a folder on / where to add the link to the radio, so users can add only the radio interested in

    Comment by realtebo — June 4, 2009 @ 11:19

  2. Sorry for 2nd reply, I’m trying and trying to make it running….

    …. If shoutcast dir is empty, how to remount on wdtv without reboot?

    Comment by realtebo — June 4, 2009 @ 13:56

  3. # umount /tmp/media/usb/Shoutcast
    # /apps/shoutcast/etc/init.d/S20shoutcastfs

    Comment by Elmar Weber — June 4, 2009 @ 16:39

  4. [...] Descarga | Web [...]

    Pingback by WDTV, un mundo en movimiento | arias marqués — June 24, 2009 @ 15:47

  5. One of the things I planned to use WDTV for is listen to internet radio and Shoutcast is the only solution I found until now. Seems quite nice, but playing never worked for me. I installed the streamripper using ipkg but without further success.

    It just says that cannot play the file. How can I see what goes wrong?

    Another useful feature would be to use the left right RC buttons for page scrolling up & down. This becomes relevant in Shoutcast and when browsing large directories.

    I’ll be very happy with some tips for getting it to play the streams :-)

    Comment by binutzu — July 11, 2009 @ 00:02

  6. It’s a nice application but I haven’t got it working with wdlxtv. I have tried it with the recent three versions of wdlxtv. In the latest version it shows the station names. However they don’t play because it says that the filetype is not supported. Any solution would be great!

    Comment by Robin — August 27, 2009 @ 18:41

  7. Hi,

    try to install streamripper via optware, that solved a problem for some people. For more info and debugging solutions search for shoutcast over at the http://wdtvforum.com.

    ciao,
    elm

    Comment by Elmar Weber — August 27, 2009 @ 18:53

  8. Elm I tried your tip but i can’t seem to find the “you’ll see a # prompt” as ’savant’ tells in the telnet part.
    http://wdtvforum.com/main/index.php?topic=909.msg6530#msg6530

    Ofcourse I can login onto my WD with 192.168.1.105 but then I don’t have the prompt option in one of the menu’s.
    I use the WDLXTV 0.5.6.1 firmware.

    Comment by Robin — September 2, 2009 @ 09:49

  9. With telnet 192.168.1.105 you should see an image like http://wdtv.elmarweber.org/wp-content/uploads/2009/09/prompt.jpg

    If so, please continue with the debugging guidelines from the shoutcast post (enter “ipkg install streamripper”), if not there is first another problem to solve.

    Comment by Elmar Weber — September 2, 2009 @ 10:51

  10. Aha instead of using my internet browser to connect to http://192.168.1.105/ I needed to use Start > Run > telnet 192.168.1.105 > pass: root and type in ipkg install streamripper. Streamripper was succesfully installed. I tried to use Shoutcast however it still won’t play the streams in any category. Not after shutdown or restart. It’s a shame.

    Comment by Robin — September 8, 2009 @ 14:14

  11. Internet Radios are cool. i listen to them most of the time aside from watching videos on youtube. i am also trying to learn how to put my own personal internet radio.

    Comment by detoxtechy — October 6, 2009 @ 03:30

  12. Please, make it working. With installled streamripper it also not working((((

    Comment by Victor — November 2, 2009 @ 19:29

  13. i am trying to build the svn source starting with autoconf etc but it doesn’t compile can you give me some build instructions which version fuse etc.

    Comment by Foxhunt — January 15, 2010 @ 15:46

  14. Hi Foxhunt,

    fuse version 2.6 is used, the same that is in the toolchain in the SVN repository.

    To get started simply type “autoreconf” once or twice, that should setup everything for autotools to build. If you have further questions the error message would be helpful. You can contact me directly at wdtv (AT) elmarweber.org

    Comment by Elmar Weber — January 22, 2010 @ 23:32

  15. Hello:

    One of the most important features I intended to have when installing the WDLXTV firmware was online radio streaming but to my surprise it seems that nobody has it working yet :(

    Does anybody of you knows how to have online radio in the WDTV?

    I have been playing around having shoutcast reading mp3 files that streamripper is creating and got a sort-of-streaming working. The problem is that when I start playing the file it takes the current duration of the file and when the limit is reached it starts over, even though the file was growing in the meantime (beacuse the ripper continued to make it grow while listening). And so, despite the idea seem to be a good hack for it, in practice I would need to be ripping a radio station for some time, wait a good amount of time and start listening to it to avoid the “loop back” effect. But, if any of you likes this idea anyways, this is what I did:

    ipkg install streamripper (you need to have opt.bin installed for the ipkg command)
    streamripper -r -d
    Exmaple: streamripper
    http://scfire-dtc-aa07.stream.aol.com:80/stream/1018 -r -d /tmp/media/usb/Streamripper/

    That will start ripping the audio..
    And then you navigate the folders with the remote control to Open “Streamripper” folder
    And there you will see the file or files that streamripper is creating and are ready to be listened to.

    I hope this works for somebody. This is far from being the ideal but is a little something at least…

    Comment by Jose — February 11, 2010 @ 20:51

  16. Hi,

    if the shoutcast application doesn’t work for you, your only way is how you described it.
    To get around the file size problem there is one shell based solution I came along while testing shoutcastfs: simply create a large dummy file and then let streamripper overwrite it, there was a command line switch that told streamripper to start overwriting the file while not truncating it, or something along the line.

    The other way for you would be to take a look at shoutcastfs, sources see http://wdtvtools.svn.sourceforge.net/viewvc/wdtvtools/trunk/shoutcastfs/. There the filesystem simply reports a bogus file size while letting streamripper rip into a temp file.

    For more details search the WDTV Forum, there was some discussion around it.

    ciao,
    elm

    Comment by Elmar Weber — February 12, 2010 @ 03:09

  17. Hello:

    Thank you so much for your help.

    I have coded a simple script which is continuously ripping into a file called radio.mp3 for about 5 minutes and then rewrites the file. I run the command and a few minutes later I can start listening to the radio through the UI by browsing by Folder and going to Music/Radio/radio.mp3. While listening the file will get deleted (by the ripper) and will start with the next 5-minutes-loop. In the UI things run smoothly since the original file is buffered and you never notice the file no longer exists until you reach the end of the file (very important, the continuous loop option has to be enabled in the UI). This way I get a (sort of) continuous streaming.

    Here the script (not perfect but works):

    #!/opt/bin/bash

    if [[ $# -lt 2 ]]; then
    echo “Usage: stream.sh ”
    exit
    fi

    if [[ -d /tmp/media/usb/Radio ]]; then
    echo “Do Nothing”
    else
    echo “Creating dir…”
    mkdir /tmp/media/usb/Radio
    fi

    if [[ $1 == "pop1" ]]; then
    radio=http://scfire-ntc-aa07.stream.aol.com:80/stream/1074
    elif [[ $1 == "pop2" ]]; then
    radio=http://scfire-ntc-aa03.stream.aol.com:80/stream/1051
    elif [[ $1 == "chill" ]]; then
    radio=http://scfire-ntc-aa07.stream.aol.com:80/stream/1018
    fi

    rm -f /tmp/media/usb/Radio/*.mp3
    rm -f /tmp/media/usb/Radio/*.cue

    index=0
    while [ $index -lt $2 ]
    do
    echo “Loop $index”

    streamripper $radio -A -a /tmp/media/usb/Radio/radio.mp3 -l 300
    rm -f /tmp/media/usb/Radio/*.mp3
    rm -f /tmp/media/usb/Radio/*.cue

    index=$[$index+1]
    done

    I have created a file in the root of my hard drive called stream.sh and I just call it through the terminal by running: /tmp/media/usb/USB1//stream.sh [pop01|pop02|chill]

    I hope this is useful to somebody

    Comment by Jose — February 24, 2010 @ 16:37

  18. Thank you very much for this app.
    I noticed that it don’t work on WDLXTV firmware. I tried many versions with no result. Then i used ext3-boot and it works perfect.

    Comment by Victor — May 4, 2010 @ 22:35

  19. [...] one – WDTV (Rs 5475) Or WDTV Live (Rs 6582) ? Here it comes WDTV can play Internet radio.. Preview Release Shoutcast / Internet Radio Application WDTV Tools Guys, anyone of you have best discount offer on WDTV live. Had talk with my dealer, still [...]

    Pingback by Which one - WDTV (Rs 5475) Or WDTV Live (Rs 6582) ? - Page 16 - Gadgets & Consumer Electronics Buying Advice | TechEnclave — May 6, 2010 @ 10:04

  20. Hello,

    How to listen to SomaFM Groove Salad over WDLXTV with 0.5.8.1 firmware ?

    Comment by Saulius — March 19, 2011 @ 15:26

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress