Preroll and Media Preparation Failures in RTSP Pipeline with Raw Streams

Hi,

I’m facing an issue with my RTSP media server pipeline. When I use encoding and decoding elements, the RTSP server runs smoothly. However, when I try running the pipeline without encoding/decoding, it fails.

udpsrc address=239.202.107.61  port=6310 do-timestamp=true
timeout=60000000000 buffer-size=0 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)MP2T,payload=(int)33" ! rtpbin name=recv_rtp  ! watchdog timeout=300000 ! tee name=raw_stream raw_stream. ! rtpmp2tdepay2 ! tsparse set-timestamps=true ! video/mpegts,packetsize=192 ! queue ! multifilesink filename_time=true next-file=5 max-file-duration=600000000000
location=/tmp/record_repo/stream_%s.ts  tee name=out_video ! queue  ! fakesink sync=true async=false out_video. ! queue ! rtph264pay name=pay0 pt=96

Logs -


0:00:25.036789555 74247 0x7f5bc8000b70 WARN               rtspmedia rtsp-media.c:3879:wait_preroll: failed to preroll pipeline
0:00:25.036807191 74247 0x7f5bc8000b70 WARN               rtspmedia rtsp-media.c:4249:gst_rtsp_media_prepare: failed to preroll pipeline
0:00:25.039769604 74247 0x7f5bc8000b70 ERROR             rtspclient rtsp-client.c:1117:find_media: client 0x55b99168b360: can't prepare media
0:00:25.039911700 74247 0x7f5bc8000b70 ERROR             rtspclient rtsp-client.c:3412:handle_describe_request: client 0x55b99168b360: no media

If I replace rtph264pay with a raw payload type, it still doesn’t work.

Any suggestions or guidance would be appreciated!

Just fyi, in GStreamer the term “raw” is usually only used to refer to raw audio samples / video pixels as in the output of a decoder.

The pipeline above is not expected to work, you’re feeding MPEG-TS into the tee, so you would have to use an rtpmp2tpay or rtpmp2tpay2 here.

What GStreamer version is this with?

There was a fix for tsparse that made it handle 192-byte TS packets, which is only in the 1.25 releases so far.

Thanks for your reply. !
I have already applied the suggested fix for tsparse, and the payloader you recommended worked for me.
Thanks!