Navigate between bookmarks with hotkeys

Feature requests for VLC.
jiglerul
New Cone
New Cone
Posts: 4
Joined: 16 Feb 2013 13:40

Navigate between bookmarks with hotkeys

Postby jiglerul » 16 Feb 2013 14:04

Hi everyone, first post on this forum.
I searched a bit and it seems I'm not the first one to want this feature.

Basically I have a long video with bookmarks to various sections.
I want to jump to next or previous bookmark with a simple keyboard shortcut.

As far as I know currently this is not possible in VLC. Please feel free to prove me wrong!
Maybe there is some plugin/extension?

If not:
Since I'm a software developer by trade and have some free time I would not back down from implementing the feature myself.
However, before digging too deep, can someone in the know estimate if this is do-able by Lua scripting or I need to change the VLC itself?
Or maybe I should look into plugin coding? Is there a section on how to get started on that specifically? Maybe I've missed it?

If the answer is a cold hard: just checkout from git and start reading, fool! - then please just say it :D

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Navigate between bookmarks with hotkeys

Postby Jean-Baptiste Kempf » 16 Feb 2013 17:07

You mean by bookmarks or by chapter?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Navigate between bookmarks with hotkeys

Postby mederi » 16 Feb 2013 17:16

Hi! I have already written several Lua extension scripts for VLC, so I can tell you what is available in Lua extensions regarding your bookmark project:
* simple custom dialog box (Windows and Linux, not OS X) with button widgets;
* perform jump to a desired time position

Code: Select all

vlc.var.set(vlc.object.input(), "time", 60)
All you need is to find out, whether it is possible to read a table of bookmarks using Lua script. There are several objects available in scripts as you can read in README.txt document:

Code: Select all

Objects ------- object.input(): Get the current input object. object.playlist(): Get the playlist object. object.libvlc(): Get the libvlc object. object.aout(): Get the audio output object. object.vout(): Get the video output object.
If bookmarks are part of one of these objects, then you need to find out an appropriate name of variable of the object. As I do not know C++, I do not know how to check these objects for all available variables we could use in our scripts. Perhaps your findings could help also other scriptwriters.

Code: Select all

vlc.var.get( object, name )
Scripting VLC in lua

--- EDIT ---
* it is also possible to make hotkeys using callback in VLC2.0.x:

Code: Select all

vlc.var.add_callback(vlc.object.libvlc(), "key-pressed", key_press)

jiglerul
New Cone
New Cone
Posts: 4
Joined: 16 Feb 2013 13:40

Re: Navigate between bookmarks with hotkeys

Postby jiglerul » 16 Feb 2013 21:15

@Jean-Baptiste Kempf: yes, I mean by bookmarks. If chapter shortcuts are available, that's great. But then I'm still not out of the woods because I have to add chapters manually to my videos. Adding bookmarks is simpler as far as I know.

By the way, adding bookmarks seems buggy to me. The Ctrl+B dialog is empty until I press create (while bookmarks still exist for my video). Am I doing something wrong?

@mederi: thanks for the examples. However I'm still stuck on very basic things like actually running the scripts from \lua\intf (e.g. there is a hotkeys.kua that I can modify - but how do I tell VLC to use it?)

So far, I've looked into building the code and on Windows it's a bit ugly. I've installed VirtualBox and Ubuntu and maybe tomorrow I'll do a cross-compilation. Then I might start reading the code :)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Navigate between bookmarks with hotkeys

Postby Jean-Baptiste Kempf » 17 Feb 2013 02:44

F2 F3 and al should do that.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Navigate between bookmarks with hotkeys

Postby mederi » 17 Feb 2013 13:20

@Jean-Baptiste Kempf:
There are following hotkeys predefined in VLC preferences:

Code: Select all

Set playlist bookmark 1 CTRL+F1 ... Set playlist bookmark 10 CTRL+F10 Play playlist bookmark 1 F1 ... Play playlist bookmark 10 F10
I do not remember they ever worked for me. F1 is help.

@jiglerul:
Probably it is not possible to write custom interface scripts (\lua\intf\) or at least I do not know how to use it. But sure you can write extensions(\lua\extensions\) that you just need to start them manually in VLC menu: View.
As for the CTRL+B bookmark dialog, you probably mean opening of previously saved playlist with your bookmarks. You are right that the dialog is empty until you press "Create" button. Suddenly all bookmars appear in the dialog. If I check saved playlist file, then I can see several bookmark entries in the playlist. Each following entry also contains all previous bookmarks. I do not know what should be correct: one entry containing all bookmarks or many entries containing only one appropriate bookmark.
You probably would like to write a plugin instead of Lua script. Something like srpos >> http://code.google.com/p/vlc-srpos-plugin/ You just need to enable such a plugin in VLC preferences as an interface, that will be started automatically with VLC.

jiglerul
New Cone
New Cone
Posts: 4
Joined: 16 Feb 2013 13:40

Re: Navigate between bookmarks with hotkeys

Postby jiglerul » 18 Feb 2013 12:30

Ctrl+Function keys sets a playlist bookmark. I'm looking for a in-video bookmark.

@mederi
Thanks for the info! I'll look into the extension and plugin route tonight.
I've looked at compiling the code in a virtual Ubuntu, but I'm having problems with the additional tools (gnu gettext specifically, which itself won't compile for some reason). I may get back to that but for now I'll try the two leads you've given me :)
I do not know what should be correct: one entry containing all bookmarks or many entries containing only one appropriate bookmark.
From my tests if I remember well - one entry containing all bookmarks works (I can delete the previous entries, and leave just the longest (last) one, the bookmarks work ok).

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Navigate between bookmarks with hotkeys

Postby mederi » 19 Feb 2013 15:22

@jiglerul
Please, could you help to fix the bookmark bugs we have discussed here? I have just found the related ticket:
Ticket #2100 (new enhancement): Bookmarks not loaded from playlist
This is marked as a new ennhancement, but it should be a bug report:
* redundant bookmark entries in saved playlist file
* Edit Bookmarks dialog (CTRL+B dialog) is empty until Create button is pressed
Thanks

etch286
New Cone
New Cone
Posts: 2
Joined: 19 Feb 2016 03:53

Re: Navigate between bookmarks with hotkeys

Postby etch286 » 19 Feb 2016 03:54

I know.... reaaaally old post but is any solution available now? rly annoying bug and seems like its nothing "new" :P


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 10 guests