Cool Pi 4B 如何使用GPIO啊,树莓派的HQ Camera如何使用呢?
-
在ubuntu系统下cool pi 4b的gpio怎么样才可以操作呢,有现成的驱动接口吗,还有就是摄像头接口应该如何使用呢?之前用树莓派4B的时候有官方的picanera2包,现在cool pi上没有整个包安装了。那么应该如何使用树莓派的HQ Camera呢?
-
-
@jack_admin 这里好像只有gpio的使用方法,请问摄像头接口如何使用呢?
-
@xingzhan2012 摄像头可以使用gstreamer。默认的镜像里边已经支持。
USB摄像头预览,参数根据自己设备的情况修改:gst-launch-1.0 v4l2src device=/dev/video20 ! image/jpeg, width=1920, height=1080, framerate=25/1 ! jpegparse ! mppjpegdec ! kmssink plane-id=88
摄像头编码:
gst-launch-1.0 v4l2src device=/dev/video11 ! video/x-raw,format=NV12 ! mpph264enc ! h264parse ! filesink location=1.h264 -e
注意:默认的mipi摄像头对应的video11节点,USB摄像头对应的video20.
-
@george 谢谢解答,请问如果要使用python opencv,应该怎么做比较好呢?树莓派官方的picamera2很好用,不知cool pi 上的python接口支持怎么样,还有就是要设置摄像头的一些曝光之类的参数接口怎么样
-
@george
摄像头mjpeg格式 编码和播放同时 命令是什么样的 -
@jugg 解码和播放运行第一条命令应该就有了?
-
@zhengbicheng
编码H264和播放mjpeg 两个同时 一条命令 -
@george 试了不能用
gst-launch-1.0 v4l2src device=/dev/video11 ! image/jpeg, width=1920, height=1080, framerate=25/1 ! jpegparse ! mppjpegdec ! kmssink plane-id=88
Setting pipeline to PAUSED ...
ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: Could not get allowed GstCaps of device
Additional debug info:
../sys/kms/gstkmssink.c(1183): gst_kms_sink_start (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:
driver does not provide mode settings configuration
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
../libs/gst/base/gstbasesink.c(5878): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:
Failed to start
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...