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.
I don’t feel useless. I am useless. o.o
Hmm… to minimize the password issue, what about this idea:
(1) create an alt;
(2) give the alt enough L to pay for the uploads
(3) use the alt account to upload
(4) then give the sound files to the main account
While this would risk the alt account, your risks would be minimized.
Alternatively, someone (presumably you) could develop a business allowing you to import mp3s into SL for a small fee. Example: I would email you the mp3, you upload it and I purchase it in-world. You might consider contacting Bobby Fairweather and his SecondTunes program.
For both of these the question is can a sound file be “given” between accounts like a texture. I presume it could but haven’t tried it.
niko
It can be given, although not easily an automated way. LibSL doesn’t count as “easy” because it spends most of its time broken by the most recent update. My library doesn’t have this problem.
Unforunately, I’m 15, so I can’t really contact anyone unless they’re on the TG.
And yes, sound files can be given.
Wowsa! Thanks for your work, especially on phpsimcaps. I had been trying to use simcaps, but was having trouble with some of the details. I now have a version working in Ruby. It works all the way to the final upload step, when the response is state=upload failure, message=No Error. So I tried tests/assetupload/textureload.php directly from your sources — and got the same response. I’m running on Mac OS X 10.4.8 ImageMagick 6.3.2, php 5.2.2. Thanks for any thoughts… and more tons of thanks for sharing phpsimcaps with the world. –am
I need to update that – I have a working one, but I never put it up. I’ll fix that now.
oh my gosh, it worked for me! yipeeee. Then I ported your changes into my Ruby version, and that worked too! extra-yippeeee. Ten million thankyous.
Tried many times, none worked. Great?
Awww… I was really excited about this! But it keeps failing stating that it couldn’t log in. Oh well… great idea though!
realtime report:
- the upload have been done by the Niko Donburi alter sugestion in a decent time for a 4.81 mb mp3 128 / 44 khz
- now im stuck here at “The script will be shown here when it is ready.Please do not close or refresh this page.” since about 10 minutes ago
- i wonder if ive lost my precious alter forever
- end of report to here
- after 25 minutes i still at “The script will be shown here when it is ready.Please do not close or refresh this page.”
- i seriously think ive lost my precious alter forever
- end of report to here
- after 40 min the same “The script will be shown here when it is ready.Please do not close or refresh this page.” remains without change in the window browser i used for the upload
- my alter was nice and cute, answers by carter, and he used to like chicken and rice
- last time seen wearing a clear yellow coat and the sexy male jeans pants
- please contact me if you find him camping somewhere
- end of audiocream’s mp3 upload realtime report to here
- after 45 minutes is said “// Upload failed – couldn’t log in.”
- gonna check my sweet carter’s acount
- end of report to here
- my alter acount still remains after change password. The money balance is the same, and the mp3 or new audio files are in his inventary
- ive lost almost one hour here, but was exciting
- end of report
corection to the last real time report part:
- < NOT NOT NOT NOT >
correction to the corection to the last real time report part:
- my alter acount still remains after change password. The money balance is the same, and the mp3 or new audio files are NOT, NOT, NOT, NOT in his inventary
- have as fun as i had reporting here
)