Any documentation on extensions?

Discuss your Lua playlist, album art and interface scripts.
Kacper Welnowicz
New Cone
New Cone
Posts: 2
Joined: 13 Feb 2013 19:08

Any documentation on extensions?

Postby Kacper Welnowicz » 13 Feb 2013 19:45

Hello.
Recently, as an experienced Lua programmer, I decided to create my own extension. The problem is, I don't really know how to start, I can't even find a proper documentation, and that's why I'm posting.

The situation is really confusing. Some fan of conspiracy theories would say, "VideoLAN is trying to hide the ability to create extensions" (not to be confused with scripts), because, look: Even the sticky thread on this forum that is to be read first says:
Starting from VLC 0.9.0, users can create several type of scripts to tweak behavior to their needs. These are:
Playlist parsing scripts (and demuxers)
Album art retrieval scripts
Interface scripts
And that already seems to be a lie, because according to the global README file on Lua scripting, there are five types of VLC scripts, including extensions and services discovery. If that wasn't enough, there isn't even an "extensions" directory in the "lua" subdirectory of the installation folder of the program. VLC is not a developer-friendly software :(.

The leak of info about descriptor() function is the worst. I can't even make my extension visible in the toolbar. Do anyone of you, good people, know anything about it? The README file about extensions is a "TODO" file since November 2012. The only source of info about its use are the example scripts, but they provide about as much as nothing.

I'm sad, all I want to do is a simple dialog that pops out when an item is clicked on the toolbar. Any response is satisfying, even a confirmation "Yes, this seems confusing to me, too". I guess I'm not the first developer who had problems with implementing own functions to VLC :?.

Sincerely,
me.
Last edited by Kacper Welnowicz on 14 Feb 2013 00:48, edited 1 time in total.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: Any documentation on extensions?

Postby Etoh » 13 Feb 2013 21:41

Yes, it could be easier to get involved in extensions but I don't think there is any sort of conspiracy.

Sources of information include:
1. README files and non-compiled scripts available from: http://www.videolan.org/developers/vlc/share/lua/
2. Non-compiled scripts available from: http://addons.videolan.org
3. Posts on this forum
4. Guide to LUA playlist scripts available from: http://wiki.videolan.org/Documentation: ... st_Scripts
5. The general VLC docs available from: http://www.videolan.org/developers/vlc/ ... dules.html

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: Any documentation on extensions?

Postby mederi » 13 Feb 2013 22:34


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: Any documentation on extensions?

Postby Jean-Baptiste Kempf » 14 Feb 2013 00:33

Hello.
Recently, as an experienced Lua programmer, I decided to create my own extension. The problem is, I don't really know how to start, I can't even find a proper documentation, and that's why I'm posting.
Yes, it is bad. Yes, we are sorry. I would advise to ask questions to mederi and document findings on our wiki!
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.

Kacper Welnowicz
New Cone
New Cone
Posts: 2
Joined: 13 Feb 2013 19:08

Re: Any documentation on extensions?

Postby Kacper Welnowicz » 14 Feb 2013 00:42

Thanks mederi, your post containing the template was really useful, especially the part with event-based functions. But it looks like these features I asked about are in fact undocumented, and that's why there's so few of Lua scripts.

Still though, what is the leak of documentation caused by? It seems logical that here, on the official VideoLAN forums, people should be in touch with VLC developers. Meanwhile, people managed to acquire proper information about the API only from example scripts and looping through the vlc object :?.

Also thank you, Mr. Kempf, I'll take advantage of your advice, although I'm still unpleasantly surprised.

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: Any documentation on extensions?

Postby Jean-Baptiste Kempf » 14 Feb 2013 01:17

Still though, what is the leak of documentation caused by?
Lack of time.
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: Any documentation on extensions?

Postby mederi » 14 Feb 2013 15:51

I will try to gather all useful informations about extensions I know so far in the "Getting started?" topic that I have just pinned on the top of this forum. Then I will see whether I can summarise and publish it on the wiki. Yet another system, another account/login, ... :roll: :)

Who else can write a better documentation than developer who created/implemented features in VLC? New feature should always go out with new/updated documentation/description. As for Lua scripting in VLC:
...
For the record, the original VLC Lua hobbyist developer left the project a few years ago and never "finished" the Lua support.
...
It seems that there is no one left for further maintenance and to discuss all those Lua secrets. Mozilla Firefox with its world of addons is really amazing. I think that VLC with custom Lua scripting is amazing, too.

Come on, people, everybody can help to build happy VLC community. Scriptwriters can write and share interesting Lua scripts, C++/Lua experts can join VLC developers, others can write/update documentation, make donation, ...
Howgh!

ajohnw
New Cone
New Cone
Posts: 3
Joined: 28 Aug 2013 10:42

Re: Any documentation on extensions?

Postby ajohnw » 28 Aug 2013 11:56

Just joined as I have been looking around the web on this subject. Thanks for the 2 links posted earlier. I can add one other that may help

http://www.videolan.org/developers/vlc/ ... /playlist/

There are other aspects around the same directory. None of them will run on 2.08 VLC linux though but I hope they remain on the web despite that.

I recently downloaded a similar add on and wondered why it wouldn't work. Eventually I started vlc from the console using vlc -vvv and found out why. It seems certain function names must be in any add on. Namely

descriptor()
activation()
deactivation()

Having said that though I just used vlc -vvv again and this time it's passed one add on that just has the descriptor which I added probably with incorrect code in it and threw out another just complaining about the lack of a descriptor. Last time I did this it complained about any that were missing.

I would say the biggest lack on documentation is guidance about what these functions should contain and the options such as capabilities in description and what they are for. Lua itself is well documented. :D Using Lua is another matter but there are examples about. It seems to be a pretty loose language which is likely to make learning to use it more difficult than some.

In the case of the examples I posted a link to if they have ever run converting them to have the 3 function descriptors may be simple apart from the descriptor and any knock on effects that may have in the functional code. If they ever have run activation and deactivation may just need them adding with no code in them at all. On the other hand some guidance on what these 2 should contain would help as well.

The other area that could do with a little help is VLC itself. For instance configuration-all-Main Interface-Lua in my case shows dummy in one field a password and entry in telnet. HTTP and CLI are blank. It's rather difficult to know if these are correct or incorrect. Maybe a few of the ? help entried could be filled in.

I'm currently running the opensuse packman code but I also installed using the opensuse 1 click on videolan. Behaviour was the same.

John
-

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: Any documentation on extensions?

Postby mederi » 28 Aug 2013 12:47

I repeat the link to the pinned topic on this forum where I have gathered some information: Getting started?


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 14 guests