Streaming Video in Second Life

From Second Life Wiki
Jump to navigation Jump to search
KBwarning.png Warning: This page references the use of Apple QuickTime. As of April 2016, the Windows version of this product has been deprecated by Apple, although it has two known critical vulnerabilities. On April 14th, 2016, an advisory was issued that QuickTime for Windows be immediately uninstalled from Windows systems.

Streaming video into Second Life is fairly simple and provides you with increased abilities in information delivery for businesses and educators, as well as greater potential for entertainment venues and special events.

This article steps you through the processes of establishing movie playback, streaming live video into Second Life, and broadcasting from Second Life.

Streaming Video into Second Life

Getting Started

The following are the basic prerequisites for streaming video into Second Life:

  • You must either be the landowner or administrator of the property you plan to stream into
  • Your movie files must be compressed using QuickTime format, and QuickTime must be installed on your computer
  • ** If the video you're attempting to stream plays in the QuickTime player on your own computer, it should stream into Second Life correctly
    • If the video you're attempting to stream doesn't play in the QuickTime player on your own computer, it almost certainly won't work
  • The movie must exist as an active URL link on a hosting web server

Prior to setting up your media playback mechanism in Second Life, test the URL of your movie by pasting its link in the address bar of a web browser. If it works there, you shouldn't experience any problems streaming it into Second Life.

Setting Up the Media Player and Accessing a Stream

The first step is to set up a media player in Second Life. While standing on the parcel of land you wish to stream into, follow these steps:

KBnote.png Note: We suggest that you use the default media texture found in the Library > Textures folder in your inventory. You can use any texture you like, as long as the textures in steps 3 and 4 are identical.

Using LSL Commands to Play Movies

The Linden Scripting Language (LSL) is one of the most powerful components of the Second Life platform, and through it you can be more creative with how you stream video onto objects. An example can be found in your Second Life inventory:

Inventory > Library > Objects > Media Player

After dragging and dropping the media player object onto your land:

  1. Right-click on the Media Player to access the Edit window.
  2. Click the Contents tab, and double click on the script labeled Media Controller.
  3. Edit the script as necessary for your playback (you may want to consult a scripting specialist in Second Life to set it up correctly).

Broadcasting Video from Second Life

Broadcasting from Second Life is very similar to streaming live media into Second Life, although you have a few more options.

To do this, make sure you have:

  • A computer fast enough to run Second Life and your capture/broadcasting software simultaneously
  • Enough upload bandwidth for the stream, typically a minimum of 250kbps
  • A media streaming host
  • A website to stream from

Setup for Mac

  1. Run Second Life on a fast Macintosh computer.
  2. Set Second Life's window size by selecting Edit>Preferences>Graphics and choosing your preferred setting.
  3. Install and run QuickTime Broadcaster. Read the information on Apple's web site to configure it correctly.
  4. Point Broadcaster's output to a host server (QTSS), which provides you with a URL for the stream.
  5. You'll now have an active URL of the stream.

Setup for PC

  1. Run Second Life on a fast computer.
  2. Set Second Life's window size by selecting Edit>Preferences>Graphics and choosing your preferred setting.
  3. Install and run Windows Media Encoder 9. Read the documentation in order to configure it correctly.
  4. Make Second Life the window to capture in WME9:
    1. Click Properties > Sources > [Video] Configure.
    2. In the Capture Source dropdown, select Second Life. In Properties > Sources > [Video] Configure you can select Region of Screen from the dropdown menu, then set a precise region of your screen to capture either by dragging a selection window or entering exact pixel coordinates. You can also choose to both broadcast and save a local version (compressed in WMV format) on your hard drive, although this requires an extremely fast computer, a lot of RAM, and a lot of free space on your hard drive.Kbsd StreamingVid WMEncoder.jpgThe Windows Media Encoder 9 Properties panel, with Second Life selected as the Capture Source window.
  5. In the Output tab, select Push to server and enter the data for your hosting server. This will provide you with a URL for the stream.

Streaming Live Video into Second Life

Common Considerations

  • When deciding on a host for your stream, be aware of the maximum number of simultaneous connections allowed.
  • Understand that you may experience latency in the stream (from when you do something in Second Life to when you can see it in the final URL stream). This is common in any form of streamed media, and can range from a few seconds to 15 seconds or more.
  • Make sure your video and audio codecs are up to date.
KBtip2.png Tip: Test each portion of this process as you go along. Troubleshooting will be much easier because you'll be able to isolate exactly where a problem may exist in the process.

Second Life Event Broadcasting (Concerts, meetings, contests, etc.)

When broadcasting an inworld live event, you may need to keep your avatar logged in for more than the 10-minute maximum on the capturing computer. To do this, open then Advanced menu if it's not already on the menu bar, then deselect select Advanced > Character > Character Tests > Go Away/AFK When Idle.

Only run Second Life and your capture/broadcasting software on your source computer. This will enable the system to focus its resources solely on your broadcasting task.

Real-World Event Broadcasting (Concerts, lectures, sports, etc.)

A video camera will (most likely) serve as your capture source device.

Only run Second Life and your capture/broadcasting software on your source computer. This will enable the system to focus its resources solely on your broadcasting task.

Setup for Mac

KBtip2.png Tip: The simplest way to connect your camera to your computer is to connect the FireWire output on the camera to the FireWire input on the computer.

Kbsd StreamingVid BroadcastIllo.jpgThis diagram shows how to setup a live video stream into Second Life via QuickTime Broadcaster (QTB) and QuickTime Streaming Server (QTSS). Windows configuration is the same, except for the software used on the encoding/broadcasting computer.

Set-up for PC

KBtip2.png Tip: The simplest way to connect your camera to your computer is to connect the FireWire output on the camera to the FireWire input on the computer (this may require a capture card with FireWire input).

Troubleshooting

If you're having problems playing video in the Second Life Viewer®, try these quick tips:

1. Install QuickTime

Second Life's streaming video is powered by QuickTime. If you don't have the latest stable version, download QuickTime from Apple's site. After installing it, you will likely need to restart your computer.

Refer to Apple's Support for help fixing QuickTime issues.

2. Set your controls correctly

Streaming media must be enabled in the Second Life® Viewer.

  1. Go to Edit > Preferences.
  2. Click Audio & Video tab.
  3. Check Play Streaming Media When Available.

Kb mediapref screenshot.png

When you're on a video-enabled parcel, the play button in the lower-right of your Viewer is enabled.

If you're encountering audio-specific difficulties:

  • Go to Edit > Preferences.
  • Click Audio & Video tab.
  • Look at the Volume sliders. Master and Media should both be on.
KBtip2.png Tip: You can also access the volume sliders by clicking the ^ button to the right of the Master volume slider in the lower-right of your Viewer.

Related, see "How to play streaming music in Second Life".

3. Check if the parcel has a video

If nothing still plays, it could be that the parcel doesn't have a video URL set.

  1. Go to World > About Land.
  2. Click Media tab and look next to Media Type and Media URL.

Kb AboutLandMedia screenshot.png

Some parcels hide the information but if it's not obscured, it should show something like this:

Many, but not all valid movies end in ".mov" or ".mp4". A live stream may end in ".rtsp" or ".sdp".

If you're not sure where to find a video-enabled parcel, see the "Test parcels" page.

4. Test the movie outside of Second Life

QuickTime Player is a good way to narrow down the source of the problem: if a video doesn't play in QT Player, it almost certainly won't work in Second Life. Here's how:

  1. Find a video-enabled parcel in Second Life.
  2. Go to About Land and click Media tab.
  3. Copy the Media URL.
  4. Open QuickTime Player. It's found in your Program Files folder on Windows or Applications folder on Mac. It may already have a shortcut placed in the Start Menu or Dock.
  5. In QT Player, use File > Open URL.
  6. Paste the Media URL.
  7. Click OK.

If the video file is valid, it will start playing momentarily. Some videos are huge files (e.g., 100MB for a 30-second clip) and take considerably longer to start because they're optimized for download and playback from your local hard drive. In those cases, the video should be compressed so it retains most of its visual quality but is compact enough to stream over the Internet. You or the video author can do this using QuickTime Pro or another transcoding tool.

KBnote.png Note: Only video formats compatible with the default QuickTime install work in Second Life. Add-on formats like .wmv support in Flip4Mac won't work with Second Life.

5. Make sure you have enough bandwidth

Playing video can be bandwidth-intensive. If you don't have enough bandwidth, the video pauses as it struggles to download more chunks and show them to you. We recommend having a broadband connection which can sustain 768kbps or higher - more is better. If you're not sure how much bandwidth you have available, check with your Internet Service Provider.

6. Check with your friends. Are they seeing the movie?

It's fun to watch movies together but you'll be sad if you're left out: ask friends or other nearby Residents on the same parcel if they can see the video. This is a quick and common test which can rule out whether the problem is on your computer.

Videos are not stored on Linden Lab's servers

Finally, with the exception of official Linden Lab materials, videos are not stored on Linden Lab's servers. The Second Life Viewer connects directly to the server that is providing the video, so the videos are downloaded directly by your computer and viewed as part of the immersive inworld experience. Therefore, the vast majority of videos are not affected by Second Life performance issues, but are dependent on the robustness of the hosting server. If you experience further problems, contact the video server administrator.


Helpful Links

Capture/Broadcasting solutions

QuickTime Broadcaster

Windows Media Encoder 9

Camtasia Studio 4

VaraSoftware

Netro Media

For a list of software capture and broadcast solutions, Google: "streaming video software" (remember that they must be QuickTime compatible)

Hosting Solutions

QuickTime Streaming Server

QuickTime Streaming Server rentals

Netro Media

Stream Hoster

Bulletstream Technologies

VitalStream

StreamingMedia (this site is a great resource for streaming video and audio)

For a list of host sites, Google: "video streaming host" (remember that they must be QuickTime compatible)

Case Studies

Ustream.com

DestroyTV.com

Macblurayplayer.com