GNOME Bugzilla – Bug 612376
Seek command line option for gst-launch
Last modified: 2012-12-10 13:12:38 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
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.
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
I would like to propose adding a --seek-start and --seek-stop command. I'll prepare a new patch.
If we want to do this, it should be solved together with Bug #614805. I'd like to close one of the tickets.
I would like to mark all of these extra features for -launch as WONTFIX.
Me too. I think what would be better is some kind of scriptable gst-launch variant. That could then go into gst-devtools.
Yeah, a scriptable tools would be something nice