kathar.in

(with an e on the end)

Upload MP3s to SL

| Comments

THIS DOESN’T WORK ANY MORE. Since people tend to come here looking for information on uploading sound files to SL in Google, you do so by uploading a 44.1KHz WAV file that is LESS than 10.0 seconds long - exactly 10.0 is too long.

I’ve made a system for uploading MP3s to SL. It splits the MP3 into multiple 9.99 second long pieces, converts them to 128 kbps, 44.1KHz, mono Ogg Vorbis files (the format SL uses), and uploads them using your account. It then generates and prints out some LSL that you can use to play the file back.

If you want to use my service, I give you this warning first: This system requires your SL name and password. While I promise that this data is never stored or transmitted, and nor are the caps URLs that are received from the login server. However, common sense says one should not give out their password. Ever. Unless you have some reason to trust me absolutely, change your password temporarily, use my service, and immediately change it back. Alternatively, just don’t use the system. If there’s any demand for it (as determined by comments and/or IMs), I’ll make a version that uses TSLE’s system account and takes the upload fees from your TSLE balance, thus avoiding you entering your SL password. You’d have to enter your TSLE password, but given that you do that whenever you use TSLE, which I also run, this isn’t a problem.

Having said that, I’ll also point out that you have to log out before using this, as the system needs to contact the login server to get some data back. When it does so it will log you out if you are logged in, after which the upload will fail. It also costs L$10 for every 9.99 seconds, due to asset upload fees.

With all the disclaimers, warnings, advisories, etc. out of the way, you can find it at https://secure.katharineberry.co.uk/upload/. Yes, I know my certificate is self signed. It’s that or sending passwords as plaintext.

Since you’ve read this far, let me repeat: THIS DOESN’T WORK ANY MORE.

How does it work?

After it has your file, which is renamed to a 32 character unique ID, it creates a directory with a similar name (work-uniqueid). Having done this, it uses “mp3splt” to split the file into 9.99 second long pieces.Each segment is then decoded to wav using LAME, and encoded as an SL-compatible Ogg Vorbis file using oggenc. Once this has been done, the script uses “phpsimcaps”, a library for interacting with SL from PHP using simcaps that I made/am making, to upload the file and note the key. Once this is done it saves the list, along with a script to play it, to a file called “uniqueid.lsl”. The AJAX that has been polling the server every five seconds from your browser while this was happening then triggers this file to be sent back to your browser, followed by the file being deleted.

Comments