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 563938 - Command-line option to jump for a given time
Command-line option to jump for a given time
Status: RESOLVED OBSOLETE
Product: totem
Classification: Core
Component: Movie player
unspecified
Other All
: Normal minor
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-12-10 02:29 UTC by Henrique C. Alves
Modified: 2012-03-28 23:43 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Henrique C. Alves 2008-12-10 02:29:53 UTC
Totem currently has some command-line options for controlling the playback, like --seek-fwd or --seek-bwd. I propose an option (may call it --time) that accepts a time in standard format (HH:MM:SS) to be used as the playback start time.

This is a very simple feature that will make Totem a lot more usable with subtitle editors like Gaupol or Gnome Subtitle Editor, so you can start playback at the exact point you want to preview.

Other information:
Comment 1 Philip Withnall 2008-12-10 07:31:25 UTC
There is already a --seek option, but it doesn't seem to work.
Comment 2 Bastien Nocera 2008-12-10 09:44:52 UTC
There's a hidden seek option which is only used to restore sessions.
Comment 3 Philip Withnall 2008-12-10 16:43:17 UTC
Could we just unhide that option then?

I've done some testing, and it's definitely not working for me. The call to bacon_video_widget_seek_time in totem.c:1831 doesn't seem to be doing anything, despite the stream being seekable and the seek_to being correct.
Comment 4 Henrique C. Alves 2008-12-10 21:42:48 UTC
For me (Totem 2.24.3) the --seek option works. But:
1) it doesn't seem to be expecting a time format, only an integer. I dunno what the number means then.
2) it doesn't start playing.
Comment 5 Bastien Nocera 2008-12-11 00:18:52 UTC
(In reply to comment #4)
> For me (Totem 2.24.3) the --seek option works. But:
> 1) it doesn't seem to be expecting a time format, only an integer. I dunno what
> the number means then.
> 2) it doesn't start playing.

That's expected, the option is only there to restore sessions, not provide random seeking.
Comment 6 Bastien Nocera 2010-04-07 17:37:15 UTC
*** Bug 614125 has been marked as a duplicate of this bug. ***
Comment 7 Bastien Nocera 2010-04-07 18:15:55 UTC
I'd be happy to take a patch to allow it seeking, but it would need to work both when playing, and when paused, and whether running already or not.

It should also use totem_pl_parser_parse_duration() to parse the arguments to it.

Finally, it should not clash with the position restoring that's already implemented.
Comment 8 Ilya Murav'jov 2010-04-07 19:43:40 UTC
Well, I think this issue can be marked as fixed because "--seek millisec" works well now (after applying patch for bug https://bugzilla.gnome.org/show_bug.cgi?id=614125).

E.g., I use the following command to open Totem with any video at a position:
 totem --quit; totem --seek 60000 elephantsdream.mpg
This command close ever running Totem and opens it again, at 00:01:00 (1 minute) of elephantsdream.mpg. First part is required cause --seek option cant be delivered to running Totem (because UniqueApp API used in Totem is not sufficient about sending arguments for commands).
Comment 9 Matt Rajca 2010-11-14 22:24:24 UTC
Just tested --seek on a build of the master branch and it seems to work as expected
Comment 10 Bastien Nocera 2012-03-28 23:43:46 UTC
OK, closing then. For other uses, please use MPRIS.