flvdemux working .. sometimes

Peter Maersk-Moller pmaersk at gmail.com
Mon May 30 13:12:35 UTC 2016


Hi.

I'm playing a rtmp stream passed through nginx with the rtmp module added.
My problem is that I can't play the stream reliably. The pipeline sometimes
fail 3 out of 4 times with the messages:

Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstFlvDemux:demux: Delayed
linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads ():
/GstPipeline:pipeline0/GstFlvDemux:demux:
failed delayed linking some pad of GstFlvDemux named demux to some pad of
GstQueue named queue2

The playing pipeline is this:

QUEUE="queue max-size-time=0 max-size-bytes=0 max-size-buffers=0"
LOCATION=rtmp://192.168.3.100/live/mykey3

gst-launch-1.0 -v                        \
        rtmpsrc location=$LOCATION      !\
        $QUEUE                          !\
        flvdemux name=demux             !\
        $QUEUE                          !\
        aacparse                        !\
        avdec_aac                       !\
        autoaudiosink sync=0 demux.     !\
        $QUEUE                          !\
        h264parse                       !\
        avdec_h264                      !\
        $QUEUE                          !\
        videoconvert                    !\
        autovideosink sync=0

Is there a way to make the pipeline play the stream reliably (play every
time)?
Enabling debugging suggest the demuxer get filled whatever that means.
Debug:

0:00:06.298664848 28766      0x2573b70 WARN                 default
grammar.y:506:gst_parse_no_more_pads:<demux> warning: Delayed linking
failed.
0:00:06.298728893 28766      0x2573b70 WARN                 default
grammar.y:506:gst_parse_no_more_pads:<demux> warning: failed delayed
linking some pad of GstFlvDemux named demux to some pad of GstQueue named
queue3
0:00:06.298792450 28766      0x2573b70 INFO        GST_ERROR_SYSTEM
gstelement.c:1879:gst_element_message_full:<demux> posting message: Delayed
linking failed.
0:00:06.298904128 28766      0x2573b70 INFO        GST_ERROR_SYSTEM
gstelement.c:1902:gst_element_message_full:<demux> posted warning message:
Delayed linking failed.
WARNING: from element /GstPipeline:pipeline0/GstFlvDemux:demux: Delayed
linking failed.

The stream is generated with the following pipeline:

VIDSRC="v4l2src ! video/x-raw,width=320,height=240"
AUDSRC="alsasrc"
gst-launch-1.0 -v \
        $AUDSRC                                         !\
        'audio/x-raw,channels=2,rate=44100,layout=interleaved,format=S16LE'
!\
        audioconvert                                    !\
        queue                                           !\
        faac bitrate=128000                             !\
        aacparse                                        !\
        queue ! muxer.                                   \
        $VIDSRC                                         !\
        queue                                           !\
        videoconvert                                    !\
        x264enc speed-preset=1 tune=zerolatency         !\
        h264parse                                       !\
        queue                                           !\
        flvmux name=muxer streamable=true               !\
        queue                                           !\
        rtmpsink location="rtmp://127.0.0.1/live/mykey3 app=live
flashVer=FME/3.0%20(compatible;%20FMSc%201.0) swfUrl=rtmp://127.0.0.1/live"
blocksize=4096 sync=0

The nginx rtmp relay is setup with the following config so absolutely
nothing special. All it does is that it forward any rtmp stream sent to it
as it is sent. That means that if you send using this location:

rtmp://127.0.0.1/live/mykey3

then you can retrieve it as rtmp://127.0.0.1/live/mykey3 using gstreamers
rtmpsrc module:

rtmp {
        server {
                listen 1935;
                chunk_size 4096;
                application live {
                        live on;
                        record off;
                        allow publish 127.0.0.1;
                        allow publish 193.88.237.0/24;
                        allow publish 192.168.3.0/24;
                        allow publish 192.168.10.0/24;
                        deny publish all;
                }
        }
}

Any suggestion on how to make a pipeline playing the rtmp stream every
single time?

Second question or perhaps a hint of the problem. When the pipeline plays
the stream, audio frames starts flowing to the autoaudiosink at approx the
same time the video start to appear, but while the video is only 200-300 ms
behind, the audio is between 2-6 seconds behind. And here we have no sync
what so ever on the audio and video sinks. If sync is enabled on video,
video will lag not a few hundred ms but several seconds, if it plays at
all.

Best regards
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160530/bf38058f/attachment.html>


More information about the gstreamer-devel mailing list