Playback speed and playbin - do they work together?
Alexandru Palade
alexandru.palade at loopback.ro
Fri May 9 05:45:53 PDT 2014
Hi Sebastian,
I've updated my code to use two uridecodebins as you suggested. Thank you
very much, it works wonderful. The transition is seamingless. Now I
encountered another problem - when I'm trying to change the playback rate
and I send the seek_event it has a small lag. Someone on freenode suggested
that I should be using a non-flushing seek event, but when I try to do
that, my entire video stops.
The example code you mentioned has this problem as well - when modifying
the playback rate it has a small pause. I'm sure gstreamer is good enough
to just modify the playback rate without the need to seek anywhere new, but
I can't seem to find the right combination for this. Any suggestions?
I've tried the obvious with GST_SEEK_TYPE_NONE, but it doesn't appear to be
working. If I don't flush it gets stuck (I tried with avidemux, qtdemux and
matroska, they all do more or less the same, except avi that plays the
sound, but not the video) and if I flush, it works good, but I do get the
lag. I also tried the step event, but I'm not sure it's what I'm looking
for.
Any pointers highly appreciated.
Thank you,
Alex
On Thu, May 8, 2014 at 6:46 AM, Alexandru Palade <
alexandru.palade at loopback.ro> wrote:
> Thank you, Sebastian. Thanks for pointing me to gst-plugins-base/tests/examples/playback.
> It is extremely interesting, it has the exact same problem I have. If I
> tick the loop option the seek bar and position is reported correctly, but
> the image is stuck at the last frame from the previous loop. It gets
> unfreezed the moment I modify one of the options (like the playback rate or
> whatever).
>
> Seeing that you are one of the authors of that example, could you give me
> some hints on why that happens?
>
> I appreciate your time.
>
>
> On Wed, May 7, 2014 at 10:30 PM, Sebastian Dröge <
> sebastian at centricular.com> wrote:
>
>> On Mi, 2014-05-07 at 19:50 +0300, Alexandru Palade wrote:
>> > Thank you, Tim, I'll give it a shot. I plan expanding this to have the
>> > loop, but based on input to change dynamically the video and then go
>> back
>> > to the loop, so I'm kind of stuck with about-to finish, ain't I?
>>
>> Most likely it will be easier for your use case to not use playbin but
>> instead use multiple uridecodebins (one per source) that are dynamically
>> connected to a playsink or disconnected from it. That allows you to have
>> much more fine-grained control over when to switch between files, to
>> prepare the next file with an appropriate rate already, etc.
>>
>> > I'll have a look at frame stepping examples as you said, but if you
>> have a
>> > suggestion on where to start with playbin (or any other solution for
>> > looping a single file -> looping another file on a specific input ->
>> back
>> > to looping the first file and all this with dynamic playback speed).
>>
>> Take a look at gst-plugins-base/tests/examples/playback for all these
>> things btw, it implements a simple UI that allows you to seek, do frame
>> stepping, etc.
>>
>> --
>> Sebastian Dröge, Centricular Ltd - http://www.centricular.com
>> Expertise, Straight from the Source
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140509/9abe3f02/attachment-0001.html>
More information about the gstreamer-devel
mailing list