Forums - V4l2 External Usb Camera on Qualcomm RB5

3 posts / 0 new
Last post
V4l2 External Usb Camera on Qualcomm RB5
fikrat.gasimov
Join Date: 16 Mar 22
Posts: 3
Posted: Thu, 2022-03-24 09:29

Good day,

I have External Usb camera (v4l2) attached on Qualcomm RB5. After deep investigation, i could not find how to create Gstreamer Server pipeline for v42 Usb Camera and simultanously, to open it with OpenCV VideoCapture on Client side for Preprocessing.  

Thanks. 

Best Regards,

Fikrat Gasimov

  • Up0
  • Down0
mita.rathod
Join Date: 17 Sep 18
Posts: 59
Posted: Sat, 2022-04-16 23:22

Hello Customer,

Follow these steps to set up UVC USB camera:
Coonect USB camera to device with USB3.0 COM and use the following command to check the USB camera device ID.
# adb shell ls -l /dev/video*
without plugging in USB camera

Now plugging USB camera and run the command again
# adb shell ls -l /dev/video*

1. Check yavta application whether it exists on device

#adb shell ls -l /sbin/yavta
#adb shell ls -l /usr/bin/
 

2. Manually pust it to the folder /sbin/, if you do not find yavta.

#adb push yavta /sbin/
#adb shell chmod 777 /sbin/yavta

3. Use #yavta  -help to echo paramteres meaning

For example:
-f => support YUYV / MJPEG
-F => setting saved files path
-c => setting duration time
-t => setting preview frame ratio

4. Use the following command to preview and dump
#yavta -f YUYV -s 1280x960 -t 1/30 -c18000 /dev/video2 -F/data/yuv
check camera launches successfully with generated file /data/yuv
#ls -l /data/yuv

5.now pull yuv and get the file and use YUV player to display YUV file
#adb pull /data/yuv

  • Up0
  • Down0
Mayur
Join Date: 26 Feb 21
Posts: 16
Posted: Fri, 2022-06-24 08:08

Hi fikrat.gasimov, 

You can run the following Gstreamer command to start TCP server on RB5 

gst-launch-1.0 v4l2src device="/dev/video1" ! image/jpeg,framerate=30/1,width=1280,height=720 ! tcpserversink port=8900 host=192.168.55.12

 change device="your/camera/videoId", host="rb5 ip address"

you can capture frame  in openCV by 

frame = cv2.VideoCapture("tcp://192.168.55.12:8900 ") //tcp://rb5ip:port
 
 
 

Thanks & regards, 

Mayur

 

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.