The Windows USB video class driver

July 23, 2007 at 5:56 pm 2 comments

In 2003, Microsoft added a standard USB video class (UVC) driver, Usbvideo.sys, to Windows XP as part of SP2. It is also included in all installations of Windows Server 2003 and Vista. This means that if you have a webcam or other video device that has a USB device driver that conforms to the USB video class specification, you can just plug it into your computer and it will work! No driver installation necessary. Any video device that has the “Designed for Windows Vista” logo must have a UVC compliant driver. The really cool thing about the UVC driver is that it is not just provided on Windows, but also on Linux and Mac OS-X, so a video device that complies with this spec will work anywhere!

Documentation for the Microsoft UVC driver

A description of functions supported by Microsoft’s UVC driver (from a system administrator’s perspective). Can be found here: Availability of the USB video class driver for Windows XP

An updated driver that allows UVC-compliant cameras to render DV data from the host PC back to the device, and capture MPEG2 TS data from the device to the host PC can be downloaded here: Update for USB Video Class (UVC) driver in Windows XP Home and Professional with Service Pack 2

Specifications for USB classes, including UVC, are available on the USB Implementer’s forum at: Approved Class Specification Documents

The main programming documentation for the UVC driver is in the online MSDN library under: “Win32 and COM development – Windows Driver Kit – Device and Driver Technologies – Streaming Media – Design Guide – AVStream Minidrivers – USB Video Class Driver”. URL: Windows Driver Kit: Streaming Media Devices: USB Video Class Driver

(The above documentation is part of the Windows Driver Kit (WDK). This documentation is not included in the Windows SDK docs or in the MSDN Library for VS2005. You can download the documentation for the WDK from this page: Windows Driver Kit (WDK) Documentation)

Programming interfaces for the UVC driver

A Windows application can access the UVC driver via Microsoft DriectShow (Microsoft DirectShow 9.0), or via the kernel stream (also known as AVStream) interface, ks.sys (Windows Driver Kit: Streaming Media Devices: Kernel Streaming). Note that the MS UVC driver is a type of AVStream Minidriver. AVStream Minidrivers (Windows Driver Kit: Streaming Media Devices : AVStream Overview) conform to the Windows Driver Model (WDM) (Windows Driver Kit: Kernel-Mode Driver Architecture: Introduction to WDM), and WDM drivers are kernel mode drivers.

Next Post: Writing an application that uses the Microsoft UVC driver

I would like to write a video capture program for my Logitech web cam with a UVC driver. This camera has a button on the top that allows a user to snap a still picture, so I would like to be able to capture both video as well as still images. In addition, I want to use the bulk transfer USB mode so that my image transfer will be error free. This means I want to use UVC still image transfer method 3.

I was able to use graphedit.exe, one of the tools in the tools in the Windows driver kit, to connect the camera driver’s video pin to a video rendering filter and the still pin to another video rendering filter which allowed me to alternately capture video or still images running the filter graph in graphedit- Cool! But, I couldn’t find any properties on the still pin to tell me which still image capture method was being used.

I used both UVCView.exe and KsStudio.exe provided by the WDK for AVStream Testing and Debugging to see if I could determine what still image capture method, or what USB transfer mode was being used, but to no avail. I couldn’t figure out how to decipher the descriptors reported by UVCView, and I couldn’t find a property related to still image transfer methods in any of the KsStudio filters that are related to USB video capture.

I don’t know whether still image transfer mode is a property of the MS UVC that can be set by an application, or is “hard wired” in the MS UVC implementation, or is hard wired in the device (the camera’s) UVC driver implementation. If anyone can shed some light on these questions I would be quite appreciative!

8/7/07 Update: I’ve been told that the MS UVC driver will support still image transfer via a bulk pipe, but the firmware in the camera device needs to implement the bulk pipe, it’s not something that is determined by the application using the UVC driver.

This project to write an app that captures video from the UVC driver is on hold. My priorities have shifted elsewhere for now.

Here’s a referral code to get a $20 credit when you join Google Fi! Redeem it at

Entry filed under: DirectShow, Driver, Programming, USB, video, Windows Driver Kit. Tags: , .

How to compile AMCap Join me in preparing for Microsoft VB.NET certification

2 Comments Add your own

  • 1.  |  September 29, 2013 at 5:57 am

    Hi. I’m trying to develop a UVC device. When i plug my dev board usbvideo.sys fails to start. Is there anyway to turn on logging from usbvideo.sys? I installed checked build…. nada. any ideas?

  • 2. fcassia  |  May 14, 2014 at 7:45 pm

    for the life of me, I can´t seem to find ANY UVC video driver for WinXP64, and I need one. I know Win Server 2003 comes with UVC support, but I only have XP64. I know technically both share the same kernel. So why hasn´t anyone packaged the Server2003 UVC drivers and offered them as a .zip file for XP64 users? Sheesh…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Bird’s Bits

Computers, software & the Internet

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 41 other followers

%d bloggers like this: