| David Fischer's Java Programming Examples: Capture Video from Logitech QuickCam Pro 3000 Camera with Java JMF |
Homepage (in German Language) |
get list of all media devices ... >>> capture video device = vfw:Logitech USB Video Camera:0 >>> capture video format = size=176x144, encoding=yuv, maxdatalength=38016 >>> capture audio device = DirectSoundCapture >>> capture audio format = linear, 16000.0 hz, 8-bit, mono, unsigned ... list completed. starting capturing ... ... capturing done datasink: ... end of stream reached. |
Configuration Hint: perhaps you need a small change of the capture device. On my XP system
I had to run again the JMF Registry Editor with "Detect Capture Devices" to make the
"DirectSoundCapture" device available. You must set JMF_HOME to the JMF installation directory
before you start the JMF Registry Editor. The Device "vfw:Logitech USB Video Camera" is still
not here but can be replaced by the "Microsoft WDM Image Capture":

String defaultVideoDeviceName = "Microsoft WDM Image Capture"; String defaultAudioDeviceName = "DirectSoundCapture"; String defaultVideoFormatString = "size=176x144, encoding=yuv, maxdatalength=38016"; String defaultAudioFormatString = "linear, 16000.0 hz, 8-bit, mono, unsigned"; |
get list of all media devices ... device 0: vfw:Logitech USB Video Camera:0 >>> capture video device = vfw:Logitech USB Video Camera:0 - format: size=640x480, encoding=rgb, maxdatalength=921600 - format: size=160x120, encoding=rgb, maxdatalength=57600 - format: size=176x144, encoding=rgb, maxdatalength=76032 - format: size=320x240, encoding=rgb, maxdatalength=230400 - format: size=352x288, encoding=rgb, maxdatalength=304128 - format: size=160x120, encoding=yuv, maxdatalength=28800 >>> capture video format = size=176x144, encoding=yuv, maxdatalength=38016 - format: size=176x144, encoding=yuv, maxdatalength=38016 - format: size=320x240, encoding=yuv, maxdatalength=115200 - format: size=352x288, encoding=yuv, maxdatalength=152064 - format: size=640x480, encoding=yuv, maxdatalength=460800 device 1: vfw:Microsoft WDM Image Capture (Win32):1 - format: size=640x480, encoding=yuv, maxdatalength=460800 - format: size=160x120, encoding=rgb, maxdatalength=57600 - format: size=176x144, encoding=rgb, maxdatalength=76032 - format: size=320x240, encoding=rgb, maxdatalength=230400 - format: size=352x288, encoding=rgb, maxdatalength=304128 - format: size=640x480, encoding=rgb, maxdatalength=921600 - format: size=160x120, encoding=yuv, maxdatalength=28800 - format: size=176x144, encoding=yuv, maxdatalength=38016 - format: size=320x240, encoding=yuv, maxdatalength=115200 - format: size=352x288, encoding=yuv, maxdatalength=152064 device 2: DirectSoundCapture >>> capture audio device = DirectSoundCapture - format: linear, 48000.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 48000.0 hz, 16-bit, mono, littleendian, signed - format: linear, 48000.0 hz, 8-bit, stereo, unsigned - format: linear, 48000.0 hz, 8-bit, mono, unsigned - format: linear, 44100.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 44100.0 hz, 16-bit, mono, littleendian, signed - format: linear, 44100.0 hz, 8-bit, stereo, unsigned - format: linear, 44100.0 hz, 8-bit, mono, unsigned - format: linear, 32000.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 32000.0 hz, 16-bit, mono, littleendian, signed - format: linear, 32000.0 hz, 8-bit, stereo, unsigned - format: linear, 32000.0 hz, 8-bit, mono, unsigned - format: linear, 22050.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 22050.0 hz, 16-bit, mono, littleendian, signed - format: linear, 22050.0 hz, 8-bit, stereo, unsigned - format: linear, 22050.0 hz, 8-bit, mono, unsigned - format: linear, 16000.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 16000.0 hz, 16-bit, mono, littleendian, signed - format: linear, 16000.0 hz, 8-bit, stereo, unsigned >>> capture audio format = linear, 16000.0 hz, 8-bit, mono, unsigned - format: linear, 16000.0 hz, 8-bit, mono, unsigned - format: linear, 11025.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 11025.0 hz, 16-bit, mono, littleendian, signed - format: linear, 11025.0 hz, 8-bit, stereo, unsigned - format: linear, 11025.0 hz, 8-bit, mono, unsigned - format: linear, 8000.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 8000.0 hz, 16-bit, mono, littleendian, signed - format: linear, 8000.0 hz, 8-bit, stereo, unsigned - format: linear, 8000.0 hz, 8-bit, mono, unsigned device 3: JavaSound audio capture - format: linear, 44100.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 44100.0 hz, 16-bit, mono, littleendian, signed - format: linear, 22050.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 22050.0 hz, 16-bit, mono, littleendian, signed - format: linear, 11025.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 11025.0 hz, 16-bit, mono, littleendian, signed - format: linear, 8000.0 hz, 16-bit, stereo, littleendian, signed - format: linear, 8000.0 hz, 16-bit, mono, littleendian, signed ... list completed. |
43: private static String defaultVideoDeviceName = "Logitech USB Video Camera"; 44: private static String defaultAudioDeviceName = "DirectSoundCapture"; 45: private static String defaultVideoFormatString = "size=176x144, encoding=yuv, maxdatalength=38016"; 46: private static String defaultAudioFormatString = "linear, 16000.0 hz, 8-bit, mono, unsigned"; |
get list of all media devices ... >>> capture video device = vfw:Logitech USB Video Camera:0 >>> capture video format = size=176x144, encoding=yuv, maxdatalength=38016 >>> capture audio device = DirectSoundCapture >>> capture audio format = linear, 16000.0 hz, 8-bit, mono, unsigned ... list completed. starting capturing ... ... capturing done datasink: ... end of stream reached. |
About the Author
|
....and just for fun...
Undocumented and unsupported example to turn your logitech camera to a real, http webcam with a permanet
video stream. You must be an expert in java to make any modifications on the code. The documentation is
incomplete. Try this example only if you have already some (successful) experiences with JMF.
AT THE MOMENT I HAVE NO TIME TO GIVE ANY SUPPORT FOR IT. You may download it here. You must
modify the file "StartServer.bat". Then try to access it with the browser on http://127.0.0.1:81.
Take into consideration that if you do any code modifications you must compile the applet with JDK 1.1 (not with a higher version, because
this is a compatibility bug of sun), but that you should compile the server (all other classes) with Java SDK 1.3 or 1.4.
See the webcam in action.
![]() |
![]() |
....for java developers...
Here is a really thin, easy and powerfull Java web server - made to extend existing java programms with a web interface.
The source is not free, but the usage is free as long you don't redistribute it:
http://www.d-fischer.com:83/. Documentation in English and download available.