MacDevCenter    
 Published on MacDevCenter (http://www.macdevcenter.com/)
 http://www.macdevcenter.com/pub/a/mac/2003/07/01/isight.html
 See this if you're having trouble printing code examples


Making Movies with the Apple iSight

by Derrick Story, author of the Digital Video Pocket Guide
07/01/2003

By now you've probably iChatted with all your buddies and are wondering what you can do next with the iSight. As I explained in the weblog, Want to Do More with the iSight than Chat?, this little "cheese grater" of a videocam packs a lot of potential beyond serving as a simple webcam.

The iSight is a well-designed autofocus camera with a fast f-2.8 lens that focuses from 50mm to infinity. But what makes it so powerful is that its FireWire cable plugs into years of Apple QuickTime development lurking within your Mac. In my view, QuickTime is an underrated technology. And I think lots of people are going to discover QuickTime's versatility thanks to this $149 gem of a camera.

In this article I'll show you how to use the iSight with some very inexpensive QuickTime-based software to create top-notch video presentations. You can use these techniques to author something as simple as a video postcard to share with friends and family, or as sophisticated as an interview using three-point lighting -- the same set up that pros use for their projects.

Getting Your Tools Together

Up until now, tools for digital media projects were often expensive and had a sizeable learning curve to master. But thanks to the iSight's simplicity, you can pull together the tool set for these projects quite inexpensively. Here's my recommend list:

For many of your projects you can use the iSight attached to your Mac as you would for web conferencing. But for interviews and movie making you'll want to attach the camera to a tripod. I recommend a "quick release" model that makes it easy to attach and remove the iSight.

Use the iSight adapter with the flat plate on the bottom. You can push the tripod mounting post up through the opening and secure it with a tripod adapter bushing that can be purchased at any photo store for less than a buck. Now the camera can be securely attached to the tripod for filming (see Figure 1b).

Photo of iSight camera. Photo of the iSight mount.

Figure 1a and 1b. By using the supplied adapter that comes with the iSight, you can attach the camera to the quick-release post of a tripod for easy mounting.

Since the iSight has a good automatic light balancing system built in, you can use just about any continuous lighting source to illuminate your subject. If you don't have a video light already, a quick trip to the hardware store for a couple of shop lights will do the trick nicely.

The main thing to remember is not to mix your light sources. Stick with daylight (from window) or tungsten if you can. But if you mix the two, or add fluorescent lighting to the scene, the iSight (or any other camcorder) will have difficulty correctly balancing all those different sources.

Getting the correct lighting.
Figure 2. A visit to your local hardware store can produce decent lighting for your iSight movies. Get the brightest light you can. Then, if possible, hop over to the photo store for a reflective umbrella. This accessory will diffuse the light for more pleasant skin tones.

Pro Tip: For those of you shunning artificial lighting, one of the most common problems in natural light shooting is backlighting. If you want to know how to identify and deal with it, download this PDF on how to cope with backlighting from the Digital Video Pocket Guide.

The next thing you should consider for interviews, demonstrations, and training videos is an external microphone plugged into the Griffin iMic adapter. As good as the microphone is that's built in to the iSight, it's designed to be close to the sound source, such as when it's attached to your computer, and you're talking into it.

But when using the iSight as a video camera, it will be too far away from your subject to serve as a decent audio input device. Plug a mic directly into your Mac instead (via the iMic) and QuickTime will synchronize the audio and video for you, resulting in much clearer dialog.

Troubleshooting tip -- If your audio is out of sync with your video, make sure that iChat AV is turned off and not running. Then try using a different microphone other than the one built in to the iSight, such as an external mic or the one in your laptop. Also, check your CPU load in QuickTime Broadcaster. If you're pegged at 100 percent, bad things can happen.

Digital Video Pocket Guide

Related Reading

Digital Video Pocket Guide
By Derrick Story

Capturing Video with QuickTime Broadcaster

QuickTime Broadcaster is amazing software that you can download for free. It enables you to capture audio and video with the iSight, encode it with any QuickTime codec (including Mpeg-4), and either stream it to another computer via the Internet, or save it as a movie file to your hard drive.

Screen shot.
Figure 3. By revealing details in QuickTime Broadcaster, you can configure your audio, video, and network settings.

After you download this application, connect your iSight, turn off iChat AV, and launch Broadcaster. First thing you'll want to do is hit the "Show Details" button to reveal the settings dialog. Go to the Network tab and set it up as in Figure 3. The most important settings are "Transmission," which should be set to "Manual Unicast," and "Address," which should be set to 127.0.0.1. You can leave the audio and video post settings alone. By entering these settings, you're telling Broadcaster to save to hard disc instead of transmitting over the Internet.

Now go to the Video tab and choose your codec and enter your parameters. This is where your CPU processing power will make a big difference. The settings in Figure 4 were about as far as I could push a 667 MHz PowerBook G4. With this configuration my CPU load during recording averaged around 70 percent, enabling clean, synchronized audio and video capture. Broadcaster indicates your CPU load while recording, which makes it very easy to monitor the situation. I noticed if I pushed the limits too much, by increasing dimensions (to 640 x 480), frame rate (to 30 fps), or data rate (to the neighborhood of 2000 kbits/sec), my CPU load would begin to max out on the 667 TiBook. But the settings in Figure 4 kept things well within reasonable limits. You can push the parameter that's most important to you, such as frame size, but remember to give on others, such as frame rate.

Screen shot.
Figure 4. My ideal video settings for a 667 MHz PowerBook.

Recording direct to disc is resource intensive. This became apparent when I plugged the iSight into a 1 GHz TiBook and noticed that the CPU load dropped in half with the same numbers in Figure 4. That means I could increase frame dimensions, frame rate, or data rate without maxing out my processor. For most TiBooks and newer iBooks, the Figure 4 settings should be a good starting point. If you have a faster machine, you can push the limits accordingly.

As for the compressor itself, I had very good luck with Mpeg-4 video. You can use other compressors such as Sorenson Video or Motion Jpeg, but I didn't see any real advantages in CPU usage, and certainly not in image quality. If you plan to share your videos on the web at a later date, you might decide to use a different codec when you export. As an example, I used the new Sorenson 3 video codec for the movie sample in Figure 9. For the Figure 10 sample, however, I used the older Sorenson 1 codec because it works better on older machines with weaker processors. All of these codecs are available in QuickTime Pro, and it's a matter of finding the best one to suit your needs.

Audio is a little less complicated, and certainly easier on the processor. I prefer to use an external mic whenever possible. So I plug the Griffin iMic into a USB port, then a microphone into it. I then double-check my Sound preference panel to make sure that Input is set for the iMic (at the highest input value possible), then go to Broadcaster and choose the iMic for my audio source.

This set up enables me to position the microphone separately from the iSight camera, resulting in cleaner dialog. Generally speaking, 22.050 kHz at 16 bits will suffice as shown in Figure 5.

Screen shot.
Figure 5. The audio settings for QuickTime Broadcaster.

Now all you have to do is position the camera, set up the lights, and you're ready to roll. Once everything is ready, hit the "Broadcast" button and wait a few seconds for the application to get going, then you'll see the "Broadcasting" label across the preview screen. You can monitor your CPU load in the data readout below. Hit the stop button to end the scene, then go to your Movies folder to retrieve and view the file. You've now captured your first scene with iSight!

Screen shot.
Figure 6. Once you hit the Stop button, Broadcaster will save your scene to hard disc. It places it in your Movies folder by default, but you can change the directory in the preferences settings.

Editing Your Movie in QuickTime Pro

Once you have your raw clip, or collection of clips, you should tidy things up in QuickTime Pro before presenting to your public. Much has been written about the things you can do in Apple's versatile digital media tool set. But today I'm going to focus on three important editing functions that you'll need for this project.

Trim -- Enables you to choose a section of video to save, and everything else is trimmed away. To use this function, move the triangles on the bottom of the scrubber bar to both ends of the content you want to save, then select Edit -> Trim. After trimming use Save As (self-contained movie) to give the clip a new name and to preserve your original file.

Screen shot.
Figure 7. Move bottom triangles to both ends of the content you want to save, then select Trim.

Copy and Add -- Allows you to select content from one clip and add it to another. Use the bottom triangles to select the content you want to copy, then go to the movie you want to add the clip to, move the top triangle to where you want to insert the clip, then go to Edit -> Add. Don't use paste or you'll replace the content instead of adding to it. For example, in Figure 7 the new content will be added to the beginning of the Water Wheel.mov file because that's where the top pointer is located.

Get Movie Properties -- You can choose a track from the left-side drop down menu (such as sound) and a property for that track (such as volume) from the right-side drop down, then make property adjustments to that track. In Figure 8, I'm adjusting the volume of the sound track. This control is located under Movie -> Get Movie Properties.

Screen shot.
Figure 8. You can adjust various properties of both audio and video tracks in the Get Movie Properties panel.

After you've trimmed your clips and are ready to assemble them, I recommend you open a New Player in QuickTime (File -> New Player), then add your clips from start to finish. For best results, make sure all of the clips are the same dimensions and frame rate. You can check these parameters in Get Movie Properties.

Use AppleScript to Add Titles

You can create opening and closing titles for your movies many ways, but the method I'm going to share today uses an AppleScript to convert your QuickTime annotations to rolling credits.

Click to view Quick Time movie.
Figure 9. AppleScript makes easy titles. This iSight movie has opening and closing titles along with two audio tracks. It was exported using Sorenson 3 video and MPEG-4 audio codecs (click image to view movie).

First you enter an annotation such as "Full Name" using the Get Movie Property command I mentioned a bit earlier. In the left-side drop down menu choose "Movie," and in the right-side drop down menu select "Annotations." Now click the "Add" button and select "Full Name" from the list. Enter the title of your movie in the Data field and hit the "Add" button. The text you entered now appears in the top title bar of the QuickTime player. Cool!

But it gets better. Download this Annotations to Rolling Credits AppleScript that's included in the QuickTime collection. Make sure your movie with the Full Name annotation is open, then double-click the script to launch the Script Editor. Click the Run button, and AppleScript will create a temporary file that's a rolling credit for your movie.

Next, the trick is to select all the content from your existing movie (using the "Select All" command), copy it, then "Add" it to the end of the rolling credit. Don't do it the other way around and try to add the credit to the movie, even though that seems more logical. Once you've added the movie to the end of the credit, select "Save As" and be sure to click the "Make movie self-contained" button.

You can create ending credits the same way. Then just "Add" them to the end of your movie. Remember, if the credits seem too long, you can trim them before adding them to your movie. The more data you enter in annotations, the longer the credits roll. I suggest sticking with just one title at the beginning, and another for the end.

iMovie Makes a Great Soundtrack Editor

A nice finishing touch once you have your basic movie together is to add a soft musical soundtrack for a little background ambiance. I like to use iMovie 3 to prepare these tracks, then export them to QuickTime and add them to my existing movie.

Click to view movie.
Figure 10. The music track sounds great, but the dialogue has some artifacts. This is caused by the original audio being recorded at too low of a volume, then having to be "bumped up" in postproduction. The audio codec makes matters even worse. Be sure to record your dialogue at a decent volume. This clip was exported using the older Sorenson codec for video with Q-Design for audio (click image to view movie).

The main reason I like to use iMovie for the music track is because I can read my iTunes library directly in iMovie, select the song I want to use, trim it so it is the same length as my QuickTime movie, then add a nice fade at the end of the track for that professional touch.

Then all I have to do is use the Export command, select to QuickTime, use the Expert Settings, and choose the same audio codec that you used for your existing movie.

iMovie will generate a QuickTime file that is the specified length and has a nice fade at the end. I then "Select All," copy, and add to my existing movie. Remember, wherever the top pointer is on the scrubber bar, that's where the soundtrack will be inserted. Usually it's best to add it to the beginning of the movie.

Note -- The guitar music on those sample movies was provided by a friend of a friend named Ward Ashman. His self-produced CD is called Soul Tribes.

What If I Want to do All My Work in iMovie?

Generally speaking, if you want to work in iMovie, you should shoot your footage with a DV camcorder. It's easier to capture and upload vast amounts of footage at full frame size with the camcorder and iMovie working as a team.

You can, however, export your previously recorded iSight movies as "DV Streams" then place them in the Media folder in your iMovie project directory. iMovie will then let you add them to your shelf and incorporate them into the project just like regular clips from your DV cam. The catch is that iMovie likes 720 x 480 pixel frame dimensions, and chances are your existing iSight movies are a smaller size.

There's also some quality loss when you convert from QuickTime movie files to DV streams, then export back to QuickTime movies. But if you discover you need the function of iMovie, the slight quality loss might be worth the tradeoff of having all of iMovie's slick tools at your fingertips, as long as your frame dimensions are big enough.

You can also choose to record directly to DV using the iSight by selecting one of the DV codecs in the Compressor setting. Then, as mentioned before, drop those files in the Media folder in iMovie. But you should to record at 720 x 480, which might not be feasible with your computer.

Downsides to Using iSight as a Video Cam

You can do a lot of recording with the iSight, but it does have its limitations. For one thing, it doesn't have a zoom lens, so you have to physically move the camera closer or farther from the subject to get the proper composition.

Speaking of the three-element iSight lens, it has a 54.3° viewing angle, which is a little wider than a 50mm lens in 35mm film photography. This means you can position the lens fairly close to the subject without too much distortion. But it's still not as flattering as using a "longer" lens, such as an 85mm lens (in 35mm photography) with a more narrow 28° viewing angle that's a little better for tight portraits.

Also, you can eat up hard disc space pretty fast if you get carried away with your movie making. A separate FireWire drive is nice to have so you can offload you files once you've captured them.

Related Reading

Here are some additional resources to help you with your iSight movie making:

Top Ten Digital Video Tricks -- Great hints for capturing beautiful video with DV camcorders and the iSight.

Sound is Half the Picture -- Want to learn more about recording sound on your Mac OS X computer? This article give you lots of great tips.

Digital Still Cameras for QuickTime Movies -- Here's a helpful tutorial that will expand your QuickTime Pro editing skills.

The Digital Video Pocket Guide is the perfect companion for making movies with your new iSight webcam. Lots of video making tips and tricks.

You can adjust exposure and color balance in QuickTime Broadcaster by clicking on the "Options" button for video source, but these controls aren't as convenient to use as those found on most camcorders and digital cameras.

If you only have one FireWire Port on your Mac, then iSight occupies it, so you cannot plug in an additional FireWire drive without using some sort of adapter.

Final Thoughts

So the iSight may not be the perfect movie-making tool, but it certainly is a fun one. I really like playing with this stylish camera and have made some good flicks with it.

There's so much more you can do with these QuickTime-based tools, but what I've outlined today should keep you busy for awhile. I recommend that you start with simple movies that only run a few minutes long. As you get comfortable with your tools, you can push the boundaries a bit.

But the bottom line is that you can use the iSight for so much more than chatting. It's quite a decent video camera that you can press into service for fun or business. And in the next installment, I'll show you how to use your iSight to make animation flicks using iStopMotion.

Until then, have lots of fun and make some good stuff.

Derrick Story is the digital media evangelist for O'Reilly. His experience includes more than 20 years as a photojournalist, managing editor for O'Reilly Network, and a speaker for IDG, PMA, and Santa Fe Workshops. He is the author of Digital Photography Hacks, Digital Photography Pocket Guide, 3rd Ed., and his latest, The Digital Photography Companion.


Return to the Mac DevCenter.


Copyright © 2007 O'Reilly Media, Inc.