With JNI, you can develop a bridge to a native library to capture what you want. I guess ffmpeg library is a good choice for this aim. Check the url below as an example of this: http://sourceforge.net/projects/jffmpeg/
As far as i know, you should try JMF first. IF it supports capturing for the video format you plan to use then there is no problem: you can use JMF.
But if it does not support this for that video format (You know codecs are also important) then you will need a more powerful solution and ffmpeg is a well know video processing library. I guess it will have that functionality but it is not written in Java which means you will need to bridge it or use an existing bridge for accessing it from Java.