best way to start playback at 01:22, playback rate 1.3x?

Dan danmbox at gmail.com
Tue Nov 12 05:00:56 PST 2013


Hi Tim, thanks for your reply.

> Out of curiosity, what bugs have you seen with seeking in PAUSED? It's a
> really common pattern, so I would expect this to work fine.

An (admittedly superficial) googling of "gst seek while paused" turned
up a "Seek failing on paused pipeline" result and one "[Bug 702697]
New: adder: Seek while paused causes deadlock".

Thanks for clearing up the self-inflicted FUD :)

> The usual way of doing this (for non-live playback) is

Re: "non-live playback": out of curiosity, I see that playbin2 has
"uri" and "current-video" writable properties -- can I change the
video on-the-fly *and* start the playback from an arbitrary position?

>  - set pipeline to PAUSED
>  - wait for ASYNC_DONE message on bus
>  - do flushing seek with start=82*GST_SECOND and rate=1.3
>    (assuming 01:22 = 1m22s and not 1h22m)
>  - set pipeline to PLAYING

Great -- that worked, thanks! And ASYNC_DONE seems to be a good time
to grab the video duration as well.

Would it have also worked to track STATE_CHANGED messages and seek
upon first seeing current_state == PAUSED?

> Might also be good to know what platform you're working on, if this is
> some embedded system or standard desktop/laptop linux, or windows/OSX
> etc..

N900 "smartphone" (Maemo = Debian Linux 2.6 / Arm) with gst 0.10.
Built-in mediaplayer has no support for playback rate change. OTOH
only gstreamer has HW acceleration, so mplayer / vlc are wasteful. I
decided to cobble up a quick&dirty Playbin2-based player in PyGST --
nothing fancy.


Best,
Dan


More information about the gstreamer-devel mailing list