<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 19.04.2022 08.20,
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel-request@lists.freedesktop.org">gstreamer-devel-request@lists.freedesktop.org</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:mailman.1957.1650349243.12246.gstreamer-devel@lists.freedesktop.org">
<pre class="moz-quote-pre" wrap="">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.</pre>
</blockquote>
<p>You can make your fakesink with sync=true which should give you a
similar behavior than to "identity sync=true", at least on that
branch of the 'tee'.</p>
<p>Otherwise you should also be able to use 'clocksync' instead of
"identity sync=true", which should also do the same.<br>
This is at least how I handle 'filesrc's.</p>
<p><code>filesrc name=replay location=/home/msb/test.ts ! decodebin
! identity sync=true ! videoconvert ! ximagesink sync=0</code></p>
<p>Note that both "identity sync=true" and 'clocksync' only seem to
work on demuxed streams (which makes good sense).<br>
</p>
<blockquote type="cite"
cite="mid:mailman.1957.1650349243.12246.gstreamer-devel@lists.freedesktop.org">
<pre class="moz-quote-pre" wrap="">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?</pre>
</blockquote>
<p data-sourcepos="256:1-256:129" dir="auto">In my experience stream
duration and seek don't seem to work with <code>multifilesrc</code>.<br>
They seem to work with <code>filesrc</code> as long as the data
is demuxed.</p>
<ul data-sourcepos="258:1-259:0" dir="auto">
<li data-sourcepos="258:1-259:0">Seek and duration/position
queries work (also with <code>sync=0</code>)</li>
</ul>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-sourcepos="260:1-262:3" class="code highlight js-syntax-highlight language-plaintext monokai" id="code-29" lang="plaintext"><code><span id="LC1" class="line" lang="plaintext">filesrc name=replay location=/home/msb/test.ts ! decodebin ! identity sync=true ! videoconvert ! ximagesink sync=1</span></code></pre>
</div>
<ul data-sourcepos="264:1-265:0" dir="auto">
<li data-sourcepos="264:1-265:0">duration/position queries DON'T
work</li>
</ul>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-sourcepos="266:1-268:3" class="code highlight js-syntax-highlight language-plaintext monokai" id="code-30" lang="plaintext"><code><span id="LC1" class="line" lang="plaintext">filesrc name=replay location=/home/msb/test.ts ! fakesink</span></code></pre>
</div>
<ul data-sourcepos="270:1-271:0" dir="auto">
<li data-sourcepos="270:1-271:0">duration/position queries work</li>
</ul>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-sourcepos="272:1-274:3" class="code highlight js-syntax-highlight language-plaintext monokai" id="code-31" lang="plaintext"><code><span id="LC1" class="line" lang="plaintext">filesrc name=replay location=/home/msb/test.ts ! tsdemux ! fakesink</span></code></pre>
</div>
<ul data-sourcepos="276:1-277:0" dir="auto">
<li data-sourcepos="276:1-277:0">duration/position queries DON'T
work</li>
</ul>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-sourcepos="278:1-280:3" class="code highlight js-syntax-highlight language-plaintext monokai" id="code-32" lang="plaintext"><code><span id="LC1" class="line" lang="plaintext">multifilesrc name=replay location=/home/msb/test.ts ! tsdemux ! fakesink</span></code></pre>
</div>
<ul data-sourcepos="282:1-283:0" dir="auto">
<li data-sourcepos="282:1-283:0">Seek and duration query DON'T
work (position query works, but position increases for each
loop)</li>
</ul>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-sourcepos="284:1-286:3" class="code highlight js-syntax-highlight language-plaintext monokai" id="code-33" lang="plaintext"><code><span id="LC1" class="line" lang="plaintext">multifilesrc name=replay location=/home/msb/test.ts ! decodebin ! identity sync=true ! videoconvert ! ximagesink sync=0
</span></code></pre>
</div>
<blockquote type="cite"
cite="mid:mailman.1957.1650349243.12246.gstreamer-devel@lists.freedesktop.org">
<pre class="moz-quote-pre" wrap="">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</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”</pre>
</body>
</html>