Turn Freesco Into an MP3 Server! (Howto)

FAIR WARNING :

This process is *not* intended for “newbies”, or those with very little knowledge of Linux / compiling software!
That being said, let's get on with the directions, shall we?

THE DIRECTIONS :

The obvious bits :

  • You'll obviously have to be able to install and configure Freesco properly.
  • You'll want to have *LOTS* of HDD space available for Mp3's, or you can simply mount a share on your network that has your MP3's with SAMBA..
  • Before you go and flood this forum with questions about Samba, and it's usage, be sure to Read this thoroughly. Read the information. If you have problems understanding the information, read it again. Repeat until enlightenment is achieved.

The Dirty Details :

In order to serve your MP3's over your network (or to the world, should you so be inclined to), you'll obviously need an MP3 server. I use edna for this purpose. It's small, and incredibly easy to setup and configure.

Now, in order to use edna, which is nothing more than a Python. script, you'll need to do the following things.

  • Download Zipslack 3.9. You'll need this to be able to compile anything for your Freesco box. Don't think you can compile anything on your Slack, Mandrake, RH, SuSe, whatever and have it run. It won't.
  • Install Zipslack, and configure it properly for your systems' needs.
  • Download the latest stable release of Python. Obviously, this will be the basis for the Python interpreter.
  • Get the latest mxCGIPython - One-file easy-to-install Python interpreter. This will allow you to convert Python into a single executable file. (neat, eh?)
  • Copy the Python and CGIPython files to your zipslack's /linux directory. You'll want to rename them something *small* like CGI.zip and PY.tar.gz, otherwise, when you boot zipslack, it'll mangle your filenames, and you'll have to rename then once you're in your Linux environment. (hint: you can use “mc” to do this) If you have the option to, you can avoid this level of “happiness” by simply putting the files onto another partition, which you'll then “mount” from within zipslack (i.e. if you boot to your first/second partition, simply mount the other and copy them over.)
  • Again, read the directions on how to build the single file interpreter. Any questions? Read them again.
  • Once you've successfully built your single file interpreter, copy it to your freesco box. It makes no difference whether that's via FTP, Samba shares, or however you manage it.
  • Make a home directory on your Freesco box for the interpreter, and the edna files (you can split them up, or have them together like me, it makes no difference as you'll be specifying this in your startup script) that's located *BELOW* the /mnt directory. Otherwise your files will disappear if/when you have to reboot. Now that you've got a home for the interpreter and it's files, read the directions. on how to edit your configuration file (a whopping 3 lines) for the port, host permissions, etc.
  • Test your hard work by entering the following command:
[Linux] /pathto/cgipython /pathto/edna.py

Or, if they're all in the same directory, it's:

[Linux]./cgipython edna.py

If you've got everything setup correcty, you'll see a simple message saying:

[Linux] cgipython edna.py
edna: serving on port xxxx...

If you see this, Great! Simply kill the server with CTRL-C and go on to the next, and last part. If you didn't see this, go back *carefully* through this list and see what you've missed.

The Conclusion :

Whew!.. Are you still with me? Good. To be able to launch the interpreter automatically at boot time, you can create a simple shell script like the following:

#!/bin/sh
#
# start the edna server.
cd /pathto/cgipython
cgipython /pathto/edna.py
#-------------------------------------------------------------
$DONE 

Just name it something like “rc_edna”, chmod +x the script, and stick it in your /mnt/router/rc directory. (where all of your startup scripts hang-out)

I'm by no means an expert with Freesco, or Linux, (my shell scripting is horrid…at best) but, this is exactly how I've done it. The only thing that's I've noticed is that streaming via Samba (from a windows box) will occasionally cause the buffer to run out, and thus the server hiccups/dies. I've solved this partially by simply increasing the buffer in Winamp to something like 5,000. I'm always open to new suggestions, or tips that would make this setup even better.


Oh my… People actually found my (small) attempt useful / interesting. =)

As I saw in one of the responses below, someone's already quoted my old post. However, I still have the package for freesco hosted on slack.net for those interested- The web page is quite sparse, just the necessary items / links: http://www.slack.net/~hermit/edna - MP3 Streaming server for Freesco Or, it (might?) be installable directly from your Freesco box with the following command:

installpkg http://www.slack.net/~hermit/edna/edna

or from the 3rd Party Package page

However, I've yet to be able to do this on *my* server as I've already got so many things / packages installed on it

(the package is 781k in size, but almost 3 megs when installed)

I always run out of space on /RAM0.

So, if nothing else, download the script, and TGZ, and copy / move them to /mnt/router/www

Then, issue the following command:

installpkg 127.0.0.1 edna 

Just for the sake of convenience, I'll zip 'em all up and put it up there as well.

http://www.slack.net/~hermit/edna/edna.zip or from the 3rd Party Package page

FWIW : I posted a message about a week or so after I made that (long-winded) post asking if there was a way to install a package to /RAM1 or /RAM2. I suppose I'll just have to wait for Freesco 3.0, eh?

Speaking of which, I really outta re-develop this package for 3.0 as well. I'm sure there'll be more questions / requests for it.

What's in this zip ?

edna.tgz
The actual package of edna for Freesco. Contains the CGIPYTHON single-binary interpreter, the edna python script and
it's configuration files.
edna.sh
The installer script used by the 'installpkg' command.
rc_edna
An alternative (and much better than mine) startup script a friend \wrote after perusing the package.


Another MP3 server with FREESCO howto article (unfinished) can be found here.

 
freesco/howtos/turn_freesco_into_an_mp3_server.txt (136219 views) · Last modified: 2005/09/14 00:49 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki