Raspberry pi Gstreamer可以';t在覆盆子上正确协商v4l2src(香蕉皮M2+;)

Raspberry pi Gstreamer可以';t在覆盆子上正确协商v4l2src(香蕉皮M2+;),raspberry-pi,gstreamer,gstreamer-1.0,banana-pi,Raspberry Pi,Gstreamer,Gstreamer 1.0,Banana Pi,我遇到v4l2无法正确读取摄像头提要的问题。或者更可能是gstreamer未正确启动v4l2 ctl 下文: 香蕉皮M2+ 我的问题是: 相机可以很好地配合运动,但我不能让它配合gstreamer 这是我手动编译的gstreamer: $ gst-launch-1.0 -v v4l2src ! "image/jpeg,width=160,height=120,framerate=30/1" ! rtpjpegpay ! udpsink host=192.168.1.2 port=5001 Se

我遇到v4l2无法正确读取摄像头提要的问题。或者更可能是gstreamer未正确启动v4l2 ctl

下文:

香蕉皮M2+

我的问题是: 相机可以很好地配合运动,但我不能让它配合gstreamer

这是我手动编译的gstreamer:

$ gst-launch-1.0 -v v4l2src ! "image/jpeg,width=160,height=120,framerate=30/1" ! rtpjpegpay ! udpsink host=192.168.1.2 port=5001
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3064): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.003571242
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...






ben@bananapim2plus:~/src/gst-plugins-good/tests/examples/v4l2$ ./v4l2src-renegotiate
Setting resolution to '320x240'
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:src: Device '/dev/video0' failed during initialization
Additional debug info:
gstv4l2object.c(3785): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:src:
Call to S_FMT failed for YUYV @ 320x240: Operation not permitted
ben@bananapim2plus:~/src/gst-plugins-good/tests/examples/v4l2$ ./camctrl
ERROR: from element /GstPipeline:camera/GstV4l2Src:v4l2src0: Device '/dev/video0' failed during initialization
Additional debug info:
gstv4l2object.c(3785): gst_v4l2_object_set_format_full (): /GstPipeline:camera/GstV4l2Src:v4l2src0:
Call to S_FMT failed for YUYV @ 640x480: Operation not permitted

我能听到相机“咔嗒”的声音,谢谢你们,我成功地让它工作了

video/x-raw,format=I420
查看器端(窗口):

摄像机侧(香蕉):


v4l2 ctl--list formats ext
是否列出您试图设置的格式?您需要设置相机支持的格式索引。@FlorianZwoch:让我们尝试使用格式索引UYVY,根据您的命令
gst-launch-1.0-v v4l2src的输出,它是受支持的!视频/x-raw,格式=UYVY,帧速率=10/1,宽度=1280,高度=720!FileLink location=raw.yuv
启动,我让它运行几分钟,CTRL-C->filesize是0字节,正如Florian提到的,似乎您的相机不允许您以想要设置的格式或分辨率进行拍摄。尝试以原始RGB格式捕获。@vk_gst以下是我的格式:我尝试将一些与video/x-raw-yuv或video/x-raw-RGB相结合,但未成功使用cap-v4l2(来自avafinger),我可以确定并拍摄高达2592x1936像素的快照。使用的像素格式为:1:[0x32315559]“YU12”(平面YUV 420)
video/x-raw,format=I420
gst-launch-1.0 -v udpsrc port=5001 caps = "application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)MP4V-ES\,\ profile-level-id\=\(string\)1\,\ config\=\(string\)000001b001000001b58913000001000000012000c48d8800cd3204709443000001b24c61766335362e312e30\,\ payload\=\(int\)96\,\ ssrc\=\(uint\)2873740600\,\ timestamp-offset\=\(uint\)391825150\,\ seqnum-offset\=\(uint\)2980" ! rtpmp4vdepay ! avdec_mpeg4 ! autovideosink
/usr/bin/gst-launch-1.0 -v v4l2src ! video/x-raw,format=I420,width=800,height=600,framerate=15/1 ! avenc_mpeg4 ! rtpmp4vpay config-interval=3 ! udpsink host=192.168.1.2 port=5001