Different seek behaviour on paused and running pipeline
Marianna Smidth Buschle
msb at qtec.com
Mon Nov 1 12:48:04 UTC 2021
For the errors:
Error : Gstreamer Critical gst_segment_do_seek assertion segment->format ==
format failed
I would recommend checking which format are you passing in the seek. Fx
I have successfully used Gst.Format.TIME
ifnotpipe.seek(rate, Gst.Format.TIME,
(Gst.SeekFlags.FLUSH | Gst.SeekFlags.ACCURATE),
Gst.SeekType.SET, pos* Gst.SECOND , seek_type, end* Gst.SECOND):
print("Seeking failed")
#Gst.debug_set_threshold_from_string("*:3", True)
returnFalse
And I don't think I ever managed to make seek working in my case unless
the pipeline was in PLAYING state.
Also from experience I have only had seeking working on demuxed data,
but that you seem to have.
And I also tend to start my seeking procedure by doing a query of
position and duration, partially because I wanted to seek to X seconds
ago instead of a absolute position.
But also because from experience: if the queries fail the seek won't work.
Lastly I can only recommend to make your pipeline as small as possible
and test.
And then increase element by element...
Like this doesnt work because data is still muxed: "filesrc name=replay
location=/home/msb/test.ts ! fakesink"
While this should work: "filesrc name=replay location=/home/msb/test.ts
! tsdemux ! fakesink"
But then for correct playback speed: "fakesink sync=true" or "filesrc
name=replay location=/home/msb/test.ts ! tsdemux ! identity sync=true !
fakesink"
On 01.11.2021 13.00, gstreamer-devel-request at lists.freedesktop.org wrote:
> Hi,
>
> When executing a flushing seek with reply true on a paused pipeline I get
> next error, but seek seems to be executed.
>
> Error : Gstreamer Critical gst_segment_do_seek assertion segment->format ==
> format failed
>
> When executing a flushing seek with reply true on running pipeline I get
> next errors, and seek is not executed
>
> Error : Gstreamer Critical gst_segment_do_seek assertion segment->format
> == format failed
> Warn : qtmux.c 1931: gst_qt_mux_send_buffer:<muxer> Failed to send buffer
> Error : qtmux.c 4214: gst_qt_mux_pad_fragment_add_buffer:<mux> Failed to
> send fragment
>
> The seek is a time based with options GST_SEEK_FLAG_FLUSH |
> GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SEGMENT
>
> Pipeline :
> filesrc ! qtdemux ! h264parse ! avdec_264 ! x264enc bitrate=1024 ! qtmux
> fragment-duration=100 ! multisocketsink
>
> I tried some settings as mentioned in gstreamer archives, but problem
> remains.
> - gst_base_src_set_format ((GstBasesrc *) filesrc , GST_FORMAT_TIME )
> - on Qtmux streamable = TRUE
> - on filesrc do-timestamp = TRUE
> - on multisocketsink sync = TRUE
>
> Used Gstreamer version 1.18.5 msdev 32 bit.
>
> What can I do, or what am I doing wrong to perform a valid seek
>
> Cheers,
> Marc
--
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211101/c3e3cc99/attachment.htm>
More information about the gstreamer-devel
mailing list