Raised This Month: $ Target: $400
 0% 

New Jukebox plugin (beta testing)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SirLamer
Senior Member
Join Date: Oct 2008
Old 02-09-2009 , 20:02   New Jukebox plugin (beta testing)
Reply With Quote #1

I am posting to share about a plugin I am very far along writing. I hope to solicit comments and ideas prior to publicly releasing the code to make it as solid an initial product as possible.

I have written a music streaming plugin titled "Jukebox". As a summary, Jukebox offers the following features:
  • MySQL Database-driven library permits complex behind-the-scenes data logging and search abilities.
  • Menu-driven interface for new users, including listings of "newest" and "most popular" tracks as well as the ability to browse content by various subject matter.
  • Command line interface for familiar users, including the ability to look up content via an in-chat search query. Results are presented in a menu structure.
  • Customization settings, such as volume settings, are available to each user and are saved and restored when players return to your server.
  • Includes automatic creation and playback of playlists, to permit playback of an entire subject group, such as an album.
  • Playback begins without popping up the MOTD or anything similar.
  • Administrator-reserved "play to all" feature, including for playlists.
  • A website-based administration system.
    • Permits easy upload of new tracks with automated integration into the database. Uploaded tracks are immediately available for playback.
    • Moderation of uploaded tracks permits metadata edits (track name, artist, etc.) as well as easy deletion of tracks from your webspace and the database.
  • To optimize operating costs, supports automatic offloading of uploaded tracks via FTP to a "remote file server" that offers cheaper webhosting optimized for high bandwidth and low CPU needs (ie. www.canaca.com).
  • Modular design to the plugin's script, permitting relatively easy changes that are propagated throughout the rest of the script.

Technical requirements:
  • A Source engine server (any mod)
  • A website server (usually offered for free by game server renters)
  • A MySQL database accessible by both your web server and the game server (again, this is typical of rented servers)
  • (optional) A "remote file server" for hosting of music tracks (using your main web server is supported, but most hosts won't permit such excessive bandwidth use).

The script is working but is not quite feature complete. However, it is very usable and I invite people to try it out on my TF2 server "The Glory Hole". Note that it's a custom maps server and you will probably have to download a map to connect - it has "fast download", though.

Server address: gloryhole.nuclearfallout.net
Location: Seattle, Washington

I 100% intend to release this plugin and the source code, it's just not ready yet. The on-server interface works well, but the web-based administration stuff needs a lot of polishing before I can share it. It's an enormous project and it has already taken a long time! But, I would value input from people with experience developing SourceMod plugins - so far it's all from casual players. Plus, if you're just curious, feel free to just look. ;)

To use: Type "!jukebox" or "!jb" in chat. The menu will pop up. To search for something, say in chat "!jb your search query" without any special characters or other queues after the first command. For some example content, we have a lot of TV show songs, as well as The Who and Daft Punk.

If the map has its own background music and the server is empty, use "rtv" (rock the vote) to get a new map so you can better hear Jukebox.

Planned features prior to public release:
  • In-chat information on what was selected for playback.
  • Integrated instructions for new users (via the MOTD page).
  • Additional ability to search by genre.
  • Pre-buffer of music playback software on client machine to avoid first-time hop (by loading a null playlist just after connection).
  • Ability for players to block/disable "play to all" commands from admins, and the counter-ability for admins to "force" playback to all players when such action is justified.

Planned future features:
  • Ability to build a playlist via track selection from several queries, then play it back (right now you can only play back a single search query's results).
  • Automatic installation of multiple tracks at once, bundled in folders or .zip files and uploaded via FTP.
  • Improved means to handle the MOTD so that it displays on first connect but does not thereafter, in order to avoid playback disruptions on map change (right now I have MOTD disabled to compensate).
  • System-side tracking of who is playing music to permit intelligent decisions about whether to block "play to all" commands from admins for individual clients.
  • An "eavesdrop" convenience feature to let people listen to what someone else is playing without having to repeat the whole command.
  • Ability for admins to adjust global settings via the menu interface.
  • Automatic normalization of tracks using the Replay Gain algorithm. This will probably require a remote computer to perform the calculations and file changes, which will be integrated via FTP. Variable availability of such a machine will be supported, to permit the use of a home computer or another machine with casual availability.

Known bugs:
  • Results from the Browse section are out of order when browsing Artists or Albums.
  • Album and Artist names fail to display in some contexts in the menu interface

I will post pictures later.

Last edited by SirLamer; 02-10-2009 at 11:17.
SirLamer is offline
Sexual Harassment Panda
Veteran Member
Join Date: Dec 2008
Location: San Diego, CA
Old 03-23-2009 , 18:25   Re: New Jukebox plugin (beta testing)
Reply With Quote #2

Would you be willing to release your beta version for testing? I started work on something similar to this, but never really got anywhere, as I don't know any sourcepawn.
__________________
Sexual Harassment Panda is offline
SirLamer
Senior Member
Join Date: Oct 2008
Old 03-23-2009 , 22:16   Re: New Jukebox plugin (beta testing)
Reply With Quote #3

Hey,

I continue to work on this, but haven't said much about it since no one has said anything until now!

The front end is fairly solid but the administrative back end is not yet secure enough to publish it. At this point, it would be a serious security issue if I published it. My focus as of late has been to bring this up to shape so that I can publish it.

For the first release, I will probably ask users to password protect an "admin" folder using .htaccess, but I intend to integrate the security into Joomla or SMF for my own purposes and may try to integrate security straight into the Sourcemod admin database.

I'm sorry I can't publish this right now. I do believe that this is a far more sophisticated solution than what has been demonstrated to date, so I hope it is worth your patience. ;)
SirLamer is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 03-24-2009 , 09:02   Re: New Jukebox plugin (beta testing)
Reply With Quote #4

Congrats SirLamer on getting this far on a jukebox/music playback system. I was working on a similar system, but I got busy with other things.

I started working on a website for users to upload files and be able to play them in game. That way they'd be able to login and submit songs, with a limit of course. I got that far and never finished. Perhaps you could include that?

Also, on the issue of security, I feel its neccessary to have a php file feed the embedded windows media player on the client's computer. That way you can control access and deny playing songs to clients that are out of game. 2fort2furious has a decent setup to restrict access.

One more thing: I was working on a karaoke mod awhile back. It accepts *.lrc files, parses them, and displays the lyrics on the screen. Much similar to the 2f2f videos. It would be VERY EASY for you to take the code and include it with this plugin. It would make a nice addition to your plugin and I was wondering if you would like it.

Anyway, good luck. Don't tease us and release the code.
__________________
pheadxdll is offline
SirLamer
Senior Member
Join Date: Oct 2008
Old 03-24-2009 , 12:10   Re: New Jukebox plugin (beta testing)
Reply With Quote #5

Thanks for the support.

I already do have uploading via a website, however I think I will have to require uploading to a folder via FTP for the script to then read from. It's not practical to upload songs via HTTP forms because HTTP will usually time out before the song uploads unless your internet connection is fast AND your web host allows for large uploads AND the timeout duration is longer than normal. It's not reasonable to expect many or even some people to have this arrangement. I have found an FTP applet driven by PHP that I will be using to allow people to upload their music (even batch uploads of multiple files or a zip archive works) then the script parses the folder. BTW, even right now I can add a large batch of several songs at once, and it pulls the ID3 data from them. I can also manually define the artist and album and all that for each batch or edit other metadata as needed.

My setup will be designed so that donators (or other supporters with permission) will be able to upload songs. I don't intend to enforce a quantity limit myself (I have 2TB of online storage space and the interface is dynamic enough to handle large quantities very well) but including a limit feature will be easy to do.

The security will just be a header function along the lines of "if this guy doesn't check out, then don't run the script" that will check for each refresh.

There's also a separate "admin" script used to manage already uploaded content, and a "remote transfer" script that will pass the MP3s via FTP to another web server if desired. The point with the latter script is to allow integration with your website for uploading and management wherever it may be and allow "out of site, out of mind" transfer management of the files to a cheaper file server.

I have my own ideas for karaoke, again more aggressive than typically talked about. I don't think it will be practical to just straight parse an .lrc file for my idea but I think I will parse .lrcs using PHP to a web script to help the user develop the lyrics into something that will compliment our ideas of how it should work.

I'm sure I'll be able to benefit from what you've done to expedite development of karaoke for my script, though! Know that I cannot commit to moving on to developing karaoke right away, as there are a couple smaller plugins I want to develop first for administrative type things. Eventually, I intend to develop karaoke as an "add-on" plugin that just needs the Jukebox one to work.

Right now the MP3s aren't "served" like a file downloading website might do. I do this for a couple reasons:
1. My script supports playlists, which depends on a direct-to-file URL for each MP3
2. My web host, which is provided by my game server host, does not offer hidden space behind public_html to store the files.
On the other hand, all the MP3s are renamed with their MD5 checksum so it would be really hard to comb through and collect a bunch of songs that you are looking for. I'll probably just lock the script to only run for a specified IP address (ie. your server IP) but the whole thing is really useless unless you can get onto the MySQL database anyway... which of course is already secure.

If you want to follow what we're doing or start playing with us, we are just starting up a web site. It is very new, in fact all the graphics just went up yesterday, so please don't judge. ;)

TEAM CHEESUS at teamcheesus.nuclearfallout.net

Again, I can't release the code until it is more secure. As you likely know, if I release the code without any security provisions then people can use the release to figure out how to get in and mess around with my setup.
SirLamer is offline
SirLamer
Senior Member
Join Date: Oct 2008
Old 05-27-2009 , 11:50   Re: New Jukebox plugin (beta testing)
Reply With Quote #6

Just a progress update...

I have a pretty solid product now, except for a very substantial and elusive bug in the server-side program that is causing Jukebox to glitch out and stop working once in awhile. It is usually fine with just a couple people on the server but rarely works when the server is full. I need to fix this and beta test enough to prove that it is stable before releasing.

Thanks for your patience.
__________________
Visit TEAM CHEESUS, a TF2 community with our own brand of injected shenanigans, for added flavor.

Plugins: Jukebox for Source
SirLamer is offline
commando
AlliedModders Donor
Join Date: Oct 2008
Old 05-27-2009 , 18:15   Re: New Jukebox plugin (beta testing)
Reply With Quote #7

Quote:
Originally Posted by SirLamer View Post
Just a progress update...

I have a pretty solid product now, except for a very substantial and elusive bug in the server-side program that is causing Jukebox to glitch out and stop working once in awhile. It is usually fine with just a couple people on the server but rarely works when the server is full. I need to fix this and beta test enough to prove that it is stable before releasing.

Thanks for your patience.
I think you are doing a wonderful job. It's great that you took so much time on your own plugin and are going to share it with the community. This seems like a plugin I would proudly pay for. I'll will be sure to drop by your server to check it out. I hope to be one of the first to jump on it when it is released ;)

*Edit: Just played. I see it makes the song restart after you change the volume. Anyway to change the volume mid-song? Also plays the song after the one you selected in the list, doesnt just stop playing the first song.

Last edited by commando; 05-27-2009 at 18:46.
commando is offline
Sexual Harassment Panda
Veteran Member
Join Date: Dec 2008
Location: San Diego, CA
Old 05-29-2009 , 19:35   Re: New Jukebox plugin (beta testing)
Reply With Quote #8

Just checking in again, are you still working on this?
__________________
Sexual Harassment Panda is offline
SirLamer
Senior Member
Join Date: Oct 2008
Old 05-31-2009 , 04:04   Re: New Jukebox plugin (beta testing)
Reply With Quote #9

I am absolutely still working on this - my last post is from 4 days ago. ;)

FYI, you guys tried an old version that I had on there because it is more stable.

Just now I put on my latest version, which is now also very stable and seems to have only a couple non-critical bugs. It handles things very differently and also manages volume changes better.

I have no knowledge of how to change the volume without restarting the song. This is actually an HTML limitation, since an HTML script, as far as I know, can't tell the web browser to start playing an MP3 in the middle of the track. Since the only way to change the volume is to refresh the page, my current solution is to provide the user the choice between restarting the song or not.

In the future I'll probably include a short demo track that quickly provides listening samples of various types to help users gauge the setting without having to actually listen to a bunch of songs.
__________________
Visit TEAM CHEESUS, a TF2 community with our own brand of injected shenanigans, for added flavor.

Plugins: Jukebox for Source
SirLamer is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 05-31-2009 , 11:30   Re: New Jukebox plugin (beta testing)
Reply With Quote #10

Quote:
Originally Posted by Sir Lamer
I have no knowledge of how to change the volume without restarting the song. This is actually an HTML limitation, since an HTML script, as far as I know, can't tell the web browser to start playing an MP3 in the middle of the track. Since the only way to change the volume is to refresh the page, my current solution is to provide the user the choice between restarting the song or not.
What 2F2F does is uses the PARAM attribute CurrentPosition. Just have a timer running whenever a player starts a song and you can restart the song approximately where it was stopped.

Code:
<PARAM NAME="CurrentPosition" VALUE="xx">
Good luck with your jukebox plugin.
__________________
pheadxdll is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode