Confused about vlc.player and vlc.input - seek to absolute position/time

Discuss your Lua playlist, album art and interface scripts.
DialogPilot
New Cone
New Cone
Posts: 1
Joined: 06 May 2025 11:58

Confused about vlc.player and vlc.input - seek to absolute position/time

Postby DialogPilot » 06 May 2025 12:46

I am trying to understand some VLC LUA scripting fundamentals in order to implement seeking in my LUA script. Recently, I got totally confused although I have build a propper working script with >1000 lines of code so far.

The documentation states that
vlc.player.seek_by_time_absolute(posTime)
(see https://code.videolan.org/videolan/vlc/ ... /share/lua)
should do the intended job of seking to a certain time. Unfortunately, there seems to be no such function I can access. Even vlc.player returns nil instead of an object.

Somewhere I found the hint that prior v4.0 it is vlc.input instead of vlc.player. To which version does this statement refer (current VLC version ist 3.1.21.)?

Well, vlc.input returns an object and, indeed, vlc.input.is_playing() and vlc.input.item() seems to be the pendant to vlc.player.is_playing() and vlc.player.item(), respectively. But there still seems to be no funktion vlc.input.seek_by_time_absolute. This returns nil, too.

Could anyone give me a hint how to deal with that situation?

Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 65 guests