VLC Extension Example
开发
编写脚本 hello.lua
function descriptor()
    return {
        title = "Hello World";
        version = "1.0";
        author = "WangJunjian";
        url = 'www.wangjunjian.com';
        shortdesc = "Hello World";
        description = "Hello World!";
        capabilities = {"menu"}
    }
end
-- activate() : called when the extension is activated from within VLC
function activate()
    create_dialog()
end
-- deactivate() : called when the extension is deactivated from within VLC
function deactivate()
    close()
    vlc.deactivate()
end
-- create_dialog() : creates the dialog containing the initial widgets
function create_dialog()
    dlg = vlc.dialog(descriptor().title)
    dlg:add_label("<b>Hello World: VLC Lua scripts and extensions</b>")
end
安装
拷贝脚本 hello.lua 到 extensions 目录
- Windows
    
/Program Files/VideoLAN/VLC/lua/extensions - Mac OS X
    
/Applications/VLC.app/Contents/MacOS/share/lua/extensions/ - Linux
    
/home/$USER/.local/share/vlc/lua/extensions/ /usr/share/vlc/lua/extensions/ /usr/lib/vlc/lua/playlist/ 
使用
打开VLC Media Player,选择菜单:View->Hello World。
参考资料
- VLC Lua scripts and extensions
 - videolan/vlc/share/lua/
 - videolan/vlc/modules/lua/
 - VLC Extensions
 - Moments’ Tracker [Sort by ASCII value]
 - Super Skipper
 - Subtitle Word Search
 - Extending VLC with Lua
 - vlc lua: how do I get the full path of the current playing item?
 - Compile VLC
 - VLC Object Detection Extension
 - Python ctypes-based bindings for libvlc
 - vs-media-player
 - VLC-Qt Library
 - libVLC
 - Python ctypes-based bindings for libvlc
 - vlc-ffmpeg-thumbnail.lua