How do I load the vlc object in lua?

*nix specific usage questions
nokangaroo
Blank Cone
Blank Cone
Posts: 29
Joined: 30 Dec 2010 17:11

How do I load the vlc object in lua?

Postby nokangaroo » 17 Feb 2015 17:33

I am trying to rewrite cli.lua so it can be used in shell scripts (that makes
more sense to me than trying to write an entire interface in lua). What I want
to do is something like this:

Code: Select all

my_variable=`lua <path/to/cli.lua> <arguments>` echo $my_variable >> my_textfile.txt #saving current state echo $vlc_variable $my_variable > $FIFO #make VLC do stuff
But I cannot figure out how to load the "vlc" object. I don't know even what
to load exactly; the documentation just sucks.

I tried:
loadfile("/usr/local/lib/libvlc.so")
local vlc = package.loadlib("/usr/local/lib/libvlc.so",'luaopen_libvlc')
package.preload['libvlc']
require("libvlc")

none of which works.

I just get variations of this:

Code: Select all

lua5.1: /home/BUILD/vlc-2.2.0/share/lua/intf/cli1.lua:63: module 'vlc' not found: no field package.preload['vlc'] no file './vlc.lua' no file '/usr/share/lua/5.1/vlc.lua' no file '/usr/share/lua/5.1/vlc/init.lua' no file '/usr/lib/lua/5.1/vlc.lua' no file '/usr/lib/lua/5.1/vlc/init.lua' no file './vlc.so' no file '/usr/lib/lua/5.1/vlc.so' no file '/usr/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /home/BUILD/vlc-2.2.0/share/lua/intf/cli1.lua:63: in main chunk [C]: ?
Is this possible at all? And where can I find documentation?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: How do I load the vlc object in lua?

Postby Rémi Denis-Courmont » 17 Feb 2015 20:16

No, so far that is not supported.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

nokangaroo
Blank Cone
Blank Cone
Posts: 29
Joined: 30 Dec 2010 17:11

Re: How do I load the vlc object in lua?

Postby nokangaroo » 18 Feb 2015 21:11

I posted a feature request:
https://trac.videolan.org/vlc/ticket/13976


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 18 guests