Category : lua

I am using this script as a template to rename a file in VLC: https://github.com/surrim/vlc-delete/ The Script works as intended. My code looks like this: function descriptor() return { title = "VLC Rename"; version = "0.1"; author = "I"; shortdesc = "Rename current file"; description = [[ <h1>vlc-rename</h1>" When you’re playing a file, use VLC ..

Read more

When debugging an issue on writing BMP using binary data with Lua, I ran on a strange issue that some bytes were being introduced. When we write string.char(10), the bytes 0x0D0A appear. local file = io.open("forbchars.bin","w") local out = {} for i=1,255 do out[#out+1] = string.char(i) out[#out+1] = string.char(255) end file:write(table.concat(out)) If you inspect this ..

Read more

I have an issue with the accents with French Windows 10 local origin = "D:temptest.txt" local destination = "D:temptesté.txt" local cpTemplate = "copy ""..origin.."" ""..destination..""" os.execute(cpTemplate) A console log correctly shows: copy "D:temptest.txt" "D:temptesté.txt" This does not create a "testé.txt" file but: testé.txt Of course, if there is an accent in the folder name (D:temp ..

Read more

I encounter a bug with libvlc where attempting to play video from YouTube result in error http stream error: local stream 1 error: Cancellation (0x8) Context C++ code: #include <iostream> #include <thread> #include <vlc/vlc.h> #include <vlc/libvlc.h> #include <vlcpp/vlc.hpp> int main() { const char *const arg[] = { "–no-video", "-vv" }; VLC::Instance instance = VLC::Instance(2, arg); ..

Read more

I have a .lua file as follows: timeout = 3000 index = 15 function Test() A(index, timeout) B() end A and B fuctions are implemented in the c++. It will be excuted with a ‘luaL_dofile(L, "test.lua");’ in c++.But the timeout and the index will change at different times. The question is how to modify the ..

Read more