| Language \ Environment \ Comparison |

| Index

| The Processing 1.0 _ALPHA_ Reference is a work in progress. If you see any errors or have any comments, please write to: reas at groupc.net

Name |  | ### beginVideo()
Examples |  |
    void setup() {
      size(320, 240);
      noBackground();
      beginVideo(320, 240, 24);
    }

    void loop() {
      // Display the video image at location [0, 0]
      image(video, 0, 0);
    }
Description |  | Enables Processing to capture and play QuickTime video. It is necessary to download and install QuickTime and do a custom installation making sure the QuickTime for Java option is selected. Video can be captured from USB Cameras, IEEE 1394 Cameras or Video Cards with composite or S-video input devices connected to the computer. It is also necessary to have video driver software that translates from the proprietary specifics of a particular video source into commonly used video functions. This software can be obtained from the makers of the video hardware. Last, it needs a VDIG which is a video driver that translates from proprietary video hardware into the video functions used by Quicktime. It is included in Apple computers, but on Windows based PCs you need to get it from the video hardware maker (usually it is included with most webcams software) or try to download the free generic VDIG available at http://www.vdig.com and check if it is compatible with your video camera. Video can also be captured from QuickTime movie files located in your PC or located on the net through a URL. Video capture and playback require different parameters. beginVideo() begins capturing frames and endVideo() stops capturing. When capturing from a hardware device the beginVideo() function requires parameters to tell it the width and height in pixels of the video frame, and the frame rate to capture. If no parameters are given, the width will be 160, the height will be 120, and the fps will be 30. To stop capturing video, call endVideo().
Syntax |  |
    beginVideo()
    beginVideo(frameWidth, frameHeight, fps)
Parameters |  |
frameWidth |  | int: video width in pixels
frameHeight |  | int: video height in pixels
fps |  | int: number of frames per second
file |  | String: location of video file specified locally or with a URL
Returns |  | None
Usage |  | Application
Related |  | endVideo() videoEvent() video

| © 2003- 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea |
| Processing is an open project initiated by Ben Fry and Casey Reas |