Possible to start in middle of videos from playlist scripts?

Discuss your Lua playlist, album art and interface scripts.
NoMoreNicksLeft
Blank Cone
Blank Cone
Posts: 21
Joined: 06 Aug 2012 19:39

Possible to start in middle of videos from playlist scripts?

Postby NoMoreNicksLeft » 13 Aug 2012 22:33

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?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

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

Postby Jean-Baptiste Kempf » 13 Aug 2012 23:03

:start-time
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

NoMoreNicksLeft
Blank Cone
Blank Cone
Posts: 21
Joined: 06 Aug 2012 19:39

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

Postby NoMoreNicksLeft » 14 Aug 2012 02:48

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?

NoMoreNicksLeft
Blank Cone
Blank Cone
Posts: 21
Joined: 06 Aug 2012 19:39

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

Postby NoMoreNicksLeft » 15 Aug 2012 03:24

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...

vegasguy333
New Cone
New Cone
Posts: 1
Joined: 12 Mar 2013 06:42
VLC version: 2.0.5
Operating System: Windows Vista
Location: Las Vegas, NV

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

Postby vegasguy333 » 12 Mar 2013 06:51

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


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 9 guests