Close Show/hide page

Webcam Digital Video Recorder for Apollo

I’m pleased to announce the first public release of Webcam Digital Video Recorder for Apollo, which lets you record webcam video to the local file system while simultaneously playing back video from the same file (timeshifting). Unlike its browser-bound predecessor, this Apollo port does not rely on system memory to store video, but instead uses the Apollo File API to asynchronously save and load video on the fly, and can also convert its video to Macromedia Flash Video (FLV) format.

Download (requires Apollo AIR runtime, webcam)

* Updated for compatibility with the Adobe AIR runtime 1.0, 4/9/2008 *

You’ll need a relatively up-to-date PC to capture 320×240 video at ~30fps. The option to capture video at 640×480 is present, but YMMV depending on your PC. Unfortunately, the app seems to runs very slowly on the Mac (which I’m guessing is the result of alpha status of the current Mac Apollo runtime, but am not certain).

I’m not sure how much more development I’ll be doing on this, as what began as an casual experiment of a few hundred lines of code has ballooned in size as I’ve continued to add new features and test out new things on it, taking much of my free time along with it. Some other fun stuff built into the little app include:

  • A full-screen mode that overlays alpha/grayscale video over the desktop (see previous entry)
  • A “jitter mode” that alternates displaying live video with recorded video (a-la Wang Chung)
  • Save JPEG images from webcam (thanks to Thibault Imbert’s AS3 JPEG encoder)
  • Color and black & white filters and brightness control

This version is free for non-commercial use.

Usage Notes:

A About/Info Dialog Box. Displays information about open video file (filesize, duration, timestamp, etc.)
B Playback view.
C Live webcam view. Press spacebar to toggle playback and live window positions [ENTER]
D Zoom timeline in/out. [SCROLLWHEEL]
E Timeline. Click and drag across timeline area to rewind or fast-forward video. The ‘chevron’ at the midpoint of the timeline indicates current playback position in the open video file. [LEFT/RIGHT]
F Time to beginning of video.
G Time to end of video.
H New video. User can select resolutions from 80×60 to 320×240, as well as 640×480 (which is unsupported). Recording at frame rates from 30fps to much, much slower are also user-selectable. Video files must be saved to the user Desktop. (This limitation will be lifted after a future release of the Apollo runtime.)
I Open (load) video.
J Close (save) video.
K Convert to FLV. Converts native Webcam DVR .vid file to uncompressed Macromedia Flash Video (FLV) file format. File must be saved to user Desktop. (This limitation will be lifted after a future release of the Apollo runtime.)
L Record on/off. While working with a preexisting file, turning on record adds video at the end of the timeline. [R]
M Playback dial. Click and drag to adjust playback speed from -4x to +4x. Click in center of dial to toggle pause on and off. [UP/DOWN; SPACEBAR]
N Save JPEG image. File is automatically named and saved to user Desktop. [J]
O Adjust brightness
P Color filters. Cycles through seven different presets – normal, red, green, blue, grayscale, reverse grayscale, and alpha.
Q Full-screen overlay. Stretches video across the desktop; video is displayed with a gray-scale/alpha (see-through) filter. Press F or click restore icon in upper-right corner of screen to restore user interface. [F]
R ‘Jitter mode.‘ Quickly alternates main display between video playback frames and live webcam frames. Must be in record mode to be activated. [J]
S Smoothing. Toggles image smoothing of playback video.

34 Responses to “Webcam Digital Video Recorder for Apollo”

  1. Pixelmixer says:

    This is perfect. I’ve been experimenting with storage of video in different ways and it always seems to come back to RAM issues depending on how much is stored. I’m definitely going to have to look into the Apollo File API. Thats very exciting. The workaround i’ve been trying recently is to open up a direct connection with the server and offloading the recorded video to the server, then download it again later. It works, but it takes a hell of a chunk out of the server bandwidth, its a pain.
    Apollo seems to be the answer, very cool stuff.

  2. Brandon says:

    How am i supposed to use this?
    I downloaded the apollo runtime,and it was sucessfully installed.
    I try to view the .swf provided,but get an error,and nothing happens?

  3. Benjamin says:

    Could you provide an updated version for AIR. Would like to test it out.

  4. scott denton says:

    I too am wondering how to try this out. I have AIR installed and am not sure how to install this. Sure looks interesting

  5. Sanford Redlich says:

    Hi Lee, this looks really interesting! If you don’t plan to do anything with it, can you post the source somewhere and let others keep working on it? Many thanks, nice work, S.

  6. admin says:

    Sanford, sorry about the very belated reply. I plan on continuing work on this but haven’t had time. I also plan on releasing the source code for the FLV writer class I developed while writing this.

  7. Sanford Redlich says:

    Great, thanks Lee. Your work is great across the board, very interesting.

  8. Lee,

    Kevin Hoyt from Adobe pointed me to this post at the Adobe On Air Bus tour last night as it passed through St. Louis. We were wondering how you were tapping into and capturing the video stream without Flash Media Server. Are you able to get at the raw bytes from the camera somehow? Would you please be willing to pass along source or at least point me in the direction of what class/API you are using to capture the stream? Thanks!!



  9. Rohan Rehman says:

    Hey I am curious on your FLV creation method, I haven’t seen any save as flv methods in the adobe air API I am wondering are you using the ffmpeg.exe open source encoder?

    and maybe passing bytearray to it?
    what I am asking is where did you find the documentation for saving videos to flv?

    Thanks and good work.

  10. admin says:

    Thanks, Rohan.

    The FLV is created by passing a painfully constructed ByteArray to the AIR File API, frame by frame. The docs for the FLV spec are available on the Adobe website here –

    When I update this app for the most recent version of AIR (hopefully later this week), I think I should release the source code for the FLV writer class I created for this, which is actually really easy to use.


  11. Rohan Rehman says:

    Wow Thanks Lee for the prompt reply greatly appreciated, I was looking for a solution and thinking u did something similar to Sonke Rohde’s flex app.

    then I might as well wait for ur flv writer class but I am assuming ur capaturing bitmapdata of the video webcam object every given interval then converting that to bytearray which then gets thrown to ur flv class, which creates the flv file via an asynch file Stream.

    but ur solution is only capturing whats displayed on screen first in order to get the Bitmap Data.

    take a look at the ffmpeg.exe and that app I don’t use flex to make my AIR aps I use flash cs3 air update, so I don’t have the mx packages available to me.
    but how can Air invoke parameters to ffmpeg.exe.
    I know that due to security reasons the AIR api cannot execute files.

    Once again ur input on this matter will be highly appreciated.

    Thanks R.

  12. admin says:


    I agree, it doesn’t look like AIR could interface directly with FFMPEG. It looks like with that link you cited, you have to cut and paste the ‘end result’ into the command line.

    A kludge comes to mind for interfacing AIR with a regular desktop app: Have AIR save data to local storage, and have the desktop app ‘watch’ that location for changes and then respond accordingly (Like in .NET, using the FileSystemWatcher class). It would of course have to be an app you had the ability to modify the source code for and recompile…


  13. Rohan Rehman says:

    I guess artemis seems to be the main solution for the bridge to this gap…

  14. Sanford Redlich says:

    Hi Lee,

    I’m excited to try this! Unfortunately, right now all I get is a grey box. My Logitech webcam blinks a few times as if it will be activated but then just goes dark. Does it work for everyone else?

    I’m also psyched to see the source code for the FLV writer class. I curious to see how you work your magic.

    Thanks for your work on these cool projects,


  15. admin says:

    Ach! Sorry, Sanford. One theory that comes to mind – which I really hope is the right one – is that your Flash Player settings have a different video device set as the default other than the webcam. For example, on my media PC, I have a Firewire connection coming from my cable box STB, and the Flash Player had the STB set as the default “camera” even though it’s obviously not a webcam, causing any Flash using video-input to fail.

    By the way, I just posted the FLV writer class source yesterday here:


  16. Sanford Redlich says:

    Thanks, Lee. I’m still having the same problem. I can show Flash video from other sources no problem and works fine for me (recording to FMS then playing back). What I notice is that in settings I set the “allow/deny camera access” to “allow”, close it, reopen and it’s back to “deny”. Same with the setting for allowed storage, it starts at 0 and remains there when I reopen the control. Strange… I’ve got the latest Flash release, the latest AIR release, and I’m on WinXP using a Logitech UltraVision webcam. Not that I’m looking for you to debug, it’s just in case you’re interested.

    Many thanks for the source code for FLVWriter. Do you think adding sound will be difficult?



  17. Hmmm… Actually, I have the same problem in all AIR apps but I see nothing about it on the net. I reinstalled AIR and still have the same issue. In normal Flash, no problems, but in AIR the “privacy control” simply doesn’t work. Does it work for you? Best, -S

  18. admin says:

    Sanford, thanks for letting me know the problem you’re experiencing isn’t from the app itself. Maybe you’ll have better luck if you uninstall AIR and Flash Player 9, and then reinstall? …

    It’s funny, the first time I tried the ‘Settings’ dialog box using my current AIR beta runtime installation, the window was entitled ‘Security’ but was completely blank. When I closed the settings window and reopened it, everything looked normal, but there was no further reference to a ‘Security’ tab any more…

    I makes me wonder if the problem you’re having is a beta-related bug.


  19. Sanford Redlich says:

    Lee, I removed AIR and both Flash debugger versions (for Netscape and IE) from my machine. I reinstalled AIR, then the IE Flash debugger version, then the Netscape non-debugger version, and your program worked with all of them. Maybe it’s an incompatibility with the Netscape Flash debugger version? The world may never know. But your software, great as usual, works for me now.

    Many thanks for your community contributions,


  20. Lee, Love the AIR App. this is great for a project I will be starting soon. One question, when I convert a file to flv, I can’t get it to play. Any Suggestions on that.


  21. Brent Rosenquist says:

    Is there an updated version of this app for the Beta 3 version of the air runtime?

  22. admin says:

    Brent, I plan on updating it for beta 3 soon (hopefully this week).


  23. Hi,

    I am planning on developing a good web recording package, nad will release the code for free, if I can get some help in terms of source code.

    I will develop an air as well as a flex version.

    Streaming servers are out of the question for this project.

    Please help, Lee.


  24. philip says:

    is it possible to modify this to save files locally on the hard drive for preview and upload to a amazon S3?

  25. jerry norbury says:

    Nice app.

    I can see a couple of handy features:
    1) Don’t record – just play what’s seen…
    2) Allow the snapshots to be MUCH further apart – up to minutes. You could then use this application for security monitoring…
    3) Apply some form of motion detection.

    Have you released source code for this?

  26. Peder says:

    Any plans to make it possible to control video frame by frame in Adobe AIR. I would love to be able to load a video (eg. MP4) from my local hard drive, and step through it frame by frame, or extract individual frames from it.

  27. buchi says:

    youve got a nice blog here buddy, bookmark it already. ^_^

  28. Abhijeet says:

    very nice…But I was trying to stream the flv generated using Flash Media Server ( RTMP ) but was unable to do so ? Is the FLV file adhere to the standards ?

  29. admin says:

    @Abhijeet, that’s interesting, I’m not sure why that would be the case. It seems compliant, as the FLV’s run okay inside Flash Player as well as various media players. Note that the FLV’s are uncompressed, so maybe they’re choking the connection..

  30. loving it Here’s some mildly amuzing stuff I found: Thought for the day? : A crisis is when you can’t say: “let’s forget the whole thing”.

  31. Heya i’m for the first time here. I found this board and I find It really useful & it helped me out a lot. I hope to give something back and help others like you aided me.

  32. find this says:

    I just want to tell you that I am very new to blogging and honestly savored you’re blog. More than likely I’m planning to bookmark your website . You surely come with superb articles. Bless you for sharing with us your web-site.

  33. Good blog! I truly love how it is simple on my eyes and the data are well written. I’m wondering how I might be notified whenever a new post has been made. I’ve subscribed to your feed which must do the trick! Have a nice day!

Leave a Reply