Which feature do you miss in lua ?

Discuss your Lua playlist, album art and interface scripts.
ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Which feature do you miss in lua ?

Postby ivoire » 06 Aug 2010 15:47

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 ?

hector2
Blank Cone
Blank Cone
Posts: 17
Joined: 26 Jan 2010 14:36

Re: Which feature do you miss in lua ?

Postby hector2 » 06 Aug 2010 16:42

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)

nlsdg
New Cone
New Cone
Posts: 4
Joined: 11 Aug 2010 00:44

Re: Which feature do you miss in lua ?

Postby nlsdg » 11 Aug 2010 01:03

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.

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Which feature do you miss in lua ?

Postby ivoire » 12 Aug 2010 11:47

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 ?

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Which feature do you miss in lua ?

Postby ivoire » 12 Aug 2010 12:15

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).

hector2
Blank Cone
Blank Cone
Posts: 17
Joined: 26 Jan 2010 14:36

Re: Which feature do you miss in lua ?

Postby hector2 » 15 Aug 2010 01:50

input.item:uri() isn't suitable ?
You are absolutely right, I missed it ! Thanks.

nlsdg
New Cone
New Cone
Posts: 4
Joined: 11 Aug 2010 00:44

Re: Which feature do you miss in lua ?

Postby nlsdg » 15 Aug 2010 15:37

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.

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Which feature do you miss in lua ?

Postby ivoire » 17 Aug 2010 10:59

Thanks for the feature request (#4060).
Do you need any others functions in lua ? (As I'm asking :p)

nlsdg
New Cone
New Cone
Posts: 4
Joined: 11 Aug 2010 00:44

Re: Which feature do you miss in lua ?

Postby nlsdg » 19 Aug 2010 00:45

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...

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Which feature do you miss in lua ?

Postby ivoire » 19 Aug 2010 10:51

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...)

nlsdg
New Cone
New Cone
Posts: 4
Joined: 11 Aug 2010 00:44

Re: Which feature do you miss in lua ?

Postby nlsdg » 19 Aug 2010 17:50

Feature request created :ticket #4083

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Which feature do you miss in lua ?

Postby ivoire » 20 Aug 2010 09:47

Thanks.

hector2
Blank Cone
Blank Cone
Posts: 17
Joined: 26 Jan 2010 14:36

Re: Which feature do you miss in lua ?

Postby hector2 » 22 Oct 2010 18:47

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).

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Which feature do you miss in lua ?

Postby ivoire » 29 Oct 2010 14:40

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.

rudjer
New Cone
New Cone
Posts: 5
Joined: 27 Dec 2010 17:53

Re: Which feature do you miss in lua ?

Postby rudjer » 27 Dec 2010 18:07

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.

aciidb0mb3r
New Cone
New Cone
Posts: 3
Joined: 13 Feb 2011 16:41

Re: Which feature do you miss in lua ?

Postby aciidb0mb3r » 13 Feb 2011 16:47

i really need to use libcurl for lua .__.
VLC doesnt seem to have that

alex_yen
New Cone
New Cone
Posts: 1
Joined: 14 Feb 2011 10:49

Re: Which feature do you miss in lua ?

Postby alex_yen » 14 Feb 2011 10:58

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

Zura
New Cone
New Cone
Posts: 1
Joined: 25 Feb 2011 12:08

Re: Which feature do you miss in lua ?

Postby Zura » 25 Feb 2011 12:34

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

INSA
Blank Cone
Blank Cone
Posts: 11
Joined: 26 Oct 2010 13:50

Re: Which feature do you miss in lua ?

Postby INSA » 25 Feb 2011 16:11

- hotkeys, keymapping (very importend for my extension :( )
- open file dialog
- radio button
I totally agree with these ones.

krageon
New Cone
New Cone
Posts: 4
Joined: 01 Feb 2012 17:31

Re: Which feature do you miss in lua ?

Postby krageon » 01 Feb 2012 17:38

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.

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: Which feature do you miss in lua ?

Postby Jean-Baptiste Kempf » 01 Feb 2012 23:11

I'm not sure VLC has the function internally...
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: Which feature do you miss in lua ?

Postby mederi » 17 Oct 2012 14:27

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 :(


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 17 guests