python-vlc
python-vlc copied to clipboard
Setting time duration
Hello, is their any way to do this: https://wiki.videolan.org/VLC_HowTo/Jump_to_a_certain_time/ in python? I want to do it before initiating python just like we do in command-line. Thanks for your advice.
Seems we can do something like this:
import vlc
import time
start_frame = 10
end_frame = 20
length = end_frame - start_frame
player = vlc.MediaPlayer("/home/smile.wav")
player.play()
player.set_time((start_frame*1000))
print(player.get_time())
player.play()
time.sleep(length)
Is there are more functions?