playlist script, add options without rewriting path

Discuss your Lua playlist, album art and interface scripts.
tab
New Cone
New Cone
Posts: 2
Joined: 04 Nov 2019 13:18

playlist script, add options without rewriting path

Postby tab » 04 Nov 2019 13:37

I want to add option (namely, demux) without changing url. But, as path is not changed, script entered for second time and, in the end, it doesn't work (though, somehow no infinite loop happen). I need a way to tell vlc, that rewriting is final and no consecutive playlist script runs should happen.
Adding "no-lua" option doesn't work:

Code: Select all

item.options = {":demux=avformat :no-lua"}
Also, i found no way to save global state in playlist scripts.
Only way I found is to append "?" to url (which luckily doesn't change its meaning in HTTP) to distingiush next runs from the first one.

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: playlist script, add options without rewriting path

Postby mederi » 07 Nov 2019 15:07

You can start VLC with global options (vlc.exe --no-lua). Only some of the options can be used as local/per item option ({"start-time=100", "stop-time=200"}).

tab
New Cone
New Cone
Posts: 2
Joined: 04 Nov 2019 13:18

Re: playlist script, add options without rewriting path

Postby tab » 07 Nov 2019 17:16

I've got "--no-lua" is global.
Problem is that VLC enters probe() and parse() functions twice because my script doesn't change path (basically does item.path = "http://".. vlc.path). Question is how to deal with it.
In other words, how to dynamically change playback options of playlist entries with scripts?


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 8 guests