Zohar Posted May 2, 2015 Share Posted May 2, 2015 (edited) Hi When reading about "Lua" in Wikipedia, I found out that VLC supports scripting via Lua Plugins/Extensions. I thought that it can be really useful for scripting in AutoIt, since the Lua code can access many variables regarding the currently running movie, etc, and can also perform operations like display text OSD, and more. My question: Does anyone know of a "Hello World" example of such a Lua plugin/extension, in VLC? It will enable to get started with it.. Thank you Edited April 5, 2021 by Zohar Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 2, 2015 Moderators Share Posted May 2, 2015 How about the official ReadMe? https://www.videolan.org/developers/vlc/share/lua/README.txt "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Zohar Posted May 2, 2015 Author Share Posted May 2, 2015 (edited) Hi JLogan3o13 Thank you for the reference to that file. I actually saw it several days ago, and kept a link for it, since it provides a reference for the available functions. However it does not contain even the smallest example to "taste" the story, and to test that it works.. So that's what I am looking for.. A complete, yet minimalistic example, to run on my VLC.. Edited April 5, 2021 by Zohar Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted May 4, 2015 Share Posted May 4, 2015 Seems like a fun project, who knows what we may integrate to VLC via Autoit Link to comment Share on other sites More sharing options...
Zohar Posted May 5, 2015 Author Share Posted May 5, 2015 I know.. If only we could get started.. Link to comment Share on other sites More sharing options...
userblue Posted December 9, 2020 Share Posted December 9, 2020 It is an old thread, but it is better to keep some reference points if some are interested who come by. There 3 important functions to define in vlc extension: descriptor(), activate(), deactivate() Plus this to write to console: vlc.msg.info("Salam") Here some examples from official source code: - https://github.com/videolan/vlc/tree/master/share/lua/ Also it is good to make a look on others add-on code many are in lua. - https://addons.videolan.org/browse/cat/ Hello World: function descriptor() return { title = "Simple", version = "0.1", author = "Blue", shortdesc = "XYZ Loader", description = "Loads XYZ and apply on the fly", capabilities = {} } end local prefix = "[XYZ] " function activate() vlc.msg.info(prefix .. "activated!") local elapsedDuration = vlc.var.get(vlc.object.input(), "time") local timeAsString = tostring(elapsedDuration/1000000) vlc.msg.info(prefix .. timeAsString) end function deactivate() vlc.msg.info(prefix .. "deactivated!") end Zohar 1 Link to comment Share on other sites More sharing options...
Zohar Posted March 19, 2021 Author Share Posted March 19, 2021 Thank you very much userblue Just saw tyour reply now.. I Will try it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now