I have been looking all over for an answer to this, but i can't... i am trying to just create a simple TV viewer using an overlay. but everytime: if (-1 == ioctl(fd, VIDIOCCAPTURE, (int *)&b)) { perror("capture"); close(fd); exit(1);} is called i get: "capture: Invalid argument" but if i run "xawtv" first, i do not get the error, so i obviously not setting something right. without all the extra code, here is what i am doing: vidName="/dev/video"; fd=open(vidName,O_RDWR) ioctl(fd,VIDIOCGCAP,&capability) vc.channel=0; strcpy(vc.name,"NTSC"); vc.tuners=0; vc.flags=VIDEO_VC_AUDIO ; vc.type = VIDEO_TYPE_TV; vc.norm=VIDEO_MODE_NTSC; ioctl(fd, VIDIOCSCHAN, &vc); vw.x=0; vw.y=0; vw.width=640; vw.height=480; vw.chromakey=1; vcl[0].x=0; vcl[0].y=0; vcl[0].width=640; vcl[0].height=480; vw.clips=vcl; vw.clipcount=0; ioctl(fd,VIDIOCSWIN,&vw); vt.tuner=0; strcpy(vt.name,"tuner"); vt.rangelow=55250; vt.rangehigh=799250; vt.flags=VIDEO_TUNER_NTSC; vt.mode=VIDEO_MODE_NTSC; vt.signal=32678; ioctl(fd, VIDIOCSTUNER, &vt); unsigned long longfreq=(freq*16)/1000; ioctl(fd, VIDIOCSFREQ, &longfreq); int b=1; ioctl(fd, VIDIOCCAPTURE, &b); thanks for any help, -- adam grossman aglist (at) metashadow.com