From 4904df248c6cb8cd6384553290154fedcf129774 Mon Sep 17 00:00:00 2001 From: Dzmitry Maladzenkau Date: Fri, 3 Jan 2025 18:16:14 +0100 Subject: [PATCH 1/2] Note about compressed messages support on dev --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 68a3a54..70dee26 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ This project is a migration from ROS1 to ROS2. The original code was developed b ## image2rtsp This project enables the conversion of a selected ROS2 topic of type `sensor_msgs::msg::Image` into an `RTSP` stream, with an anticipated delay of approximately 0,3-0,4s. It also supports usb camera as a direct source. The generated stream can be utilized for various purposes such as remote control, object detection tasks, monitoring and more. -Currently supported `sensor_msgs::msg::Image` formats: "**rgb8**", "**rgba8**", "**rgb16**", "**rgba16**", "**bgr8**", "**bgra8**", "**bgr16**", "**bgra16**", "**mono8**", "**mono16**", "**yuv422_yuy2**". +Currently supported `sensor_msgs::msg::Image` formats: "**rgb8**", "**rgba8**", "**rgb16**", "**rgba16**", "**bgr8**", "**bgra8**", "**bgr16**", "**bgra16**", "**mono8**", "**mono16**", "**yuv422_yuy2**". +Support for **Compressed images** is added on the *dev* branch. + (if you need some specific unsupported format, create an issue and i will try to add it as soon as possible) The development is being carried out on Ubuntu 20.04 with ROS2 Foxy, also tested on Ubuntu 22.04 with ROS2 Humble. @@ -82,5 +84,3 @@ cd ~/ros2_ws/ source install/setup.bash ros2 launch image2rtsp rtsp.launch.py ``` -## To Do -- Add compressed images formats (jpeg, png) From 047f42084c9506a68f2eb24aa63819cd437bddcb Mon Sep 17 00:00:00 2001 From: Dzmitry Maladzenkau <151655734+maladzenkau@users.noreply.github.com> Date: Tue, 4 Feb 2025 17:02:08 +0100 Subject: [PATCH 2/2] Update image2rtsp.cpp Fixed glued pipeline elements. https://github.com/maladzenkau/image2rtsp/issues/8 --- src/image2rtsp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image2rtsp.cpp b/src/image2rtsp.cpp index d78c3a7..822d2a6 100644 --- a/src/image2rtsp.cpp +++ b/src/image2rtsp.cpp @@ -39,7 +39,7 @@ Image2rtsp::Image2rtsp() : Node("image2rtsp"){ rtsp_server = rtsp_server_create(port, local_only); appsrc = NULL; // Setup the pipeline - pipeline_tail = "key-int-max=30 ! video/x-h264, profile=baseline ! rtph264pay name=pay0 pt=96 )"; + pipeline_tail = " key-int-max=30 ! video/x-h264, profile=baseline ! rtph264pay name=pay0 pt=96 )"; if (camera == false){ pipeline_head = "( appsrc name=imagesrc do-timestamp=true min-latency=0 max-latency=0 max-bytes=1000 is-live=true ! videoconvert ! videoscale ! "; pipeline = pipeline_head + caps_1 + framerate + caps_2 + " ! x264enc tune=zerolatency bitrate=" + bitrate + pipeline_tail;