Page 1 of 1

Pausing and jumping to a position in a video file via lua

Posted: 22 Sep 2011 10:52
by rohin
I've looked at the API and read through a lot of sample extensions, but I still can't find the answer.

How do you pause the current media and then jump to a different position while playing a standard video file via a lua extension?

There must be api calls in one of the objects like pause() and seek(pos).

Basically I want to create a module which will pause the media for 5 seconds, and then jump back about 20 seconds and play the media again.

Re: Pausing and jumping to a position in a video file via lu

Posted: 22 Sep 2011 11:47
by rohin
Okay I've got the answers now after asking on IRC. I guess I hadn't yet found the right example which was http://www.videolan.org/developers/vlc/ ... quests.lua, and the API calls weren't quite what I was expecting.

vlc.playlist.pause() to pause and
vlc.var.set(input, "time", num_seconds) to set the time

Re: Pausing and jumping to a position in a video file via lu

Posted: 06 Jan 2012 02:17
by pebo mac
sleek solution and thanks for providing the resource on how to ..