gst-rtsp-server looping over mp4 filesrc
Alan
dartagnan64b at gmail.com
Mon Jun 28 02:27:56 UTC 2021
Hello,
I would like to use gst-rtsp-server to loop over an mp4 file indefinitely.
I've started from test-launch.c example and my pipeline is:
filesrc location=input.mp4 ! qtdemux ! queue ! rtph264pay pt=96 name=pay0
I am able to add gst_pad_add_probe() on qtdemux video_0 src pad and then
from there intercept GST_EVENT_EOS and toss it away and then call
gst_element_seek(pipeline, ...GST_SEEK_FLAG_FLUSH)...I do get mp4 to loop
playback, however, pipeline running time resets to 0. This causes dropped
frames at client end and a pause.
When I try to force pipeline running time to last PTS time via
gst_message_new_reset_time() or simply override outgoing PTS/DTS for each
GstBuffer to always increase, somehow the playback pauses and rtsp server
doesn't send out packets. I think rtpbin gets in a weird state (hard to
tell from GST_DEDBUG=5 log level).
Is this the wrong approach to achieve looping over the same file content in
rtsp server? If not, any suggestions on making this approach work?
Alternatively, I could try appsrc/appsink but I'd like to solve this
problem at a high level and with the given rtsp api.
Thanks a bunch!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210627/ffc193d4/attachment.htm>
More information about the gstreamer-devel
mailing list