BrettRD / ros-gst-bridge

a bidirectional ros to gstreamer bridge and utilities for dynamic pipelines
Other
128 stars 30 forks source link

gst pipeline - rosimagesrc with udpsink #54

Closed esharet closed 1 year ago

esharet commented 1 year ago

Hi, I am trying to launch gstreamer pipeline of rosimagesrc from gazebo to udpsink and I have a very big latency (~6 sec). I am wondering if my pipeline is right:

Gst.parse_launch("""rosimagesrc ros-topic=/camera_right/image_raw ! videoconvert ! x264enc ! video/x-264,stream-format=byte-stream ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=5000 sync=false""")

when openning the stream I am using:

gst-launch-1.0 udpsrc port=5000 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink fps-update-interval=1000 sync=false

Also sometime I have a critical error: Gstreamer-CRITICAL **:04:47:37.658: gst_buffer_map_range: assertion 'GST_IS_BUFFER (buffer)' failed Maybe I an using the plugins wrong. Thank you, Ehud

esharet commented 1 year ago

Solved the problem! Gst.parse_launch("""rosimagesrc ros-topic=/camera_right/image_raw ! queue max-size-buffers=1 ! videoconvert ! x264enc ! video/x-264,stream-format=byte-stream ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=5000 sync=false""")