A project to write a video device frame capture program capable of saving image frames to disk at full speed (i.e. 25 frames/second of PAL).

Download:

Navigation:

Copyright (C) 2001, Nick Andrew <nick@nick-andrew.net>
Distributed under the terms of the GNU Public Licence

The video-capture program started life as `vidcat.c', written by rasca@gmx.de and part of rasca's `w3cam' project. See http://www.rasca.de/

It was useful for once-off capturing of a frame from a video capture device, but I wanted to do multiple-frame captures which would be suitable to feed into mpeg2encode. I also wanted a program which could capture all 25 frames per second (PAL). `vidcat.c' could not do that. Although other programs exist which can capture video and audio simultaneously I needed only a lightweight video-only capture program.

While modifying this program I wrote video_device.h and video_device.c which provide an abstraction layer to controlling the video capture device. The abstraction is incomplete, but I learnt a lot about the Video4Linux API and it made video-capture.c easier to write and understand. The major advantage of using the abstraction is that it uses the double-buffering provided by all (?) video device drivers, such that the device driver is capturing the next frame while the user code is processing the previous frame.

WHAT THE PROGRAM CAN DO:

BUGS:

TO BUILD:

Just type "make", get in, sit down, shut up, hold on!

Permissions required:

Only read permission on the video device (/dev/video0 etc...)

Enjoy!
Nick Andrew <nick@nick-andrew.net>