Lua get chapter time

Discuss your Lua playlist, album art and interface scripts.
cutdact
New Cone
New Cone
Posts: 1
Joined: 22 Jun 2018 11:59

Lua get chapter time

Postby cutdact » 22 Jun 2018 12:07

Hello!

Is there a way to get the time of a specific chapter? I'm trying to make a script that looks up the time for chapter 1 (chapter 1 is after the intro) and then taking that time minus the intro time to get the time where it should skip to remove the intro. Hope that made sense :D

Thanks!

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: Lua get chapter time

Postby mederi » 23 Jun 2018 14:04

Code: Select all

input = vlc.object.input() v, l = vlc.var.get_list( input, "chapter") chapter_time_string=l[2]

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: Lua get chapter time

Postby mederi » 25 Jun 2018 14:30

Sometimes the chapters list contains time strings, sometimes chapter names (Chapter 01, Chapter 02, ...) and then it is not possible to get the chapter time.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 19 guests