40 lines
2.0 KiB
YAML
40 lines
2.0 KiB
YAML
/image2rtsp:
|
|
ros__parameters:
|
|
|
|
# If the source is a ros2 topic (default case)
|
|
compressed: False
|
|
topic: "camera/image"
|
|
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=8/1 !
|
|
x264enc tune=zerolatency bitrate=500 key-int-max=30 !
|
|
video/x-h264, profile=baseline !
|
|
rtph264pay name=pay0 pt=96 )
|
|
|
|
# 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: "/live"
|
|
port: "8554"
|
|
local_only: False # 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
|