Skip to content

gst1-rtsp-server: add package - #30795

Open
dangowrt wants to merge 2 commits into
openwrt:masterfrom
dangowrt:gst1-rtsp-server
Open

dangowrt wants to merge 2 commits into
openwrt:masterfrom
dangowrt:gst1-rtsp-server

Conversation

@dangowrt

@dangowrt dangowrt commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

📦 Package Details

Maintainer: @dangowrt
(You can find this by checking the history of the package Makefile.)

Description:

Add the RTSP server library as libgst1rtspserver, the rtspclientsink element as gst1-mod-rtspclientsink, and the test-launch example as gst1-rtsp-launch (installed as gst-rtsp-launch), which serves a gst-launch style pipeline over RTSP (gst-rtsp-launch -p 8554 "( videotestsrc ! ... ! rtph265pay name=pay0 )"). It depends on gst1-mod-rtp, gst1-mod-rtpmanager, gst1-mod-udp and gst1-mod-videoparsersbad, so a camera can be streamed over RTSP with GStreamer alone. It carries the same heap fix for do_send_data_list() in gst-rtsp-server.

Also add bugfix patches for gstreamer so it actually survives (see below)

🧪 Run Testing Details

  • OpenWrt Version: main (October 2026)
  • OpenWrt Target/Subtarget: rockchip/armv7
  • OpenWrt Device: Herospeed RV1126 IMX415 (4K H.265 from libcamera, hardware encoder)

An all-intra 4K stream at 150 Mbit/s to one TCP client crashed the server every time before the patches and stayed up in three runs of 20 s after. UDP and TCP clients play the normal 16 Mbit/s stream.


✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • 53136c8 "gst1-rtsp-server: add package": the body says the example is packaged "as gst-rtsp-launch", but the Makefile package is gst1-rtsp-launch, and only the installed binary is named gst-rtsp-launch. Use the package name, as the body already does for libgst1rtspserver and gst1-mod-rtspclientsink. The PR description has the same mix-up.

Generated by Claude Code

@dangowrt dangowrt changed the title Gst1 rtsp server gst1-rtsp-server: add package Oct 17, 2026
gst_rtsp_watch_send_messages() and
gst_rtsp_watch_write_serialized_messages() allocate their arrays on the
stack, with one entry per RTP packet and per memory of the buffer list
that an RTSP server sends over TCP. A 4K video frame is several hundred
packets, which took 150 KiB and overran the 128 KiB default thread stack
of musl, so an RTSP server using the library crashed with a segmentation
fault. Move the arrays to the heap and bump PKG_RELEASE.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
gst-rtsp-server is the GStreamer library for serving pipelines over
RTSP. Package the library as libgst1rtspserver, the rtspclientsink
element as gst1-mod-rtspclientsink, and the test-launch example as
gst1-rtsp-launch, which installs it as gst-rtsp-launch and serves a
gst-launch style pipeline that ends in a payloader named pay0.
gst1-rtsp-launch depends on the RTP, RTP manager and UDP plugins and on
the video parsers, which the payloaders and the RTP session of the
server need.

do_send_data_list() allocates one message per RTP packet of a frame on
the stack, which overruns the 128 KiB default thread stack of musl for
large 4K frames. A patch moves the array to the heap.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants