I need to grab an H.264 stream from an RtspSrc and save it without decoding. Then, I want to Restream it using a GStreamer RTSP server. I’ve set up a pipeline with appsrc -> rtph264pay for the RTSP server, but I’m encountering an error.
ERROR rtspclient rtsp-client.c:1117:find_media: client 000001FC2A2BE600: can't prepare media
ERROR rtspclient rtsp-client.c:3412:handle_describe_request: client 000001FC2A2BE600: no media
I identified that problem was caps negotiation between appsrc and parsebin in my GStreamer pipeline. The caps were not being negotiated properly, causing the pipeline to fail.
To resolve this, I dynamically retrieved the caps from the received sample in appsink and set these caps to appsrc during media configuration. This approach resolved the issue, and the pipeline now works correctly.
This simple gist get h264 stream from rtsp and restream it without re-encoding