| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The USB Webcam application enables the STM32H7 to act as a USB Video Camera device. This is an USB Video Class (UVC) device implementation example. Native USB video driver support is provided with Windows, Ubuntu and macOS. The firmware implements support for 2 formats, each offering 2 frame resolutions:
In MJPEG format, the camera is configured to capture frames in RGB565. The RGB565 frame is then fed into the STM32H7 hardware JPEG encoder for compression.
In YUY2 format, the camera is configured to capture frames in YUV 4:2:2. No compression is done by the STM32.
Load the binary onto the target STM32H747I-DISCO device.
Connect a USB cable to the "USB_OTG_HS" connector. The board can be powered either through the standard ST-LINK USB or by changing the JP6 jumper to the "HS" position.
The STM32 Webcam can be tested in the standard Windows Camera app or other applications with more control options like ffmpeg.
Note: Depending on the host software, the driver may select a different format and resolution than what is configured by default.
$ ffmpeg -f dshow -list_devices true -i dummy ## List devices $ ffmpeg -f dshow -list_options true -i video="STM32 Webcam" ## list options
ffplay -f dshow -i video="STM32 Webcam" ffplay -f dshow -video_size 640x480 -vcodec mjpeg -i video="STM32 Webcam" ffplay -f dshow -video_size 320x240 -vcodec mjpeg -i video="STM32 Webcam" ffplay -f dshow -video_size 640x480 -pixel_format yuyv422 -i video="STM32 Webcam" ffplay -f dshow -video_size 320x240 -pixel_format yuyv422 -i video="STM32 Webcam"
| Back | FazBrowse Home | New Git URL |