Page 1 of 1

Which feature do you miss in lua ?

Posted: 06 Aug 2010 15:47
by ivoire
In the lua script that vlc can execute, VLC add some functions to manipulate the behavior of vlc (like vlc.osd.message, ...).
I would like to know if there is some functions you would like VLC to export in lua that are not currently exported ?

Re: Which feature do you miss in lua ?

Posted: 06 Aug 2010 16:42
by hector2
Hello again !
To make easier the use of my script, I would need to get the path of the file which is currently read by VLC (maybe I missed this possibility). In order that the file subtitle can be automatically identified as long as it has the same name (except the extension) and is in the same directory as the movie file.

I suppose (and hope) that the C++ function already exists...
Thanks a lot !

(edited)

Re: Which feature do you miss in lua ?

Posted: 11 Aug 2010 01:03
by nlsdg
Hi,

I'm trying to connect to the network in order to search for and connect to UPnP devices. (A long standing wish from many users).
In the source I found a undocumented connect_tcp function in the net module. I succesfully used that to connect to a device and send a message, but how do I receive the response?

But to search for UPnP devices I need to send and receive UDP, not TCP. So some additions to the net module would be welcome. (Or someone to explain how to send/receive TCP and UDP with the currently available functions.)

I thought the addition of Lua to VLC was a great idea, because you can add/change things without the need to recompile. This should lower the bar for people (like me) to get involved with VLC-development. Even non-C experts can understand most of the Lua-scripts.

Re: Which feature do you miss in lua ?

Posted: 12 Aug 2010 11:47
by ivoire
Hello again !
To make easier the use of my script, I would need to get the path of the file which is currently read by VLC (maybe I missed this possibility). In order that the file subtitle can be automatically identified as long as it has the same name (except the extension) and is in the same directory as the movie file.
input.item:uri() isn't suitable ?

Re: Which feature do you miss in lua ?

Posted: 12 Aug 2010 12:15
by ivoire
Hi,

I'm trying to connect to the network in order to search for and connect to UPnP devices. (A long standing wish from many users).
In the source I found a undocumented connect_tcp function in the net module. I succesfully used that to connect to a device and send a message, but how do I receive the response?
You can use the send and recv functions to read and write to a socket.
But to search for UPnP devices I need to send and receive UDP, not TCP. So some additions to the net module would be welcome. (Or someone to explain how to send/receive TCP and UDP with the currently available functions.)

I thought the addition of Lua to VLC was a great idea, because you can add/change things without the need to recompile. This should lower the bar for people (like me) to get involved with VLC-development. Even non-C experts can understand most of the Lua-scripts.
You are right. The lua binding miss this function. Please fill a feature request on the trac about it (I might forget).

Re: Which feature do you miss in lua ?

Posted: 15 Aug 2010 01:50
by hector2
input.item:uri() isn't suitable ?
You are absolutely right, I missed it ! Thanks.

Re: Which feature do you miss in lua ?

Posted: 15 Aug 2010 15:37
by nlsdg
You can use the send and recv functions to read and write to a socket.

You are right. The lua binding miss this function. Please fill a feature request on the trac about it (I might forget).
OK, i'll try tweaking my code for receiving.
UDP request is filed as ticked #4060.

Thanks.

Re: Which feature do you miss in lua ?

Posted: 17 Aug 2010 10:59
by ivoire
Thanks for the feature request (#4060).
Do you need any others functions in lua ? (As I'm asking :p)

Re: Which feature do you miss in lua ?

Posted: 19 Aug 2010 00:45
by nlsdg
Well, if I read correctly, you can retrieve items from the media library using playlist.get("media library"), but I don't think you can add items to the library, only to the currently playing playlist. Am I right? If so, adding support for that would be appreciated.

At the moment no other features I can think of that are urgently needed...

Re: Which feature do you miss in lua ?

Posted: 19 Aug 2010 10:51
by ivoire
You are right about adding items to the media library. Could you fill a feature request on trac.videolan.org/vlc ? If you have any other needed feature (even not urgent :p) you are welcome to ask (I have some time actually...)

Re: Which feature do you miss in lua ?

Posted: 19 Aug 2010 17:50
by nlsdg
Feature request created :ticket #4083

Re: Which feature do you miss in lua ?

Posted: 20 Aug 2010 09:47
by ivoire
Thanks.

Re: Which feature do you miss in lua ?

Posted: 22 Oct 2010 18:47
by hector2
Hello,
I am not sure that my wish is reasonable, but it would be great if it was possible to get the current subtitle (maybe as a table ? I do not know how it is treated in VLC). Currently my script reads external subtitle files, from a specific format (subrip).
This feature would allow my script:
* to be independent from the subtile formats.
* to work with external or internal subtitle files. (for example, matroska (mkv) encapsulates internal files).
Thanks !

(to see my script : here).

Re: Which feature do you miss in lua ?

Posted: 29 Oct 2010 14:40
by ivoire
Seems really difficult to do. In fact the subtitle is like any other stream (audio or video). It's decoded on the fly so AFAIK you cannot access to the stream from lua.

Re: Which feature do you miss in lua ?

Posted: 27 Dec 2010 18:07
by rudjer
Hi Ivoire,

I'm wondering if it's possible to "remove" gap between videos in a playlist using LUA. I have a bunch of TS consecutive segments, but when I add them to VLC playlist it plays them like any other clips, with a gap between.

Thank you.

Re: Which feature do you miss in lua ?

Posted: 13 Feb 2011 16:47
by aciidb0mb3r
i really need to use libcurl for lua .__.
VLC doesnt seem to have that

Re: Which feature do you miss in lua ?

Posted: 14 Feb 2011 10:58
by alex_yen
hi

it would be nice if i could get the current time of the playing input in order to store it somewhere and the next time i play that input - to be able to play it from the piont i stored

thanks in advance

Re: Which feature do you miss in lua ?

Posted: 25 Feb 2011 12:34
by Zura
i don't know if that's what you mean, but you can get and set the time of the input ;-)

Code: Select all

input = vlc.object.input() yourTime = vlc.var.get(input, 'time') vlc.var.set(input, 'time', yourTime)
ok, and now to my wishes:
- text input multiline support
- hotkeys, keymapping (very importend for my extension :( )
- set dialog stage, so that the dialogbox can set in front with vlc interface
- open file dialog
- radio button
- set dropdown widget's value/selection
- disable widgets

Re: Which feature do you miss in lua ?

Posted: 25 Feb 2011 16:11
by INSA
- hotkeys, keymapping (very importend for my extension :( )
- open file dialog
- radio button
I totally agree with these ones.

Re: Which feature do you miss in lua ?

Posted: 01 Feb 2012 17:38
by krageon
I would like the possibility to scan for certain keyframes (some searching in the forums revealed that I could not - please correct me if I'm wrong about this) around a certain area of the video, so that it becomes possible to write plugins that can skip in- and outro's with slight variations in their start times, I've tried to do this by making a script using the start-time and stop-time tags in a playlist, but most shows do not have exact lengths for them.

Re: Which feature do you miss in lua ?

Posted: 01 Feb 2012 23:11
by Jean-Baptiste Kempf
I'm not sure VLC has the function internally...

Re: Which feature do you miss in lua ?

Posted: 17 Oct 2012 14:27
by mederi
There are already some good ideas for improvement: autostart (through GUI preferences and/or CLI), assignment of a hotkey, dialog box improvements and enhancements, ...
But first of all I would expose more VLC features for Lua scripting, all video/audio filters. More things users could touch on-the-fly with custom scripts mean more fun with VLC and more new scripts. Probably there are already available some good features (objects/methods/properties/variables) in Lua scripts, but they are undocumented and thus not available for ordinary scriptwriters. Even "\lua\extensions\" subdirectory has disappeared by default in VLC2. There is no documentation (text files) in "\lua\" subdirectories anymore and all scripts are now compiled (.luac). It looks like somebody would like to cancel all custom Lua scripting in VLC :(