OS2World OLD-STATIC-BACKUP Forum

OS/2 - Technical => Multimedia => Topic started by: magog on 2008.02.01, 15:36:13

Title: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.01, 15:36:13
Edit: There seems to be an issue with Java 1.4.2 from Innotek. At the moment Subsonic works with Golden Code Java 1.4.1 only! I've not yet rechecked if Tomcat would help to get around the issue Innotek Java.


Edit2: The second modified Subsonic drop (15th. Feb. 2008) includes the work-in-progress Extended Search I'm working on. This should allow you later when it's finished to search other subsonics friends have running when you are logged in to your own subsonic. Includes sophiticated user management so not everyone is allowed to search other subsonics.
Details described in this thread at the subsonic forum (includes screenshots):
http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=950 (http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=950)

Beside that this version also fixes the not working transcoding (conversion e.g. OGG to MP3) and recoding (lowering bitrate to save bandwidth).



There is a Streaming server based on Java available called Subsonic.
This application allows you to store all of your MP3, OGG,... files and allows you and other people (login has to be created) to access your music files.
The selection of albums you want to listen to is done in your webbrowser. Then the server sends an MP3 Stream (Shoutcast == MP3) to your music player (eg. z! or PM123 on OS/2, WinAmp on Windows,...).
You can find more details at the subsonic website: http://subsonic.sf.net/

Normally the computer (server) running Subsonic requires to have Java >=1.5 but I did again a hack so most of the important functions are working on OS/2 and eComStation with either Innotek Java 1.4.2 or Golden Code Java 1.4.1 only.
I'll fix some of the issues as good as possible with the upcoming test versions but for now you might want to try the current version.

Here are the issues I found so far:


Beside the basic "subsonic.war" file you need a webserver which can be either Jetty (current version 6.1.7) or Tomcat 5.x! I suggest you try Jetty as it's very easy to install and use.
After you downloaded Jetty you can extract it everywhere you like. The subfolder "Jetty-<VERSION>" will be created automatically.
Get the ZIP of Jetty 6.1.7 here:
http://dist.codehaus.org/jetty/jetty-6.1.7/ (http://dist.codehaus.org/jetty/jetty-6.1.7/)

My special "subsonic.war" for Java 1.4.x can be downloaded here:
http://www.informatik.uni-oldenburg.de/~julbts/ports/subsonic_v330_2008-01-30.zip
http://www.informatik.uni-oldenburg.de/~julbts/ports/subsonic_v33x_2008-02-15.zip (http://www.informatik.uni-oldenburg.de/~julbts/ports/subsonic_v33x_2008-02-15.zip)

Later the current version can be found on my website (http://www.juergen-ulbts.de/ - at section: "Projects" --> "Ports")

You need to extract or copy the "subsonic.war" file into the subdirectory "webapps" of Jetty.
Then remove the "cometd.war" from the "webapps" subdirectory. This is causing some problems as it's not compiled for Java 1.4.
By default Jetty uses Port 8080. The port can be changed at the Jetty.xml (see documentation) configuration file.
Here is the start script (startJettyOS2.cmd) I use to start Jetty (with Golden Code Java 1.4.1 installed at c:\java141):

mode 102,80
c:\java141\bin\java -jar start.jar


The mode line is optional but will show some more lines what Jetty and Subsonic are currently doing.
I you want to use Innotek Java 1.4.2 it might be enough to remove the path completely (if set as default Java environment - eCS 1.2+ default setting) otherwise you need to specify the location of the Innotek Java version (normally "C:\Programs\Java142\bin").

That's all you have to do. Then you can open your webbrowser. If you have started Jetty on the same machine you are now starting your browser enter the URL "http://localhost:8080/subsonic", or if it's another machine on you network you have to enter the IP address instead of the word "localhost". The port has to added except if you set it to port 80 instead of 8080.
If you just use "http://localhost:8080/" you will see the Error 404 together with a list of possible links to web-applications. One of them should be called "subsonic" if you then click on this one you get to subsonic as well.


You should see the Jetty login dialog. At the first time you can use "admin"/"admin" as login but then you should change the password of the admin user. While you are logged in you might also add other users.
Then of course it's time to setup the location of your mp3 files, the default upload path (location of the "incoming" directory if someone uploads files to your server),...

Finally you are ready to stream the music files that are stored on your system. You can select the files/albums with a click at the webinterface and then your music player should be started to play the stream send by subsonic. You might need to add the music player as "Helper application" so it will be started automatically.

Subsonic can also reduce the bitrate of the MP3 files and covert from one filetype to another (eg. OGG-->MP3) but needs external apps for this. So far I've not tried this, but LAME is one of the required 3rd party tools needed.

Ok, now I'm looking forward to hear some success stories. ;)
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.01, 18:00:16
Aight, I'm currently downloading the files to set it up and test :D

The server where jeti is hosted is balls slow  >:(
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.01, 19:30:23
I keep getting 404 not found :\
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: BigWarpGuy on 2008.02.01, 20:02:44
Give it another try. I just did and it works.  ;D
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.01, 20:47:45
Really? I get this:
HTTP ERROR: 404

NOT_FOUND

RequestURI=/

Powered by jetty://
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: RobertM on 2008.02.01, 20:56:08
Quote from: Saijin_Naib on 2008.02.01, 20:47:45
Really? I get this:
HTTP ERROR: 404

NOT_FOUND

RequestURI=/

Powered by jetty://

I havent tried the Jetty link... but if you are planning on running it on OS/2, then try the other link:

http://www.informatik.uni-oldenburg.de/~julbts/ports/subsonic_v330_2008-01-30.zip

-Rob
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.01, 21:28:36
Dont i need jetty to run the server? I have the .war for subsonic in jetty's webapps folder.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: RobertM on 2008.02.01, 22:47:33
Quote from: Saijin_Naib on 2008.02.01, 21:28:36
Dont i need jetty to run the server? I have the .war for subsonic in jetty's webapps folder.

Can you say "Not enough coffee?" Well, I can't (because I haven't had enough coffee) ;)

Sorry about that... (and thanks for pointing it out... I woulda been wondering what was wrong when I couldnt run it). Let me know if you are still having problems... when I go to the site, I get a directory listing, allowing download of the source and the packaged distro...

The direct link to each is as follows:
http://dist.codehaus.org/jetty/jetty-6.1.7/jetty-6.1.7-src.zip
http://dist.codehaus.org/jetty/jetty-6.1.7/jetty-6.1.7.zip

If you can't get them, let me know and I'll see what I can set up here for you to grab them...

-Rob
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.01, 22:49:29
I have the jetty-6.1.7 downloaded, extracted, and in C: so its C:\jetty-6.1.7\webapps\subsonic.war but when i start the start.jar with a program object I made pointing to Java142\bin\javaw.exe and try and access it from firefox, I get the 404 error.

Im lost ?_?
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: RobertM on 2008.02.01, 23:50:17
Quote from: Saijin_Naib on 2008.02.01, 22:49:29
I have the jetty-6.1.7 downloaded, extracted, and in C: so its C:\jetty-6.1.7\webapps\subsonic.war but when i start the start.jar with a program object I made pointing to Java142\bin\javaw.exe and try and access it from firefox, I get the 404 error.

Im lost ?_?

Are you trying port 8080 (or have you set the default port to 80)?

-Rob
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.02, 00:00:41
Trying port 8080 which is supposedly the default for the program. my eCS firewall is off as far as I know.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.02, 02:37:57
@Rob and the rest of you
If you have problems downloading Jetty just got to the main website, from there to "Downloads" (left at the menu right below "Resources") and then you should see at "Downloading the Distribution" more then one server where to get it.
http://www.mortbay.org/

If Jetty is extracted and you dropped my special subsonic.war into the webapps subdirectory of Jetty you might also want to remove the "cometd.war" (example application shipped with Jetty) from the webapps directory.
This example application might cause problems when you start Jetty as I think it is compiled for Java 1.5 and not Java 1.4.x.

It might be a good idea to use JAVA.EXE and not JAVAW.EXE. With JAVAW you don't see any error messages that might show up at the console!!!

As I said before, you should be able to access and see a result from Jetty (not the 404) if you enter one of the following:
http://127.0.0.1:8080/subsonic
http://localhost:8080/subsonic
or
http://<IP_OF_YOUR_COMPUTER>:8080/subsonic

The "<IP_OF_YOUR_COMPUTER>" has to be replaced by the actual IP address (whatever it is).
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.02, 05:46:10
I deleted cometd.war, and I used java.exe. Here is what it looks like for me.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.02, 13:39:23
Quote from: Saijin_Naib on 2008.02.02, 05:46:10
I deleted cometd.war, and I used java.exe. Here is what it looks like for me.

Looks good. That 404 can be ignored. If you click on the "subsonic" link you should get the subsonic login screen.

I modified the description at the top so it's hopefully no longer an issue.
If everything is working you may also go back to javaw.exe but then you won't see possible errors.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.02, 17:18:02
If I follow the Subsonic link, I get to the login page saying to login with "admin" and "admin", if I do that, I get to a blank page with nothing.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.03, 16:38:41
Quote from: Saijin_Naib on 2008.02.02, 17:18:02
If I follow the Subsonic link, I get to the login page saying to login with "admin" and "admin", if I do that, I get to a blank page with nothing.

Ok, I've seen this once too as I used Innotek Java 1.4.2, but after 2 retries it did work. I thought this problem showed up because I used GC Java (still my prefered Java version) before.

It seems I need to look into it again but I hope it will work if you try to login several times as it did for me.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.03, 19:33:26
Aight, I shall give it another shot. Thanks Magog :)

Once I log in, and try to re-login it just takes me to a blank screen. I keep refreshing, but nothing.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.04, 00:48:46
Quote from: Saijin_Naib on 2008.02.03, 19:33:26
Aight, I shall give it another shot. Thanks Magog :)

Once I log in, and try to re-login it just takes me to a blank screen. I keep refreshing, but nothing.

I just installed eCS 2.0 rc4 on my main computer as I haven't tested eCS 2.0 since rc2 on this machine.
I'm now going to try subsonic with java 1.4.2 on this machine now...
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.04, 01:07:14
Aight, awesome. Thanks man :) I lost my software subscription this week, so I cant get anything from mensys if I need to :C
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.04, 02:30:18
Quote from: Saijin_Naib on 2008.02.04, 01:07:14
Aight, awesome. Thanks man :) I lost my software subscription this week, so I cant get anything from mensys if I need to :C

Edit: It seems there is an issue with the Innotek Java 1.4.2 and Subsonic. The stuff I did write earlier works only until the next reboot.  :(

I'll look into the issue if I have more time...for now I have to say Subsonic only works with Golden Code Java 1.4.1!


I've done some more testing with Java 1.4.2 and I think I have a solution.

With Java 1.4.2 from Innotek I first saw the same problems as you had (blank screen after login with admin/admin). Then I started Jetty with Subsonic using GC Java 1.4.1 once and logged in. I didn't change anything and logged out again.
Then I started Jetty with Subsonic using Innotek Java 1.4.2 and I could log in successfully.
I think something went wrong when the settings should have been created.

1.) Try to find the location of the subsonic configuration...I found mine in "d:\var\subsonic" (which is a bit weired...should have been "c:\var\subsonic"...I think Jetty will create it on the same drive where it is installed).
Whatever!
If the directory structure "\var\subsonic" is not there create it (on the same drive where Jetty is)
2.) Extract the content of the following archive into "\var\subsonic"
http://www.informatik.uni-oldenburg.de/~julbts/ports/subsonic_v330_default_settings.zip (http://www.informatik.uni-oldenburg.de/~julbts/ports/subsonic_v330_default_settings.zip)
3.) Start or restart Jetty
4.) Try again to login with admin/admin

I hope it works this way...
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.04, 03:23:32
Aw, pwnt. Thanks though man!
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.04, 05:05:23
Quote from: Saijin_Naib on 2008.02.04, 03:23:32
Aw, pwnt. Thanks though man!

I'm going crazy here...I disabled SMP (ACPI.PSD switch) and tried Innotek Java again...
Now it works with Innotek Java.

You might want to try my advice with the configuration file above which is currently canceled.
Maybe that's already enough.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.04, 05:26:44
Aight, Im not presently running SMP mode because the GUI of Virtualbox has issues (supposedly?) with SMP mode, so maybe that will work afterall!
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.04, 16:52:30
Quote from: Saijin_Naib on 2008.02.04, 05:26:44
Aight, Im not presently running SMP mode because the GUI of Virtualbox has issues (supposedly?) with SMP mode, so maybe that will work afterall!

Ok, if you are not running eCS in SMP-Mode via ACPI then I don't know what is the problem.
That was my last guess as it worked here when I run it with ACPI.PSD in single processor core mode but with installed SMP-Kernel.
This is all really weird.
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.06, 20:44:49
I'm currently working (when I have the time) on a new Subsonic feature which I call extended search.
With the extended search you can search for music files available on subsonic instances that your friends have running.
The feature can be turned on and off for each of your subsonic users. If the user is not allowed to use this search he won't see the "Extended search" button at the search dialog.

So far I'm still working on the frontend which should be completed end of this week.
Then the work on the actual search service needs to be implemented together with the output of the search result of each server that's part of the search.

I posted some screenshots of it at the official Subsonic forum:
http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=950
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: Saijin_Naib on 2008.02.08, 05:38:42
I tried your zipfile with the settings in it, but no change :( Thanks though! Look forward to the new features, even if I cant use em :P
Title: Re: Subsonic - Streaming Music Server - Anyone interested?
Post by: magog on 2008.02.15, 19:12:26
Ok, I've uploaded a new version that includes a new work-in-progress extension (Extended Search).
This version fixes the transcoding and recoding (with lower bitrates) which was broken in the previous release.

I've not tested this on OS/2 and eCS at all but it runs on Windows with Sun Java 1.4.2!
Golden Code Java should still work with this release on OS/2 and eCS but you might have to manually update the DB script (a list of steps is included in a textfile - the file to modify is "subsonic.script" in the \subsonic\db directory).

http://www.informatik.uni-oldenburg.de/~julbts/ports/subsonic_v33x_2008-02-15.zip