UVC stands for USB video class. This class is typically used by USB cameras (webcams). UVC allows an embedded device to deliver video data to a host. Most host operating system (Linux, Windows, macOS) support UVC out of the box. Video data can consists of data directly received from an image sensor (a camera), but can consists of pre-recorded video or even generated video. It supports compressed and uncompressed formats.
- YUV422 - an uncompressed format in which 2 bytes per pixel are used
- NV12 - uncompressed format, seldom used
- DigitalVideo (DV) formats SD-DV, SDL-DV, and HD-DV
- Stream formats like MPEG and MJPEG
Uncompressed video format - YUV422
YUV422 (sometimes called YUYV422) is the specific format used by the USB video device class. The format uses luminance (the brightness) and chrominance (the coloration) to display pictures. This is best explained by taking a look at the actual data, the first 8 bytes of a YUV422 frame are defined as follows:
- 1 byte luminance of the first pixel (Y)
- 1 byte chrominance (blue) of the first and second pixel (U)
- 1 byte luminance of the second pixel (Y)
- 1 byte chrominance (red) of the first and second pixel (V)
- 1 byte luminance of the third pixel (Y)
- 1 byte chrominance (blue) of the third and fourth pixel (U)
- 1 byte luminance of the fourth pixel (Y)
- 1 byte chrominance (red) of the third and fourth pixel (V)
Using 1 byte for the chrominance of two pixels allows this format to save a byte per pixel when compared to the common RGB format.
This format is supported by SEGGER's UVC implementation.
Still image capture
UVC also supports capturing individual snapshots amidst the video stream. This can potentially allow the device to transmit individual images with a higher resolution than the video's resolution.
Accessing UVC devices
Any webcam viewer can be used to show the video produced by a UVC device.
Note regarding PhotoBooth: When using PhotoBooth on macOS the image will be mirrored. This is something PhotoBooth does, at the time of writing (June 2019) it can not be disabled.
- SEGGER's UVC implementation on emUSB-Device https://www.segger.com/products/connectivity/emusb-device/add-ons/usb-video/