Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Record OS X screen activity to a Flash movie UNIX
The vnc2swf program allows you to record a VNC session to a Flash animation file. If you don't know what VNC is, learn about a free Mac implementation of it at the OSXvnc website. You can use the vnc2swf program to record a VNC session on a remote computer, but you can also use it to record actions on your own local computer. You can run vnc2swf (the recorder) on Mac OS X or Linux, and you can even get it running on Windows with the cygwin environment.

Instructions for setting it all up are at the end of this message, but here is the basic usage. To record actions from your local computer, start X11 and start the vnc server with the OSXvnc program. In a Terminal, type the command vnc2swf -nowindow -startrecording output.swf localhost:0. Now just perform the actions you want to record. When done, return to the Terminal and type control-C to end. You can play the resulting Flash file in QuickTime, or in any web browser that has the Flash plugin.

Some tips:
  1. You may be wondering why X11 is necessary. It is because vnc2swf is actually an X11 viewer for vnc sessions, and even with the -nowindow option, it still requires X11 to work. You are still able to record all of your display (Aqua programs), not just X11 programs. It should be possible to modify it so that it doesn't need X11 if you don't want a window, but I haven't looked at the source.
  2. For best performance, lower your screen resolution for the purpose of recording the file.
  3. If you want to record a VNC session that is being served from a remote computer, remove the -nowindow option.


Instructions for setting it all up:
Get OSXvnc as described above. You will also need to install Apple's X11, the Developer Tools, and the X11 Developer SDK. All of these are available on the Panther CDs (or perhaps inside your /Applications -> Installers directory if Panther came pre-installed). I have not tested with OS X versions below 10.3, but I don't see why it wouldn't work. It should also work with X11 from other sources than Apple.

You need to compile the ming library, which is for creating Flash files. Download it at this location. Users who have Fink installed can save this step by running the command fink install ming. If you want to compile it yourself, do the following steps in Terminal.app:
  1. Change to the directory where you downloaded the .tgz file and type tar xzf ming-0.2a.tgz
  2. Change to the newly-unpacked directory: cd ming-0.2a
  3. You will, unfortunately, need to modify one of the files in the ming distribution. With a text editor, open the file src/ming.c. About four lines into the file, you will see this line:
    extern int SWF_gNumCharacters;
    Modify this line to read:
    int SWF_gNumCharacters;
    That is, simply remove the extern modifier from the line. Save the file.
  4. Compile the static library with make static
  5. (You need to be root or use sudo for this step):
    $ make install-static
    $ make install-common
    
    This installs the ming library that you need (the static version is used because it compiles with fewer modification on Mac OS X than the shared version).
Now go to the vnc2swf website and download the source for the program; currently the version is 0.4.2. NOTE: There has been a precompiled version available for Mac OS X, but that did not work for me (the colors were wrong). The steps to compile and install are:

  1. Change to the directory where you downloaded the file.
  2. Type tar xzf vnc2swf-0.4.2.tar.gz
  3. Type cd vnc2swf-0.4.2
  4. Type ./configure or, if you used fink to install ming, type ./configure --with-ming=/sw
  5. Compile with the command make
  6. Install with the command (as root, or with sudo): make install
That's it!
    •    
  • Currently 2.20 / 5
  You rated: 1 / 5 (5 votes cast)
 
[114,632 views]  

Record OS X screen activity to a Flash movie | 11 comments | Create New Account
Click here to return to the 'Record OS X screen activity to a Flash movie' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Record OS X screen activity to a Flash movie
Authored by: bluehz on Oct 01, '04 12:39:15PM

vnc2swf does not seem to respect the CLI option for a different display. For example - my vnc is running as display :1 - no matter what I do to run vnc2swf - it always returns error "Can't connect to display 0:0". All other VNCViewers (Chicken of The VNC, etc) can connect and display just fine.

DOES NOT WORK FOR ME
vnc2swf -nowindow -startrecording output.swf localhost:1

Error: Can't open display: :0.0



[ Reply to This | # ]
Record OS X screen activity to a Flash movie
Authored by: rgovostes on Oct 01, '04 03:13:03PM
An output example

However, it doesn't look like it's that great - surely, an MPEG-4 would not only be smaller but less skippy? I guess this is a "poor man's Snapz Pro."

[ Reply to This | # ]
Record OS X screen activity to a Flash movie
Authored by: fuerst on Oct 01, '04 03:35:37PM

Looks like your DISPLAY environment variable is not set.

Call vnc2swf from the X11 Terminal (xterm) or set the DISPLAY environment variable in your shell to :0.0

tcsh: setenv DISPLAY :0.0
bash: export DISPLAY=:0.0



[ Reply to This | # ]
Record OS X screen activity to a Flash movie
Authored by: Echnaton on Oct 01, '04 06:09:35PM

Someone sould definitely put all this in a nice little app.



[ Reply to This | # ]
Record OS X screen activity to a Flash movie
Authored by: fxn on Oct 05, '04 01:56:21AM
There's a recordwin installed with vnc2swf that expects a window ID of somesort. Do you know whether it can record native windows?

[ Reply to This | # ]
Record OS X screen activity to a Flash movie
Authored by: andyinindy on Oct 05, '04 05:26:36PM

It works as advertised, but you must be running osxVnc. Also, it doesn't capture the cursor, which sucks. Maybe if I lower the resolution it'll see the cursor (and not produce such gigantic files)? Otherwise, very, very slick.



[ Reply to This | # ]
Record OS X screen activity to a Flash movie
Authored by: usersfirst on Oct 09, '04 12:59:27PM

Great instructions!

Check out my software for screen capture (VisualMark). http://www.usersfirst.com It is based on the RFB protocol, and works with VNC Servers.

It captures video,audio and screen for doing User Experience testing. The output is a Quicktime Movie (with multiple tracks). And the screen is recorded using Apple Animation codec.

Also, the OSXVNC cursor issue is a because of the way the Mac renders the cursor, no VNC client against OSXVNC shows the cursor currently. I would love to see this changed, and will likely start looking into it soon.

Take care!
Pete Gordon
usersfirst.com



[ Reply to This | # ]
vnc2swf without X11
Authored by: clith on May 10, '06 03:07:01PM
I edited vnc2swf to not require X11 at all and named it vnc2swf-nw. Just put it in the same dir as vnc2swf (it needs movie.py, mp3.py and all the rest) and you should be good to go.

It's probably not too much more work to really fix vnc2swf to only import the X11 Tk stuff if the "-console" option is not present, but I haven't gotten around to it yet. Actually, maybe it should also check to see if the script name ends in "-nw".

[ Reply to This | # ]

vnc2swf without X11
Authored by: clith on Nov 07, '08 07:42:32AM

In case anyone is using this, I've put it back (it got lost in a blog site reshuffle) and updated it with the latest threading and other enhancements.

Enjoy.

Reid



[ Reply to This | # ]
Record OS X screen activity to a Flash movie
Authored by: PuckDucker on Jun 23, '08 03:24:08PM

This works in Leopard too.
All you need to do is turn on ScreenSharing (which is VNC).

I just tried it and it runs fine!
2.5 hours recorded only 650MB.

One question though... any way to get sound too?

Thanks
--PD



[ Reply to This | # ]
Record OS X screen activity to a Flash movie
Authored by: minn on Nov 17, '10 10:59:13PM

as for me, I prefer to use Macvide ScreenCap (macvide.com )



[ Reply to This | # ]