Page 1 of 1

Possible to start in middle of videos from playlist scripts?

Posted: 13 Aug 2012 22:33
by NoMoreNicksLeft
I've been reading through everything I can find, but it doesn't seem possible to start a video a minute in from a playlist script. Is this possible? I'd like to modify the youtube.lua script so that it correctly parses URLs with the &start=30 query string parameter.

If this isn't possible, what would need to be added to VLC's code (generally speaking) to make it work?

Re: Possible to start in middle of videos from playlist scri

Posted: 13 Aug 2012 23:03
by Jean-Baptiste Kempf
:start-time

Re: Possible to start in middle of videos from playlist scri

Posted: 14 Aug 2012 02:48
by NoMoreNicksLeft
I tried to set start-time to an integer value, but no luck.

Code: Select all

t[i] = { path = link; name = title; duration = duration; start-time = 60 } return t
The above just gives me the following error:

Code: Select all

[0x171db3c8] lua demux warning: Error loading script /Applications/VLC.app/Contents/MacOS/share/lua/playlist/spacepotato.lua: /Applications/VLC.app/Contents/MacOS/share/lua/playlist/spacepotato.lua:28: '}' expected near '='
Changing the dash in start-time to an underscore stops the error, but that property seems unused. I don't seem to be able to directly get ahold of vlc.playlist either. Am I missing something obvious?

Re: Possible to start in middle of videos from playlist scri

Posted: 15 Aug 2012 03:24
by NoMoreNicksLeft
For those curious about the answer, here goes nothing:

Code: Select all

return { { path = path; name = name; description = description; artist = artist; arturl = arturl; options = { ':start-time=' .. stime } } }
Of course, figuring out how to get the start time of a Youtube URL is a bit difficult, since it's embedded in the # URL fragment, which doesn't seem to get passed in with the rest of vlc.path...

Re: Possible to start in middle of videos from playlist scri

Posted: 12 Mar 2013 06:51
by vegasguy333
i've just started looking for a way to start a file in the playlist where i left it. this sounds along the same lines