|
|
MP3 Web interface for Linux
`mediaserver' is a Java-based server which plays media under the control of a
socket-based interface, and a Web application that communicates with this
server. Between them, these software components allow Web-based control of
media playback. The server is multi-threaded, so multiple clients can use it
at the same time. The server itself does not play media, but delegates this job
to a `media bridge' which is expected to communicate with a low-level driver,
most likely implemented in native code (i.e., not Java).
The server and Web application allow manipluation of playlists and selection
of tracks from the filesystem, and standard transport operations (play, stop,
skip, pause, etc). They also allow items to be sorted and selected by album title,
genre, etc.
At present, there is a media bridge to the Xaudio MP3 decoder, so mediaserver
can play MP3 audio tracks.
The mediaserver architecture looks something like this:
+----------------+
| |
| Web browser |
| |
+----------------+
O
O
+------------------+
| |
| Web server/ |
| Servlet engine |
| |
+------------------+
O
O
+-------------------+
| |
| mediaserver |
| server |
| process |
| |
| media bridge |
| |
| low-level player |
| |
+-------------------+
It is possible for one Web server to support multiple media servers or,
alternatively, the media server can run on the same machine as the media
server. The latter is, of course, simpler; you do need a fairly heavy-server to
support it. If there is not enough memory, or the machine is generally
underpowered, Web operations will break up the playback.
Server process
This is an all-Java server which plays media under the control
of a socket-based interface; it is intended to be used by the mediaserver Web
application, although it can in principle be used by any client that can handle
a network socket connection and manage a simple text-based protocol. The
protocol is described in the README file in the distribution.
mediaserver was developed and tested
on Linux; other platforms may work but this depends on having appropriate
low-level drivers for those platforms. The server is multi-threaded, so
multiple clients can use it at the same time. The server itself does not play
media, but delegates this job to a `media bridge'. At present, there is a media
bridge to the Xaudio MP3 decoder, so mediaserver can play MP3 audio tracks.
It should be relatively straightforward to extend the bridge to handle other
types of media, or to write new bridges for different drivers. The driver/device
needs to be able to handle `open file', `play' and `stop' operations, and be
able to notify the server than a track has finished playing.
The server itself handles playlist management, and the serialization of
access to the bridge from multiple clients.
Web application
mediaserver Web application is a servlet/JSP-based interface to the mediaserver
system. It allows control over mediaserver operations, including selection of
playlists, control of transport (play, stop, etc). The Web application is
distributed as a J2EE-compliant WAR file and has been tested on Tomcat 3.21
and Tomcat 4.0.
The application is intended to be started by specifying the host and port of the
mediaserver process as arguments to the URL, like this:
http://server:port/mediaserver/Main&host=mediaserverhost&port=mediaserverport
where mediaserverhost is the IP number or name of the system running the media
server, and mediaserverport the corresponding port number. The default port
Download JAR file
|