Gstreamer не может правильно согласовать v4l2src с Raspberry (Banana PI M2 +) - PullRequest
0 голосов
/ 01 ноября 2018

У меня проблема с v4l2, неправильно читающей канал камеры. Или, скорее всего, gstreamer неправильно запустил ctl v4l2.

Инфра:

Banana Pi M2 + Камера OV5640

modprobe ov5640
modprobe vfe_v4l2

Моя проблема: Камера отлично работает с движением, но я не могу заставить его работать с 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

Я слышу, как камера "щелкает"

1 Ответ

0 голосов
/ 03 ноября 2018

Спасибо, ребята, мне удалось заставить его работать!

video/x-raw,format=I420

Сторона просмотра (Windows):

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
...