                                    vnc2swf

   Screen Recorder

   Vnc2swf Home Page:
   [1]http://www.unixuser.org/~euske/vnc2swf/index.html

                                                                    $Id: README,v 1.6 2004/04/17 04:59:10 yusuke Exp $
     _________________________________________________________________

Syntax

   vnc2swf [ options ] swf_filename [ host ][: display ]

Description

   vnc2swf is a screen recording tool for X-Window (X11), Windows and Mac
   OS Desktop. It records the live motion of a screen and generates a
   Macromedia Flash(TM) movie (.swf) file. Motion capturing is divided
   into two parts:
    1. Convert a screen image into some portable image format.
    2. Record the captured images in a Flash movie.

   vnc2swf takes the second part of this process. It captures a screen
   image via Virtual Network Computing (VNC) protocol. It relys on a
   separated VNC server such as XVnc, WinVNC or OSXVnc for the first
   part. A VNC server captures live screen images and sends them to
   vnc2swf through the network. This allows us to record various kinds of
   desktops (X11, Windows and MacOSX) with one program.

   The usage of vnc2swf is similar to that of vncviewer, a standard VNC
   client which was included in the original VNC distribution. First you
   need to start a VNC server. Then you can launch vnc2swf and connect to
   the server with your password (if any). After a session begins,
   pressing F9 key starts screen recording. When you quit the program (by
   choosing "Quit" from a popup menu or sending SIGINT), vnc2swf writes
   the Flash movie into the given swf_filename.

   You need to obtain at least one VNC server in addition to the vnc2swf
   distribution. Currently the following VNC servers are supported:
     * [2]XVnc. This is included in a standard VNC distribution such as
       [3]RealVNC or [4]TightVNC. It creates a virtual X11 desktop which
       can be accessed from a VNC client via network. vnc2swf can record
       this virtual desktop.
     * [5]WinVNC. It lets you access to an existing Windows desktop.
       Although vnc2swf itself doesn't work on Windows, this allows you
       to record a Windows desktop with vnc2swf which is running in a
       separated remote machine.
     * [6]OSXVnc. Similarly, this allows you to record a Mac OS desktop.
     * [7]x11vnc. Unlike XVnc, this program let you control an existing
       X11 screen instead of creating a virtual one. This allows you to
       record the current desktop with vnc2swf. x11vnc is included in
       [8]LibVNCServer distribution. When you use x11vnc, you need to
       launch vnc2swf with non-window mode to prevent vnc2swf from
       recording the vnc2swf window itself infinitely.

Options

   Since vnc2swf is a derivative of vncviewer, it accepts most of options
   which were for vncviewer, too. You can get a list of options by giving
   -h as an option to vnc2swf. Most of these options can also be
   specified as X resources.

   Here are additional options for vnc2swf:

   -framerate frames_per_second
          Set the framerate of the movie to frames_per_second. The
          default value is 12 (fps).

   -soundfile mp3_to_play
          Specify a mp3 file (e.g. instructions by voice) to be attached
          to the movie. If you want to record a realtime sound stream,
          specify a FIFO (named pipe) here and direct the output of a MP3
          recorder to the FIFO (you need [9]ming-input-stream.patch (for
          ming-0.2a) in this case). This is contributed by by Tim Jansen
          <tim at tjansen dot de>.

   -nommhack
          Disable Macromedia hack. For some reason, Macromedia Flash
          Player implementation displays a bitmap off by 1pixel. This
          doesn't occur in libflash. So a movie created for Macromedia
          Flash Player doesn't show correctly on libflash, and vice
          versa. If you want to play the movie specifically with
          libflash, use this option.

   -startrecording
          Normally when vnc2swf launches it doesn't record a screen until
          F9 key is pressed. This option forces vnc2swf to start
          recording immediately after a session begins.

   -recordingmethod 0 or 1
          Specify the recording method.

          + 0: Immediate mode. Record every image update immediately
            (default). This might cause the movie size grow very large if
            the wide area of a screen is updated frequently.
          + 1: Buffered mode. Record only one image update per frame. It
            tries to minimize the image size to be recorded by tracking a
            minimal rectangular region which covers all image changes
            occured within one frame.

          You can also change this option by pressing F10 key during
          recording.

   -immediately
          Equivalent to -recordingmethod 0.

   -buffered
          Equivalent to -recordingmethod 1.

   -nowindow
          Non-window mode. This prevents vnc2swf from displaying anything
          on a screen. This is useful when you use x11vnc because x11vnc
          tries to capture the vnc2swf window which shows the captured
          image itself.

   -nostatus
          Don't display the recording status on a screen.

   -clippinggeometry geometry
          Instruct vnc2swf to record only the part of a screen specified
          by the geometry. Geometry is speficied in the form of width x
          height[+-]x[+-]y. This is useful if you want to record a
          specific region rather than the entire screen.

Sample Session

$ vncserver :1 -geometry 640x480  (start VNC Server)

New 'X' desktop is grape:1

Starting applications specified in /home/yusuke/.vnc/xstartup
Log file is /home/yusuke/.vnc/grape:1.log

$ vnc2swf out.swf :1  (start vnc2swf)
vnc2swf version 0.4 - built Apr 16 2004 21:32:59
Copyright (C) 2002-2004 Yusuke Shinyama <yusuke at cs dot nyu dot edu>
- Based on VNC viewer version 3.3.7
  Copyright (C) 2002-2003 RealVNC Ltd.
  Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
  See http://www.realvnc.com for information on VNC.
VNC server supports protocol version 3.3 (viewer 3.3)
Password:  (type your password)
VNC authentication succeeded
Desktop name "yusuke's X desktop (grape:1)"
Connected to VNC server, using protocol version 3.3
VNC server default format:
  8 bits per pixel.
  True colour: max red 7 green 7 blue 3, shift red 0 green 3 blue 6
Using default colormap and visual, TrueColor, depth 16.
Using viewer's native pixel format:
  16 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
=== WriteInitMovie: Warning: file out.swf already exists, overwriting.
=== WriteInitMovie: Pid=21007, Opening file: "out.swf" for a movie size (1024,
768), frame rate 12...
=== Stop Recording
=== Start Recording (RECORD_IMMEDIATELY)
=== Stop Recording
CleanupSignalHandler called
=== WriteFinishMovie: 32 frames (2.7 sec), expanded_image: 3242296
=== WriteFinishMovie: 21250 bytes dumped into "out.swf".

     * [10]Recording a whole virtual desktop with XVnc (vncserver) and
       vnc2swf
     * [11]Recording a specific window with x11vnc and vnc2swf

   (These movies were also recorded with vnc2swf.)

Distributing SWF Files

  Important Notice

     * All bitmap images included in a SWF file are compressed with zlib.
       However, the Flash player holds all expanded images in a memory.
       So it can be inflated to a very big process! vnc2swf displays the
       total size of all images expanded for your convenience, but
       remember that the size of movie is affected not by the duration of
       the movie, but by the total size of image updated.
     * Generated SWF files need to be played in the exactly same size as
       it is recorded. This can be done by embedding the SWF file in
       HTML, specifying its exact width and height. Generally, you can
       see these values when vnc2swf starts recording. You can record
       these values and write an appropriate HTML file. But you can do
       this automatically by using swfdump included in [12]swftools
       package:

$ swfdump -e out.swf
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 WIDTH="244"
 HEIGHT="134"
 CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0
">
  <PARAM NAME="MOVIE" VALUE="out.swf">
  <PARAM NAME="PLAY" VALUE="true">
  <PARAM NAME="LOOP" VALUE="true">
  <PARAM NAME="QUALITY" VALUE="high">
  <EMBED SRC="out.swf" WIDTH="244" HEIGHT="134"
   PLAY="true" ALIGN="" LOOP="true" QUALITY="high"
   TYPE="application/x-shockwave-flash"
   PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
  </EMBED>
</OBJECT>

       Remember that if you don't specify the exact movie size, it leaves
       garbages on a screen ([13]sample).
       Related documents:
          + [14]Flash TechNote - Macromedia Flash OBJECT and EMBED tag
            syntax
          + [15]Flash TechNote - Flash OBJECT and EMBED tag attributes

Bugs

     * Slow.
     * PseudoColor is not supported.
     * vnc2swf doesn't care of Expose / GraphicExpose event.
     * The VNC server might die occasionally due to connection timeout
       when vnc2swf gets too slow.
     * It seems that Macromedia Flash Player doesn't accept any frame
       rate faster than 12.0 fps.

See Also

     * [16]recordwin(1)
     * [17]x11vnc(1)
     * [18]vncviewer(1) (from [19]RealVNC)
     * [20]vncviewer(1) (from [21]TightVNC)
     * [22]Macromedia Flash
     * [23]Ming
     * [24]GPL Flash Library (a GPLed Flash player)

Changes

  vnc2swf-0.4 (Apr. 3, 2004)

     * Be able to record an existing desktop (with x11vnc).
     * Partial recording support.
     * Rewinding support.
     * Status display.

  vnc2swf-0.3 (Oct. 25, 2003)

     * Based on VNC viewer 3.3.7.
     * ./configure support.
     * Sound file attachment support. (Contributed by Tim Jansen <tim at
       tjansen dot de>)
     * Pause/Restart recording support.
     * Another recording algorithm.

Author

   Yusuke Shinyama (yusuke @ cs dot nyu dot edu)

License

   This software is distributed under the GNU General Public Licence as
   published by the Free Software Foundation. See the file LICENCE.TXT
   for the conditions under which this software is made available. VNC
   also contains code from other sources. See the Acknowledgements
   section below, and the individual files for details of the conditions
   under which they are made available.

   Vnc2swf distribution doesn't contain zlib.

   Vnc2swf:
   Copyright (C) 2002-2003 Yusuke Shinyama. All Rights Reserved.

   VNCViewer:
   Copyright (C) 2002-2003 RealVNC Ltd.
   Copyright (C) 1994-2000 Olivetti Research Ltd/AT&T Laboratories
   Cambridge. All Rights Reserved.

Acknowledgements

   VNC was originally developed by the RealVNC team while at Olivetti
   Research Ltd / AT&T Laboratories Cambridge. It is now being maintained
   by RealVNC Ltd. See [25]http://www.realvnc.com for details.

   Vnc2swf distribution contains public domain DES software by Richard
   Outerbridge. This is:
   Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge.
   (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992.
     _________________________________________________________________


    Yusuke Shinyama

References

   1. http://www.unixuser.org/~euske/vnc2swf/index.html
   2. http://www.realvnc.com/
   3. http://www.realvnc.com/
   4. http://www.tightvnc.com/
   5. http://www.realvnc.com/winvnc.html
   6. http://www.redstonesoftware.com/vnc.html
   7. http://www.karlrunge.com/x11vnc/
   8. http://libvncserver.sourceforge.net/
   9. http://www.unixuser.org/~euske/vnc2swf/ming-input-stream.patch
  10. file://localhost/home/yusuke/work/m/vnc2swf/vnc2swf/docs/rec_vncserver.html
  11. file://localhost/home/yusuke/work/m/vnc2swf/vnc2swf/docs/rec_x11vnc.html
  12. http://www.quiss.org/swftools/
  13. file://localhost/home/yusuke/work/m/vnc2swf/vnc2swf/docs/out_x11vnc.swf
  14. http://www.macromedia.com/support/flash/ts/documents/tn4150.html
  15. http://www.macromedia.com/support/flash/ts/documents/tag_attributes.htm
  16. file://localhost/home/yusuke/work/m/vnc2swf/vnc2swf/docs/recordwin.html
  17. http://www.karlrunge.com/x11vnc/
  18. http://www.realvnc.com/man/vncviewer.html
  19. http://www.realvnc.com/
  20. http://www.tightvnc.com/vncviewer.1.html
  21. http://www.tightvnc.com/
  22. http://www.macromedia.com/software/flash/
  23. http://ming.sourceforge.net/
  24. http://www.swift-tools.net/Flash/
  25. http://www.realvnc.com/
