The Source for Java Technology Collaboration


Home | Changes | Index | Search | Go

Video Player Administration


Topics

Summary

The Video Player allows you to play video and view streaming video from webcams in Wonderland.

There are three versions of the Video Player:

  • a movie player
  • a webcam viewer
  • a panorama application for pan, tilt, zoom cameras

Movie Player

The movie player supports playback of recorded movies. For details of the supported movie formats, refer to:

Quicktime (MPEG-4), Flash Video (used by YouTube) and H.264 are among the popular supported formats.


Figure 1: Movie Player

Webcam Viewer

The Webcam Viewer allows streaming video from Axis video cameras to be displayed in Wonderland. In the future, we'd like to add support for common desktop webcams.


Figure 2: Webcam Viewer

Panorama Viewer

The Panorama Viewer displays video from a pan, tilt, zoom (PTZ) camera in a 3x3 grid. The camera can be panned and zoomed to display live video from any area of the camera's field of view. As the live view is moved around, a panoramic image is constructed.

The Panorama Viewer currently supports the Axis 212 PTZ. This is a high quality pan, tilt, zoom camera with a wide-angle 3 megapixel sensor.


Figure 3: Panorama Viewer

Installing the Video Player

The Video application is loaded into Wonderland using WFS. Sample WFS property files are provided in the wonderland-modules project on java.net:

https://wonderland-modules.dev.java.net/source/browse/wonderland-modules/trunk/src/modules/apps/2d/video/

There are three example property files:

  1. Video-movie-wlc.xml
    This property file configures the application as a Movie Player.

  2. Video-webcam-wlc.xml
    Configures the application as a Webcam Viewer.

  3. Panoramic-video-wlc.xml
    This property file shows how to configure the application as a Panorama Viewer.

To install the video player, copy one of these WFS property files to the WFS directory on your Wonderland server. For example, to install the Movie Player in the default Wonderland MPK20 world, copy Video-movie-wlc.xml to lg3d-wonderland/src/worlds/default-wfs/building-wld/ConferenceRoom-wld. Note that the property file sets the position of the movie player to the far wall of the conference room.

Next, edit the file and change the URL of the video:

<void property="source">                     
    <string>http://research.sun.com/projects/mc/video/MPK20-oct2007.mov</string>
</void>

The size of the video window is specified by the following properties:

<void property="preferredWidth">
    <double>1280</double> 
</void>
<void property="preferredHeight">
    <double>960</double>
</void>

These are preferred values; the video application will stretch the movie to fit the specified width and adjust the height to maintain the correct aspect ratio.

If you're installing a webcam or panorama viewer for use with an Axis camera, you need to create a user account on the camera for the video player. To do this, go to the camera's web page and click Setup and log in. Next click Users in the Basic Configuration section and click (Add...). Enter the following information:

  • User name: admin
  • Password: admin
  • User group: Administrator
  • Check the "Enable PTZ control" check box

Press (OK) to create the account. The user name and password are currently fixed in the video application.

When you have finished configuring Wonderland, restart the Wonderland server, or use the Wonderland Manager application to reload WFS.

Deployment Tips

  • YouTube movie URLs are not playable in the Movie Player. To play a YouTube video, you need to obtain a copy of the Flash video file. There are a number of utilities available which can do this.
  • The webcam and panorama viewers only support Axis webcams. They do not work with other webcams.
  • The frame rate only controls how frequently frames are displayed by the video application. The webcam and panorama viewers retrieve frames from the webcam at a fixed rate of 10 frames per second. Lowering the frame rate will not change the frame retrieval rate or reduce bandwidth utilization.
  • For best performance set the preferred width and height to the same size as the video and scale the viewer using the pixelScale attribute. If you set the preferred sizes larger than the frame size, the frames will be scaled in software. This is cpu intensive and will reduce Wonderland performance.

Application Properties

The Video Player can be pre-configured by setting the following properties in the WFS property file. These are defaults used by the video application when the property isn't specified in the WFS file. The sample WFS files may have different values than these defaults. Note that the panorama properties only apply when using a panorama source. They can't be applied to a recorded video source.

Property Type Description Default Required?
source string URL of the video or webcam http://research.sun.com/projects/mc/video/MPK20-oct2007.mov Y
videoClass string type of video source (a movie or a PTZ camera), one of the following:

org.jdesktop.lg3d.wonderland.videomodule.common.SimpleMovie
org.jdesktop.lg3d.wonderland.videomodule.common.PTZCamera

none Y
clientClassname string player type, one of the following:

org.jdesktop.lg3d.wonderland.videomodule.client.cell.VideoApp
org.jdesktop.lg3d.wonderland.videomodule.client.cell.PTZPanoramaApp
org.jdesktop.lg3d.wonderland.videomodule.client.cell.PTZCameraApp

none Y
playOnLoad boolean whether to play the movie on entering the world (if true, playback will start when the first user enters the world) false Y
synced boolean whether to sync playback with other clients true Y
position double where to start playback, in seconds 0.5 N
frameRate double frame rate in frames/second 2.0 N
panoramic boolean show panorama? false N
pan float initial pan angle in degrees (-49 to 49) 0 N
tilt float initial tilt angle in degrees (-36 to 36) 0 N
zoom float initial zoom factor (200-9740) 200 N
synced boolean whether to sync with other clients true N
requestThrottle int delay in seconds between sending camera requests (in milliseconds) 2500 N
preferredWidth double preferred width in pixels 640 N
preferredHeight double preferred height in pixels 480 N
pixelScale float scale factor used to scale the video window 1.0 N
decorated boolean whether to display a border around the application true N

Topic ProjectWonderlandVideoPlayerAdmin . { Edit | Ref-By | Printable | Diffs r6 < r5 < r4 < r3 < r2 | More }
 XML java.net RSS

Revision r6 - 27 Jan 2009 - 17:59:05 - Main.nsimpson
Parents: WebHome > ProjectWonderland > WonderlandRoadmap > WonderlandReleasepoint4