I cant restart my pipeline (rtspsrc->rtph264depay->h264parse->queue->hlssink2)

Jesper Taxbøl jesper at taxboel.dk
Wed Aug 28 13:03:02 UTC 2019


Hi,

I am having issues creating a gstreamer pipeline to record from a RTSP
server to HLS.

The idea is to have a module that can record snippets from a (tcp based)
rtsp server.

Since the recorder is intended to be able to upload hls stream it is made
so it copies the hls index file for every segment that is made. In that way
the segments can be transferred to a host and streamed from there. Thats
handled by listening for a few bus messages.

My first problem was that I had to connect the rtspsrc to my rtph264depay
when the rtspsrc actually got data. Thats handled via a callback that
connect the two pads at the right time via "pad_added_handler". That works
for the first snippet recording.

My current problem is that I have not been able to restart the module
successfully to record the second video.  I have tried alot of strategies
but not been able to come up with anything stable.

I have therefore isolated the pipeline to a small public project, and I
hope this can serve as a common reference for me to recieve advice on, and
afterwards an example for others to take inspiration from.

Its located here

https://github.com/taxfromdk/rtsp_recorder/

With the bulk of the code I need feedback on here:

https://github.com/taxfromdk/rtsp_recorder/blob/master/recorder.c

It is wrapped with a fake_rtsp_server that can be run locally instead of
connecting to a real rtsp server. It just servers a looping video. It works
against ffplay and vlc. (its serving RTSP via TCP). Instructions in the
readme file.

I would appreciate feedback to be able to bring my pipeline into a working
state.

Even just pseudo code on how you would arrange a pipeline with this goal
would be helpfull.

I am working under Arch against gstreamer 1.16


Kind regards

Jesper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190828/d7fb44dd/attachment.html>


More information about the gstreamer-devel mailing list