mediaplayer.set_time() is not consistent

This forum is about all development around libVLC.
engelcia
New Cone
New Cone
Posts: 2
Joined: 11 Nov 2022 00:27

mediaplayer.set_time() is not consistent

Postby engelcia » 11 Nov 2022 00:38

Hi!
I'm building a splitscreen compare program in python with the python vlc package.
Following scenario:
1. I play the video until a random point, stop it and get the current mediaplayer time via mediaplayer.get_time()
2. I resume playing the video and stop it after a random time again.
3. I set the video with mediaplayer.set_time() to the value obtained in step 1. Sometimes it shows the right picture sometimes not.

As I'm really dependent on visable frame compares this is really frustrating. What is the issue there?
Is it because of the keyframe jumping of vlc? How can I prevent that?

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: mediaplayer.set_time() is not consistent

Postby mfkl » 15 Nov 2022 07:27

Have you tried using set_position instead?
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests