After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612376 - Seek command line option for gst-launch
Seek command line option for gst-launch
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Mac OS
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-10 04:18 UTC by Leo Singer
Modified: 2012-12-10 13:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gst-launch.c and accompanying Man page (2.34 KB, patch)
2010-03-10 04:18 UTC, Leo Singer
needs-work Details | Review

Description Leo Singer 2010-03-10 04:18:20 UTC
Created attachment 155701 [details] [review]
Patch for gst-launch.c and accompanying Man page

The attached patch adds seeking to the "gst-launch" tool.  If the parameter "--seek=TIME" is given, then gst-launch will attempt to seek to the given TIME in absolute nanoseconds before going from PREROLLED to PLAYING.

I've tested this using the following pipeline:
gst-launch --seek=10000000000 filesrc location="test.wav" ! wavparse ! autoaudiosink
Comment 1 Sebastian Dröge (slomo) 2010-03-13 05:18:12 UTC
Review of attachment 155701 [details] [review]:

::: tools/gst-launch.c
@@ +844,3 @@
+      PRINT (_("Attempting to SEEK ...\n"));
+      if (!gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME,
+            GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SEGMENT, GST_SEEK_TYPE_SET,

You should do a normal seek instead of a segment seek... and maybe a keyframe seek.

Other than that the patch looks good.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-15 11:08:56 UTC
Could we eventually make this a bit more powerful, like:
--seek 10:34.23289 : seek to 10 min, 34 sec and 23289 ns
--seek 10:34.23289-15:00 : play from like above until 15:00 min
Comment 3 Leo Singer 2010-04-01 00:55:51 UTC
I would like to propose adding a --seek-start and --seek-stop command.  I'll prepare a new patch.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2011-08-09 09:41:03 UTC
If we want to do this, it should be solved together with Bug #614805. I'd like to close one of the tickets.
Comment 5 Wim Taymans 2012-12-10 12:52:06 UTC
I would like to mark all of these extra features for -launch as WONTFIX.
Comment 6 Tim-Philipp Müller 2012-12-10 13:04:39 UTC
Me too. I think what would be better is some kind of scriptable gst-launch variant. That could then go into gst-devtools.
Comment 7 Wim Taymans 2012-12-10 13:12:38 UTC
Yeah, a scriptable tools would be something nice