GStreamer ingestion of rtmp stream

578 views
Skip to first unread message

R S Nikhil Krishna

unread,
Jul 21, 2021, 5:32:34 PM7/21/21
to Ant Media Server
Hi

When trying to use gstreamer to ingest the rtmp stream generated from Ant media server, it throws the following error

```
gst-launch-1.0 rtmpsrc location=<rtmp url> ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstRTMPSrc:rtmpsrc0: Could not read from resource.
Additional debug info:
gstrtmpsrc.c(419): gst_rtmp_src_create (): /GstPipeline:pipeline0/GstRTMPSrc:rtmpsrc0:
Failed to read any data from stream, check your URL
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
```

However, the same RTMP URL can be read from ffmpeg and from VLC. Can anyone help understand why the RTMP feeds generated by the Ant Media server are not ingestable by GStreamer?

R S Nikhil Krishna

unread,
Aug 10, 2021, 12:56:32 AM8/10/21
to Ant Media Server
Just closing this thread

To fix this issue, we had to add `live=1` at the end of the URI while ingesting into gstreamer, it appears to be an issue with the underlying librtmp that gstreamer (and older ffmpegs) rely on.

Ex:
gst-launch-1.0 rtmpsrc location="<rtmp url> live=1" ! fakesink
Reply all
Reply to author
Forward
0 new messages