webrtcbin fake-live filesrc and seeking
Philipp B
philippb.ontour at gmail.com
Mon Apr 18 15:38:27 UTC 2022
Hello mailing list members,
I am still working on a "media (file) player over WebRTC": A file is
decoded into audio/video and transmitted over webrtcbin.
As WebRTCBin requires (AFAIK) live input, I use the usual tricks to
convert multifilesrc into a live source.
My pipeline roughly looks like:
multifilesrc do-timestamp=1 ! (..queues, decoders, encoders) !
queue ! tee ! queue ! fakesink
\- ! queue ! webrtcbin
(not sure if the ASCII art survives the mail encoding, I basically
have a fakesink as default sink linked to a tee, so that the media is played
even when no consumers are connected)
I am experimenting with "identity sync=true" at various positions,
currently I plan to have it in the audio leg only, but all that will be
finalized later.
My problem is, that I cannot seek while playback happens. Obviously,
a real live source does not support seek, so its not too surprising.
Anyways, I like to mimic the behaviour you would get when feeding
a VCR/DVD player into video in which is grabbed as a live source then.
I have no clue why seek actually fails. I could imagine, its because of
"identity sync=true" elements, but I tested without them, and its still
not working. Maybe webrtcbin does not support seeking at all?
If I send the seek to the pipe (or, in most other cases) it returns false.
(Which is somewhat confusing for me, as the documentation states
"In a completely prerolled PAUSED or PLAYING pipeline, seeking is always
guaranteed to return TRUE on a seekable media")
In case I send the seek to the filesrc directly (which I assume to be wrong),
it returns true, but the pipeline simply stops.
I tried to read about pipeline states, tried diffferent seek modes,
but I couldnt find anything that would explain my issue or change behaviour.
Any help appreciated! Is there any specific issue or underlying concept
I need to understand?
Thanks!
Philipp
More information about the gstreamer-devel
mailing list