On linux, you can use V4L2 , the video capture application programming interface for Linux. Many USB webcams, TV tuners and other devices are supported. Video4Linux is tightly integrated with the Linux kernel.
See simple examples (in the C programming language):
You can use the ioctllinux system call in your OCaml program. Take a look at these modules:
source
share