Crash when trying to stop pipeline containing encodebin

Michael Guinzbourg mguinzbourg at gmail.com
Mon Jun 13 14:38:30 UTC 2016


I have this errors (below) and therefore no output only if I use
avenc_mpeg2video
  encoder (mpeg2 encoder from libav library)

0:00:05.380162265  6452 00000000038D2F80 ERROR                  libav:0::
Invalid pts (72) <= last (77)
0:00:05.380587743  6452 00000000038D2F80 ERROR                  libav
gstavvidenc.c:706:gst_ffmpegvidenc_handle_frame:<customMpeg2videoPreset>
avenc_mpeg2video:  failed to encode buffer

If I use exact same pipeline but use h264 encoder instead of mpeg2 - it
doesn't complain and produce perfect quality output.
I've tried to see if I can find any specific encoder settings which could
fix my problem but couldn't find anything. No matter what I try in
avenc_mpeg2video
settings give me the same error (posted above).

Answering your last message - what's the best way to check PTS and running
times of the buffers in my video-sink?
Thanks,
MG


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

> On Fr, 2016-06-10 at 15:32 -0400, Michael Guinzbourg wrote:
> > 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.
>
> Instead of rendering to a file, it should also be possible to render to
> an MPEG-TS container and send over UDP. But your live requirements
> might make GES not an ideal choice, you would have to try.
>
> In any case you would have to implement similar mechanisms for the time
> offsetting, maybe simpler. However as you use playbin's gapless
> mechanism, it should already do that for you.
>
> > 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.
>
> This should actually work, it might be that the encoder is looking at
> the actual PTS (and complains about it jumping backwards) instead of
> looking at the running time (which should be monotonically increasing).
>
> Please check the PTS and running times of the buffers that you get in
> your custom video-sink :)
>
> --
> 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/20160613/90d62b62/attachment-0001.html>


More information about the gstreamer-devel mailing list