Critical warning 'segment->format == format'

amindfv at mailbox.org amindfv at mailbox.org
Wed Nov 9 20:09:29 UTC 2022


Hi, this is still an issue. Can anyone help here, or is there more helpful information I can provide?

In addition to the diff from the previous email, I've attached the full code to this email.

Thanks,
Tom

On Fri, Nov 04, 2022 at 06:05:35PM -0700, amindfv--- via gstreamer-devel wrote:
> Hello,
> I've taken - verbatim - the "Play a section of a media file" example from the Pipeline Manipulation docs in the Application Development guide, and changed it to output to a file instead of to an autovideosink (I've pasted the full diff below).
> 
> I've simply changed the graph from:
> 
>     ... -> videoscale -> autovideosink
> 
> to
> 
>     ... -> videoscale -> x24enc -> mp4mux -> filesink
> 
> This works(!) and correctly outputs a playable .mp4 file; however, it gives an ominous "CRITICAL" warning, that I've run into previously right before hitting bigger trouble:
> 
>     (pipeline-manipulation:216811): GStreamer-CRITICAL **: 17:49:27.405: gst_segment_do_seek: assertion 'segment->format == format' failed
> 
> What's going on here? What else do I need to do to correctly output to a file?
> 
> Thanks,
> Tom
> 
> ---
> 
> The diff:
> 
>     119c122
>     <   GstElement *pipeline, *src, *csp, *vs, *sink;
>     ---
>     >   GstElement *pipeline, *src, *csp, *vs, *x264enc, *mp4mux, *filesink;
>     152,154c155,165
>     <   sink = gst_element_factory_make ("autovideosink", "sink");
>     <   if (sink == NULL)
>     <     g_error ("Could not create 'autovideosink' element");
>     ---
>     >   x264enc = gst_element_factory_make("x264enc", "x264enc");
>     >   if (x264enc == NULL)
>     >     g_error ("Could not create 'x264enc' element");
>     >   mp4mux = gst_element_factory_make("mp4mux", "mp4mux");
>     >   if (mp4mux == NULL)
>     >     g_error ("Could not create 'mp4mux' element");
>     >   filesink = gst_element_factory_make("filesink", "filesink");
>     >   if (filesink == NULL)
>     >     g_error ("Could not create 'filesink' element");
>     >
>     >   g_object_set (filesink, "location", "/home/foo/bar.mp4", NULL);
>     156c167
>     <   gst_bin_add_many (GST_BIN (pipeline), src, csp, vs, sink, NULL);
>     ---
>     >   gst_bin_add_many (GST_BIN (pipeline), src, csp, vs, x264enc, mp4mux, filesink, NULL);
>     159c170
>     <   gst_element_link_many (csp, vs, sink, NULL);
>     ---
>     >   gst_element_link_many (csp, vs, x264enc, mp4mux, filesink, NULL);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pipeline-to-file.c
Type: text/x-csrc
Size: 5588 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221109/697e7f72/attachment-0001.c>


More information about the gstreamer-devel mailing list