How to capture live Video frames from webcam
Hello everybody,
#include <>
main()
{
fd=open("/dev/dsp",O_RDONLY);
fd2=open("/dev/dsp",O_WRONLY);
while(1)
{
nread= read(fd,buf,500);
write(fd2,buf,nread);
}
}
it is the program for reading from microphone and to listen to it through speakers.
i would like to know whether we can capture the video from a webcam in a similar manner.
What may be the file format of that image?
What may be the file format of the sound captured by the above program?
|