Crash when trying to stop pipeline containing encodebin

Michael Guinzbourg mguinzbourg at gmail.com
Fri Jun 10 19:32:49 UTC 2016


Thanks a lot for the ideas. I will definitely look into GES. From the first
10 min reading I couldn't find how GES pipeline can stream the resulted
stream to the network. My application is reading live stream from the
network, making some manipulation and stream the output to the network.
I've seen GES sink has audio and video sinks for the preview but I'm
looking into muxing into mpegts container and streaming it to UDP.
Talking about time adjustment, my current pipeline is using playbin and
convert live web stream (which are items in m3u8 playlist) into the
continuous stream. And the reason for this design is the abilty of the
playbin to connect playlist items together using 'about-to-finish' signal
into endless stream. The pipeline doesn't hit EOS, it just plays it
gaplessly. If I use playbin's default video sink the quality of stream is
perfect, no gaps. I thought that if I connect videosink to my custom bin
which contains encoder, etc, then I will have perfect solution. Instead,
encoder complains about pts not coming in order. I've searched devel
discussions and found similar questions but I couldn't find any
resolutions. I really appreciate if anybody can come up with the reasonable
solution. Thanks a lot again for the help!

On 10 June 2016 at 03:26, Sebastian Dröge <sebastian at centricular.com> wrote:

> On Do, 2016-06-09 at 10:17 -0400, Michael Guinzbourg wrote:
> > Sebastian, thank you so much for your great support and patience. I
> > think I figured out the root cause of the problem here.
> > The errors are due to the fact that I'm trying to encode a stream
> > which is taken as an output from the playbin (I have custom videosink
> > connected to playbin). The source video is a playlist which plays
> > live feed from web cam. The problem is that the source plays the same
> > stream several times before it shifts to the next available time. The
> > encoder reads same stream several times and expect that we move
> > forward in time but we keep playing same chunk of data many times.
> > There's perfect output from the playbin for this stream but if I
> > direct it to the encodeer it complains with the errors like pts is
> > less then it should be. Could you please advice me how I can handle
> > this problem? So somehow I need to tell encoder - please ignore pts
> > and treat all incoming data as sequential. I couldn't find how I can
> > do it but you may have some idea for me.
>
> You will have to offset (gst_pad_set_offset() for example) the running
> time by the amount of time that was played after every track, or
> alternatively use the gapless feature of playbin (the about-to-finish
> signal), which also does that. If switching from one track to another
> involves going back to the READY state, or flushing seeks, you will
> have to solve that so the encoder sees a continuous timeline.
>
> Maybe for your use case it would be best to use GES, which allows you
> to set up a timeline of clips in some way and then render that to a
> file or to the display.
>
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-editing-services/html/
>
> It should make what you're doing here almost trivial :)
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160610/fb842359/attachment.html>


More information about the gstreamer-devel mailing list