I’ve got a pipeline
gst-launch-1.0 -v v4l2src device=/dev/video2 ! capsfilter caps=image/jpeg,width=1920,height=1080,framerate=30/1 ! jpegdec ! videoconvert ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! gdkpixbufoverlay name=logo ! clockoverlay name=DT halignment=left valignment=top font-desc=“Sans, 12” time-format=“%d %b %Y %H:%M:%S” ! textoverlay name=O1 halignment=left valignment=top ! tee name=t t. ! queue ! glimagesink name=sink sync=false t. ! queue leaky=1 ! x264enc tune=zerolatency ! rtph264pay ! udpsink host=224.1.1.1 auto-multicast=true port=5001 t. ! queue ! x264enc speed-preset=ultrafast tune=zerolatency byte-stream=true bitrate=4000 key-int-max=25 ! mux. pulsesrc device=alsa_input.usb-MACROSILICON_USB_Video-02.analog-stereo ! queue ! audioconvert ! audioresample ! capsfilter caps=audio/x-raw,rate=48000 ! queue ! avenc_aac ! queue ! mux. qtmux name=mux ! filesink location=test.mp4
it works and I have made dot graphs.
I run it as c-code using gst-parse-launch (and it runs perfectly.
Basic Tutarial 2 compiles and runs.
Modifing Tut2 to include the source elements (upto the tee) does nothing at all. Ive set the caps exactly as the dot graph.
setting GST_DEBUG=3 gives silence, setting it to 6 gives
0:00:00.024577695 70934 0x79a148000b70 FIXME default gstutils.c:4088:gst_element_decorate_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:08.749457226 70934 0x5ab9578ac640 WARN xvimagesink xvimagesink.c:586:gst_xv_image_sink_handle_xevents: error: Output window was closed
Error received from element sink-actual-sink-xvimage: Output window was closed
Debugging information: …/sys/xvimage/xvimagesink.c(586): gst_xv_image_sink_handle_xevents (): /GstPipeline:test-pipeline/GstAutoVideoSink:sink/GstXvImageSink:sink-actual-sink-xvimage
0:00:08.750009794 70934 0x79a148000b70 WARN xvimagesink xvimagesink.c:1190:gst_xv_image_sink_show_frame: could not output image - no window
0:00:08.750077346 70934 0x79a148000b70 WARN basesrc gstbasesrc.c:3177:gst_base_src_loop: error: Internal data stream error.
0:00:08.750098114 70934 0x79a148000b70 WARN basesrc gstbasesrc.c:3177:gst_base_src_loop: error: streaming stopped, reason error (-5)
dvr@dvrHS:~$ ./dvr
0:00:00.021552649 71493 0x797a80000b70 WARN v4l2 gstv4l2object.c:4725:gst_v4l2_object_set_crop:source:src VIDIOC_S_CROP failed
0:00:00.023208201 71493 0x797a80000b70 WARN v4l2 gstv4l2object.c:3431:gst_v4l2_object_reset_compose_region:source:src Failed to get default compose rectangle with VIDIOC_G_SELECTION: Invalid argument
0:00:00.024931904 71493 0x797a80000b70 WARN v4l2bufferpool gstv4l2bufferpool.c:852:gst_v4l2_buffer_pool_start:source:pool0:src Uncertain or not enough buffers, enabling copy threshold
0:00:00.113812151 71493 0x797a80000b70 WARN basesrc gstbasesrc.c:3177:gst_base_src_loop: error: Internal data stream error.
0:00:00.113825502 71493 0x797a80000b70 WARN basesrc gstbasesrc.c:3177:gst_base_src_loop: error: streaming stopped, reason not-linked (-1)
Debugging information: …/libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:test-pipeline/GstV4l2Src:source:
streaming stopped, reason not-linked (-1)
How do I debug??
Thanks
James
tpm
September 15, 2024, 12:03pm
2
Run with GST_DEBUG_FILE=dbg.log GST_DEBUG=*:6 ./yourapp
then grep the debug log for the first occurrence of not-linked
and check the lines before that.
The log says you closed the window, so that’s going to stop the pipeline.
Thanks. I learn!
No - the log says “the window closed” that is what I’m hunting :-}
It sounds over the top, but you really gave me an ah-ha moment. Thank you. BTW I find the GST_DEBUG_FILE gives a spinkle of stdout!
I did: ./dvr 2>&1 |tee dvr.log to capture all the output??