# AI USB camera Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/ai-usb-camera.html](https://docs.qualcomm.com/doc/80-70022-50/topic/ai-usb-camera.html) The **gst-ai-usb-camera-app** streams video from a USB webcam connected to the Qualcomm EVK. This webcam should be accessible as a /dev/videoX device. Additionally, you can perform object detection and preview the results. You can choose to preview the output on Wayland, or encode to a video file, or live stream through the RTSP. Alternatively, you can set `enable-object-detection `as *True* to perform object detection. The following figures show a pipeline, which processes the input from the USB camera to generate various outputs. For more information about the plugins used in these pipelines, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70022-50/topic/ai-usb-camera.html#ai-usb-camera__section_jjq_bln_42c). Figure : gst-ai-usb-single-camera-app pipeline Live camera preview on display v4l2src qtivtransform capsfilter waylandsink Video encoding v4l2src qtivtransform capsfilter v4l2h264enc h264parse mp4mux filesink h264parse qtirtspbin Video encoding and RTSP streaming v4l2src qtivtransform capsfilter v4l2h264enc Qualcomm Open source Figure : gst-ai-usb-single-camera-app pipeline with object detection v4l2src qtimlvtransform qtimlvconverter qtimltflite/qtimlsnpe/qtimlqnn qtimlpostprocess qtivcomposer waylandsink capsfilter tee v4l2src qtimlvtransform qtimlvconverter qtimltflite/qtimlsnpe/qtimlqnn qtimlpostprocess qtivcomposer filesink capsfilter tee v4l2src qtimlvtransform qtimlvconverter qtimltflite/qtimlsnpe/qtimlqnn qtimlpostprocess qtivcomposer RTSP sink capsfilter tee Qualcomm Open source ## Sample model and label files | Runtime | Model files | Label files | | --- | --- | --- | | Qualcomm Neural Processing SDK | | | | LiteRT | | | | Qualcomm AI Engine direct | *yolov8\_det\_quantized.bin* | | | | | | | | | | ## Run the application on the target device The sample application uses the /etc/configs/config-usb-camera-app.json file to read the input parameters. Ensure that you use the config JSON file to run the application. To create your own config JSON file, use [config-usb-camera-app.json](https://git.codelinaro.org/clo/le/platform/vendor/qcom-opensource/gst-plugins-qti-oss/-/blob/imsdk.lnx.2.0.0.r2-rel/gst-sample-apps/gst-ai-usb-camera-app/config-usb-camera-app.json?ref_type=heads) as a reference. 1. Ensure to connect the USB webcam to the target device and complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70022-50/topic/download-model-and-label-files.html). Note: If the USB camera isn't detected on the target device, Download the required firmware. See [Download PCIe to USB controller firmware](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-8/pcie.html#download-pcie-to-usb-controller-firmware). Note: For USB camera input, set the `video-format`, `resolution`, and `framerate` parameters in the configuration file to match the capabilities of the camera. To check the camera capabilities, see [Configure USB camera](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-8/usb.html#configure-usb-camera). 2. Update the config JSON file based on the model, input stream, and other properties. For more information, see [Config JSON field description](https://docs.qualcomm.com/doc/80-70022-50/topic/ai-usb-camera.html#ai-usb-camera__section_qjx_hqq_32c). 3. Use the following format of the /etc/configs/config-usb-camera-app.json file: { "width": "", "height": "", "framerate": "", "video-format": "", "output": "", "ip-address":"", "port":"", "enable-object-detection": "", "file-path": "", "ml-framework": "", "yolo-model-type": "", "model": "", "labels": "