Gst 1.22 gst-play.c looping a video
Arnaud Loonstra
arnaud at sphaero.org
Wed Dec 6 15:34:47 UTC 2023
Hi all,
I'm trying to use gst-play.c from
https://github.com/GStreamer/gstreamer/blob/1.22/subprojects/gst-plugins-base/tools/gst-play.c
as a base for looping a video. I am using gstreamer 1.22 on a Linux
x86_64 Debian trixie machine.
At first I thought I'd use the play_about_to_finish callback to issue a
play_do_seek to 0. However that didn't really work.
https://github.com/GStreamer/gstreamer/blob/a89f33c86c8ba6731a8177721de90b6e07dbc25c/subprojects/gst-plugins-base/tools/gst-play.c#L819
Second attempt was to use GST_MESSAGE_EOS to issue the `play_do_seek
(play, 0, play->rate, play->trick_mode);`
https://github.com/GStreamer/gstreamer/blob/a89f33c86c8ba6731a8177721de90b6e07dbc25c/subprojects/gst-plugins-base/tools/gst-play.c#L451
This works a bit better but still not very reliable. Some files just
freeze at the end and if it does work it sometimes freezes randomly.
Stracktrace points to play_timeout being handled.
But what would be the best approach to loop the playing video preferably
gapless/seamless?
Any pointers appreciated.
Rg,
Arnaud
More information about the gstreamer-devel
mailing list