refactored gstreamer pipeline

This commit is contained in:
Dzmitry Maladzenkau committed 2025-05-31 17:27:49 +02:00
1 parent 9d7c6a10c3
commit c812ce9ada
5 files changed
+173 -97

No files matched your search

+34 -17
View File
@@ -1,22 +1,39 @@
/image2rtsp:
ros__parameters:
# If camera serves as a source
camera: False
source: "v4l2src device=/dev/video0"
# If the source is a ros2 topic (default case)
compressed: True
topic: "/image_raw/compressed"
compressed: False
topic: "color/image_raw"
default_pipeline: |
( appsrc name=imagesrc do-timestamp=true min-latency=0 max-latency=0 max-bytes=1000 is-live=true !
videoconvert !
videoscale !
video/x-raw, framerate=30/1, width=640, height=480 !
x264enc tune=zerolatency bitrate=500 key-int-max=30 !
video/x-h264, profile=baseline !
rtph264pay name=pay0 pt=96 )
# General setup
mountpoint: "/back"
bitrate: "500"
framerate: "30"
caps_1: "video/x-raw, framerate ="
caps_2: "/1,width=640,height=480"
port: "8554"
local_only: True # True = rtsp://127.0.0.1:portAndMountpoint (The stream is accessible only from the local machine)
# False = rtsp://0.0.0.0:portAndMountpoint (The stream is accessible from the outside)
# For example, to access the stream running on the machine with IP = 192.168.20.20,
# use rtsp://192.186.20.20:portAndMountpoint
# Notice: The framerate setting does not affect the RTSP stream — it entirely depends on the ros2 topic frequency.
# It is included in the pipeline and code for structural reasons. You can likely remove it from the pipeline without impacting the package's behavior.
# If camera serves as a source
camera: False
camera_pipeline: |
( v4l2src device=/dev/video0 !
videoconvert !
videoscale !
video/x-raw, framerate=30/1, width=640, height=480 !
x264enc tune=zerolatency bitrate=500 key-int-max=30 !
video/x-h264, profile=baseline !
rtph264pay name=pay0 pt=96 )
# Notice: Here the framerate might be set to the camera framerate, otherwise "503 Service Unavailable" error will appear.
# RTSP setup
mountpoint: "/back"
port: "8554"
local_only: True # True = rtsp://127.0.0.1:portAndMountpoint (The stream is accessible only from the local machine)
# False = rtsp://0.0.0.0:portAndMountpoint (The stream is accessible from the outside)
# For example, to access the stream running on the machine with IP = 192.168.20.20,
# use rtsp://192.186.20.20:portAndMountpoint