How to make sure Lua playlists are used
Posted: 22 May 2011 05:36
Hello,
I just started scripting Lua playlists. I can’t get a basic example to work on either Mac OSX or Ubuntu. Is there some kind of Hello World script that I could try that is bound to work?
This is what I did now:
I called this aaa.lua — the way I read the documentation, now, with every video I try to play in VLC I should instead get the movie MVI_3303_edt_h264.mov
But nothing happens!
I thought the script should run always when a video is played, because probe() always returns true?
I’m running 1.1.9 Intel 64 bit on Mac OS X 10.6.7 and the script is in /Applications/VLC.app/Contents/MacOS/share/lua/playlist/
FWIW, what I want to achieve is that I want to read a random movie file from a directory and return a random 6 seconds from it. I would find the filename and the offsets through shell commands called in the parse() function and then simply return the result as the playlist item. I think I have a reasonable idea of how to achieve this, if I can get the basics to work first!
Thanks! for your help,
Eric
I just started scripting Lua playlists. I can’t get a basic example to work on either Mac OSX or Ubuntu. Is there some kind of Hello World script that I could try that is bound to work?
This is what I did now:
Code: Select all
-- Probe function.
function probe()
return true
end
-- Parse function.
function parse()
msg.dbg("test")
return { { path = "http://schr.fr/tlkng/MVI_3303_edt_h264.mov"; name = "test" } }
end
But nothing happens!
I thought the script should run always when a video is played, because probe() always returns true?
I’m running 1.1.9 Intel 64 bit on Mac OS X 10.6.7 and the script is in /Applications/VLC.app/Contents/MacOS/share/lua/playlist/
FWIW, what I want to achieve is that I want to read a random movie file from a directory and return a random 6 seconds from it. I would find the filename and the offsets through shell commands called in the parse() function and then simply return the result as the playlist item. I think I have a reasonable idea of how to achieve this, if I can get the basics to work first!
Thanks! for your help,
Eric