jyyf 发表于 2024-8-13 16:27:37

3568接USB摄像头问题求助,只能抓拍320x240分辨率的图片

本帖最后由 jyyf 于 2024-8-13 16:29 编辑

烦请大佬帮忙看看这个是什么情况?

按照说明书用v4l2进行抓拍,只有320*240这个分辨率能抓拍成功。
用其他分辨率就会卡住,命令执行不下去。下面是执行失败的记录

# 412-ct1 --list-devicesrkisp-statistics (platform:rkisp):
/dev/video7
/dev/video8
rkisp mainpath (platform:rkisp-vir0):
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/video4
/dev/video5
/dev/video6
YW500 (usb-fd880000.usb-1):
      /dev/video9
      /dev/video10

# v4l2-ctl --list-formats-ext -d /dev/video9
ioctl: VIDIOC_ENUM_FMT
      Type: Video Capture

      : 'MJPG' (Motion-JPEG, compressed)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 2048x1536
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 2592x1944
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1600x1200
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1280x800
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1024x768
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 800x600
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 160x120
                        Interval: Discrete 0.033s (30.000 fps)
      : 'YUYV' (YUYV 4:2:2)
                Size: Discrete 1600x1200
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 800x600
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 640x480
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.067s (15.000 fps)
#
# v4l2-ctl -V -d /dev/video9
Format Video Capture:
      Width/Height      : 1920/1080
      Pixel Format      : 'MJPG' (Motion-JPEG)
      Field             : None
      Bytes per Line    : 0
      Size Image      : 2073600
      Colorspace      : sRGB
      Transfer Function : Default (maps to sRGB)
      YCbCr/HSV Encoding: Default (maps to ITU-R 601)
      Quantization      : Default (maps to Full Range)
      Flags             :
# v4l2-ctl -v width=640,height=480,pixelformat=YUYV -d /dev/video
9
# v4l2-ctl -V -d /dev/video9
Format Video Capture:
      Width/Height      : 640/480
      Pixel Format      : 'YUYV' (YUYV 4:2:2)
      Field             : None
      Bytes per Line    : 1280
      Size Image      : 614400
      Colorspace      : sRGB
      Transfer Function : Default (maps to sRGB)
      YCbCr/HSV Encoding: Default (maps to ITU-R 601)
      Quantization      : Default (maps to Limited Range)
      Flags             :
# gst-launch-1.0 v4l2src device=/dev/video9 num-buffers=1 !videoc
onvert !video/x-raw,format=NV12,width=640,height=480 ! mppjpegenc !filesink loca
tion=pic.jpg
Setting pipeline to PAUSED ...
mpp: mpp_rt: NOT found ion allocator
mpp: mpp_rt: found drm allocator
mpp: mpp_info: mpp version: unknown mpp version for missing VCS info
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
mpp: mpp_enc: MPP_ENC_SET_RC_CFG bps 576000 fps g                                                                                                             op 15




jyyf 发表于 2024-8-15 11:19:35

# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 !videoco
nvert !video/x-raw,format=NV12,width=1600,height=1200 ! mppjpegenc !filesink loc
ation=pic.jpg
Setting pipeline to PAUSED ...
mpp: mpp_rt: NOT found ion allocator
mpp: mpp_rt: found drm allocator
mpp: mpp_info: mpp version: 49f29006 author: Jeffy Chen    2021-08-04 : Add mmap flag detection
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
mpp: mpp_enc: MPP_ENC_SET_RC_CFG bps 3600000 fps gop 15
libv4l2: error turning on stream: Input/output error
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
gstv4l2src.c(656): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.050571791
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
页: [1]
查看完整版本: 3568接USB摄像头问题求助,只能抓拍320x240分辨率的图片