Hi I have been trying to use gstreamer to send web cam image over the network. The following command fails.
./test-launch --gst-debug=3 '( v4l2src device=/dev/video2 ! image/jpeg,width=800,height=600 ! jpegparse ! rtpjpegpay name=pay0 pt=96 )'
The log is here:
stream ready at rtsp://127.0.0.1:8554/test0:00:13.123646506 9837 0x7f8c02a190 FIXME default gstutils.c:3902:gst_pad_create_stream_id_internal:<appsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id0:00:13.133301870 9837 0x7f94029540 WARN v4l2src gstv4l2src.c:560:gst_v4l2src_query:<v4l2src0> Can't give latency since framerate isn't fixated !0:00:21.022221867 9837 0x7f8c02a140 WARN v4l2bufferpool gstv4l2bufferpool.c:754:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold0:00:21.139717284 9837 0x55948cad40 FIXME rtspmedia rtsp-media.c:3581:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing0:00:21.153628638 9837 0x7f5c0145e0 FIXME default gstutils.c:3902:gst_pad_create_stream_id_internal:<appsrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id0:00:21.196879575 9837 0x7f94053f70 WARN v4l2src gstv4l2src.c:560:gst_v4l2src_query:<v4l2src1> Can't give latency since framerate isn't fixated !0:00:41.142190037 9837 0x55948cad40 WARN rtspmedia rtsp-media.c:2728:wait_preroll: failed to preroll pipeline0:00:41.142313578 9837 0x55948cad40 WARN rtspmedia rtsp-media.c:3032:gst_rtsp_media_prepare: failed to preroll pipeline0:01:10.185500026 9837 0x7f5c014540 WARN default v4l2-utils.c:189:gst_v4l2_error:<v4l2src1> error: Device '/dev/video2' is busy0:01:10.186375078 9837 0x7f5c014540 WARN default v4l2-utils.c:192:gst_v4l2_error:<v4l2src1> error: Call to S_FMT failed for MJPG @ 800x600: Device or resource busy0:01:10.188791380 9837 0x7f94053f70 WARN rtspmedia rtsp-media.c:2433:default_handle_message: 0x7f94042340: got error Device '/dev/video2' is busy (../../../gst-plugins-good-1.12.2/sys/v4l2/gstv4l2object.c(3595): gst_v4l2_object_set_format_full (): /GstPipeline:media-pipeline/GstBin:bin1/GstV4l2Src:v4l2src1:Call to S_FMT failed for MJPG @ 800x600: Device or resource busy)"is busy (../../../gst-plugins-good-1.12.2/sys/v4l2/gstv4l2object.c(3595): gst_v4l2_object_set_format_full (): /GstPipeline:media-pipeline/GstBin:bin1/GstV4l2Src:v4l2src1:Call to S_FMT failed for MJPG @ 800x600: Device or resource busy)"
The very lastline seems the culprit. If I do v4l2-compliance VIDIOC_S_FMT is FAIL.
"/data # v4l2-compliance -d /dev/video2 | grep FAIL test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL test VIDIOC_QUERYCTRL: FAIL test VIDIOC_G/S_PARM: FAIL test VIDIOC_TRY_FMT: FAIL test VIDIOC_S_FMT: FAIL"
The working computer's kernel version is:
PRO-WIFI:~/projects/gst-rtsp-server/examples$ cat /proc/versionLinux version 5.8.0-41-generic (buildd@lgw01-amd64-003) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #46~20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC 2021
The non working computer's kernel version is
/ # cat /proc/versionLinux version 4.9.103 (oe-user@oe-host) (gcc version 6.4.0 (GCC) ) #1 SMP PREEMPT Tue Feb 9 22:25:36 UTC 2021
Is this a kernel issue ? I want to narrow down more but I am stuck :( If you can shed some light I really appreciate it.