Read me first

secondlife users

A guide to streaming music and video in Second Life by Panos Delpaso (iasonas.lemon)
Understanding music streaming in Second Life
It is possible to play (stream) music into Second Life (SL) from an external hosted source, this could be be straight from your computer, an Internet radio station, streaming audio relay or other external source.

Setting music on a parcel of land in Second Life
If you own a parcel of land or you are a group officer with group land, you can set a “Music URL” on the land. This will play the mp3 and ogg stream to people who accept streaming music.

To set the Music URL:

Right click the parcel of land
Click About Land
In the About Land window, click the Media tab
Then enter the full mp3 or ogg streaming url address including the http:// prefix in the Music URL box. For example – http://gold.slserver.com:8000 or http://75.126.100.42:8000
musicurl

Streaming your own music or video in Second Life

It is possible to stream your own music from your computer into Second Life. Unless you have a large amount of bandwidth available, using your own machine as a streaming server is not really an option. With around 5 users connected you would using most of the bandwidth of a standard DSL line.

Therefore to stream your own music you would require a streaming relay provider. You would send a single stream of music to the streaming relay provider. The relay would then stream multiple copies of the music into Second Life.

The most common streaming server systems at the moment are Shoutcast or Icecast. You can either set up the server software on your own server or as most people do, pay someone to host it for you. I offer quality streams for use in Second Life (and on the Internet), check out my store in Bisque for more details.


Streaming music with SAM Broadcaster (PC)

Many DJ’s use SAM Broadcaster which is a great piece of software for live music streaming and you can download a 30 day trial from – http://www.spacialaudio.com

It can handle streaming to a live shoutcast or icecast server and is quite easy to setup. I would recommend the Firebird database version of SAM Broadcaster to start with as its all included in the download and is automatically setup.

First thing you will need to do is setup your encoder/stream settings, to do this:

Simply goto the Desktop B which has the Encoder window (this is default)
Click the + sign to add a new encoder
Choose MP3 (normal) from the list of possible encoding options
Set the quality of your stream (High Quality) and the format of the stream (for example 128kbits, 44.1kHz, Stereo)
sam_encoder1

Click the Server Details tab, select Shoutcast or IceCast as the server type. Then enter the servers ip address, port and password. (if you are using an IceCast server you will also need to provide the mount point)
Set the name of your station, and any other details which are revelant to you.
Click OK to save the encoder details.
sam_encoder2

You should now see the encoder setup in the Encoders window in Desktop B. Now connect the encoder to the stream.

Select the encoder entry
Click the play button and the encoder should connect
Any music or sounds played would now be broadcast to the stream and to the audience listening.

Click Desktop A
In the Queue window add some your favorite music using the + button
Click the play button in Deck A, the first song from your queue will start to play

When playing music or talking on your stream, make sure the “Air” button in depressed in the window (Deck A, Deck B, Voice FX), this means that it will be broadcast live.

In Second Life you then just need to set the Music URL for your stream, remember you need to include the http:// part before the hostname or ip address and the port number. For example might look something like this http://gold.slserver.:8000 or http://75.126.100.42:8000

See the article Understanding Streaming in Second Life if you are not sure about how to set your music address in Second Life.

Common issues using SAM Broadcast

If you are receiving an error similar to “Buffer cleared. Can’t send data fast enough”. This maybe due to latency between you and your server, or simply your upload speed on your Internet connection doesn’t have enough bandwidth to send the stream of music to the server fast enough.

There are several things you can check:

When you aren’t streaming music, run a speed test on your connection ( http://www.speedtest.net), select a location near you and check to see what you upload and download speeds are. Ideally you should have at least 200kbits available for a 128kbits stream.
Try pinging the shoutcast server and see what the response time is. In Windows, click Start > Run > cmd to open command prompt. Then type ping followed byt the ip address of the server in the dos window, example ping 75.126.100.42 Ideally the ping should be lower than 200ms.
If the ping is higher than around 100ms, you might like to try this. In SAM, Click Config > Audio Mixer Pipeline. Then Click the “Air Out” button. On that new window you have Buffer settings. Set the packets to 15 and increase the Packet time, this may be enough to overcome the latency between your connection and the server.


Streaming music with Virtual DJ (PC)
Virtual DJ is another popular choice for those who want to actually DJ with music, offering virutal decks, effects and much more. You can download a free trial here

NOTE: Virtual DJ will work with both Shoutcast and IceCast servers, however as yet I’ve only been able to stream as MP3, as when streaming as OGG the IceCast server would require a mount point, which Virtual DJ doesn’t allow to be configurable.

Once you have installed Virtual DJ, the first thing to do is setup your streaming information:

Launch Virtual DJ

Click the Record tab below the decks
Click the Config button
Select the Recording (Broadcast) sourceExample: Master or Master + MIC
If you use Master + MIC will need to select from the drop down your soundcard/microphone input (this will vary per setup)

Select the Format for your stream (suggest MP3)
Select the Bit Rate for your stream (suggest 128Kbs)
Select the location of the encoder (normally lame_enc.dll as supplied with Virtual DJ)
Enter your streams address (Example: 66.186.49.179)
Enter your DJ name or details you would like to display on the stream
Enter your streams port (Example: 8000)
Enter your streams password
virtual_dj_broadcast

Once you are happy with the settings, click the Start Recording button and Virtual DJ will connect to your stream, then any music played in Virtual DJ will be broadcast to your stream.

In Second Life you then just need to set the Music URL for your stream, remember you need to include the http:// part before the hostname or ip address and the port number. For example might look something like this http://gold.slserver.com:8000 or http://66.186.49.179:8000

See the article Understanding Streaming in Second Life if you are not sure about how to set your music address in Second Life.


Streaming music with Winamp + Shoutcast plugin (PC)

Using the WinAmp MP3 player and the Shoutcast DSP plugin, you simply play the music you want with the encoder plugin active and configured. The encoder plugin connects to the relay server/stream and sends your music live. The relay server/stream then streams the music onto the listeners.

NOTE: If you are using Windows Vista, some functionality of Winamp + Shoutcast plugin will not work as intended (using a microphone within Winamp for DJing) however will work fine if you are only looking to stream music. At the bottom of this guide I’ve put some tips to using Windows Vista.

You will need…

go there and follow instractions https://directory.shoutcast.com/Winamp


Once WinAmp and the Shoutcast DSP plugin are installed:

Run WinAmp (Note: If you are using Windows Vista you will want to run the program using ‘Run as Administrator’ this will ensure your settings are saved for future sessions).
Winamp

Press CTRL P to bring up the preferences menu
In the plugins menu, click on DSP/Effect
Select Nullsoft ShoutCast Source DSP
Winamp Preferences

Then click Close
You should then see the ShoutCast DSP Plugin appear.
Click on the Encoder tab you need to set the quality of the live stream (eg. MP3 – 128Kbits Stereo)
Shoutcast Source Encoder

Check that on the Input tab that Winamp (Recommended) is selected as the Input Device.
Shoutcast Source Input

Click on the Output tab and enter the streaming relay information (address, port and password). Normally this information would be provided by your stream provider. If you are using a shoutcast v1 server (eg. v1.98) make sure you check the Use SHOUTcast v1 mode.
Shoutcast Source Output

You will probably want to set your stream station details in the Directory section of the Output tab (click the Directory tab) and enter your information
Shoutcast Source Yellowpages

Then click Connect in the Output tab to connect to the relay. You should see the stream connected.
Playing any music in WinAmp now will cause the music to be streamed to the relay.
Set your full streaming address (including the http://) on your land parcel so everyone can hear your streamed music.
See the article Understanding Streaming in Second Life if you are not sure about how to set your music address in Second Life.

Using microphone / Push to Talk and Mixer settings

As well as playing prerecorded music in Winamp, it is possible to stream actual live music or your voice using a microphone / headset (an analogue microphone is recommended over a USB device as this will give you more control).

NOTE: Unfortunately if you are using Windows Vista, trying to use Soundcard Input mixer settings will not work as intended, see below this section for tips to get around this problem.

If you are using an external mixer (hardware mixer), set windows recording mixer, probably Line In and set Shoutcast Source plugin > Input tab to use Soundcard Input as the Input Device.

It is possible to use a microphone / headset with Winamp and the Shoutcast plugin, this works by setting your system sound mixer to record what-you-hear so as any music/sound played or voice spoken on your microphone would be broadcast to your stream.

This means it maybe necessary to mute various programs on your computer to avoid these sounds being transmitted.

First open the Windows Volume Control or Sound Mixer window
Click the options menu
Select Recording under the Adjust for volume section
Select “What you hear” (sometimes called stereo mix, stereo out, record master, wave out mix)
If you are using an analogue microphone/headset (recommended) you will probably need to make sure that enable “microphone boost” in advanced micophone settings with in the standard volume control/sound mixer window.

Within Winamp and the Shoutcast Source plugin, in the Input tab pressing the Push to Talk button would adjust the microphone and music levels whilst you are talking, so as microphone level is brought up and the music level is reduced on releasing the Push to Talk button the microphone level is dropped with the the background music level returning back to normal.

If you are planning to DJ on a regular basis, you may want to look to use an alternative program such as SAM Broadcaster which is a fully featured DJ/Broadcast program.

Tips for using Windows Vista and Winamp + Shoutcast plugin.

In Windows Vista the way soundcard settings are controlled has changed. This means that trying to use Winamp and the Shoutcast plugin using the Soundcard Input mixer options fail. While you are still able to select “What U Hear” or Stereo Mix as an option, the Shoutcast plugin is unable to actually control the microphone levels.

You can still manually adjust the levels using the Windows Volume Mixer.

The easiest/simplest option is to mute your microphone during the music (either by the microphone itself or using the Volume Mixer). So as you use Winamp and Shoutcast plugin as usual but then turn off the microphone when music is playing.

You may want to manually set the microphone recording level ahead of time and do this you need to:

Click the Windows button (Start)
Goto Control Panel > Hardware and Sound > Manage Audio Devices.
Under the Recording tab ensure “What U Hear” or Stereo-Mix is selected.
Under the Playback tab, select Speakers then click on the Properties button.
Select the Levels tab, and then increase the Microphone level, as required.
The Shoutcast plugin should still be able to control the volume of Winamp, so you can fade the music down and unmute your microphone. Then when your voice over is complete, mute your microphone and turn up the music level again. As you can see this is more complicated than on Windows XP.


Streaming video with Wirecast (PC or Mac)
Wirecast is a great application for streaming live video/webcasts, its a very capable including features such as chroma key (green screen), layering, onscreen titles.

You can download a free trial of Wirecast from Telestream

First thing you will need to do is setup your encoder/stream settings, to do this:

Launch Wirecast

From the Broadcast menu, select Broadcast Settings
Then click the + Button in the Broadcast tab to add a new stream
Select Encoder Preset: DSL/Cable MPEG4
Destination: Announce to Quicktime Streaming Server
Host name: (this will be provided by your stream hosting provider)
Example: 64.33.51.171:8150
File Location: (this will be provided by your stream hosting provider)
Example: live.sdp
Username: (this will be provided by your stream hosting provider)
Password: (this will be provided by your stream hosting provider)
With Broadcast over TCP (Unchecked this mean the traffic is sent as UDP, which will be faster the TCP, if you are behind a firewall you may want to check this option)
Click Save
wirecast_broadcast_settings

Now the encoder/stream connection details are setup, you should probably now adjust the quality/broadcast settings

In the Broadcast Setting window, click the Edit button next to Encoder Preset
In the Video tab, you can set the video settings for your broadcast, this will vary depending on your hosting provider.
In this example, h.264 is set as the video format with a resolution of 640×480
Adjust Quality, Frame per second (you will need to experiment with these)
Limit data rate, this is important to setting! Depending on your upload speed on your connection you will need to adjust this accordingly, if you set too high the stream will stutter or fail. Remember as well as the video being sent, audio will also be sent and this in addition to this data.If you are ensure of your upload speed on the connection, try http://www.speedtest.net and select a location near you, the site will report back your download and upload speeds.
wirecast_video

Once you are happy with the video settings, don’t forget to check the Audio tab settings. If bandwidth is an issue, we would suggest making sure the audio is good qualitybut maybe opt for mono and then have a lesser quality video stream as people will be able to follow the audio even if the video is updating slowly.

Adjust the audio settings by clicking the Options button. Suggested settings:

Compressor: AAC
Bitrate: 128 kbits/second
Output Sample Rate: 44.00 kHz
Encoder quality: Better
wirecast_audio

Once you are happy with the settings, its time to check the connection.

Under the Broadcast Settings, Select Network to Broadcast
Select your encoder/stream settings
If all is correct, you should see a small red broadcast icon on the lower right of the display window. Anything displayed, played in the live broadcast area would be streamed.

Once you are streaming, you would need to set the Media URL in Second Life. See the article Understanding Streaming in Second Life if you are not sure about how to set your video address in Second Life.