GNOME Bugzilla – Bug 563938
Command-line option to jump for a given time
Last modified: 2012-03-28 23:43:46 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:
There is already a --seek option, but it doesn't seem to work.
There's a hidden seek option which is only used to restore sessions.
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.
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.
(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.
*** Bug 614125 has been marked as a duplicate of this bug. ***
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.
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).
Just tested --seek on a build of the master branch and it seems to work as expected
OK, closing then. For other uses, please use MPRIS.