DirectX Delphi Webcam Capture Example

Post date: Nov 8, 2010 10:42:58 PM

This project is a complete example of control of web cams with DirectShow in Delphi. This code can be used as a suitable replacement for the outdated Video For Windows (VFW) Api to retreive the webcam stream as described here: Delphi Webcam Capture Example.

This delphi project was created by porting the C++ video capture "PlayCap" examples, including "PlayCapMoniker", which uses Microsoft DirectX 9.0 SDK Update (Summer 200) to Delphi.

No 3rd party components are used in this application; only two units: VSample.pas & VFrame.pas.

Features:

    • Select to view from a list of cameras.
    • Up to two Webcams can be read from at once.
    • The ability to pause and resume the video stream.
    • Support for many video formats:
      • YUY2 (YUYV, YUNV)
      • MJPG
      • I420 (YV12, IYUV)
    • Direct control of the camera properties (Zoom, Pan etc).
    • Monitoring mode "Surveillance" writes JPG files in a "Spy" subdirectory.
    • Simple real-time modifications of the current video such as crosshair.
    • Invert stream (mirror view of webcam capture).
    • Conversion to grayscale.
    • Highlight changed areas.

Author: M. Braun

Website: grizzlymotion.com

Compiled: Delphi 2007

Only Delphi source code is included in the archives.