GStreamer Pipeline Works But After Some Seconds fdsink Gives "Ilegal Seek" Error

Elliot Killick elliotkillick at zohomail.eu
Sat Jan 9 11:58:32 UTC 2021


The following gst-launch commands are a working demonstration of how one
may pass video from a webcam through a shell pipe and then display it.
And it does work, for about 20-50 seconds until fdsink gives a "Could
not perform seek on resource" error for reason of "Illegal seek".

$ gst-launch-1.0 -q v4l2src !
video/x-raw,width=1920,height=1080,framerate=30/1 ! avimux ! fdsink |
gst-launch-1.0 -v fdsrc ! avidemux ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
video/x-raw, format=(string)I420, framerate=(fraction)30/1,
width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstFdSink:fdsink0: Could not
perform seek on resource.
Additional debug info:
gstfdsink.c(574): gst_fd_sink_event ():
/GstPipeline:pipeline0/GstFdSink:fdsink0:
Error while seeking on file descriptor 1: Illegal seek
Got EOS from element "pipeline0".
Execution ended after 0:00:23.036333491
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

I noticed one way to "fix" it was by setting the GST_DEBUG environment
variable to its highest state (9) causing lots of output to the terminal
and I guess slowing things down enough so the shell pipe going into
fdsrc never empties. However, the side effect of this is that the video,
while it doesn't stop playing, is extremely choppy with a poor frame rate.

Another attempt I made was using the dd command inbetween the two
GStreamer commands like this:
| dd status=none iflag=fullblock bs=9999999 |
to try and buffer standard input. However, it was to no avail because I
still got an "Illegal seek" error after some time.

Does anybody have any idea of what a solution to this could be or is
this something that needs to be worked out in the GStreamer code?

Thank you,
Elliot



More information about the gstreamer-devel mailing list