8

This happens if I use set_time or set_position. Is this typical, or am I just not doing it right?

This is on a Pi Zero 2 W, so not the most powerful, but should be able to handle this.

These are the relevant bits of how I'm setting up the player:

    self._vlc = vlc.Instance()
    self._player = self._vlc.media_player_new()
    self._list_player = self._vlc.media_list_player_new()
    self._list_player.set_media_player(self._player)

    playlist = self._vlc.media_list_new()
    for index in self._play_order:
      playlist.add_media(self._vlc.media_new_path(self._songs[index]))

    self._list_player.stop()
    self._list_player.set_media_list(playlist)
    self._list_player.play()

And trying to seek is just this:

    self._player.set_time(_s_to_ms(seconds))

Any ideas would be greatly appreciated!

top 3 comments
sorted by: hot top controversial new old
[-] SteveTech@programming.dev 3 points 4 months ago

I believe I've actually had this happen with actual VLC, I think I just hit pause and then play and it was fixed. So maybe pause it for half a second after your seek.

[-] TheButtonJustSpins@infosec.pub 3 points 4 months ago

Did not work. Thank you for the suggestion, though!
Good news is, for this project, I just learned I can avoid having to do this, so.. at least that's something.

[-] TheButtonJustSpins@infosec.pub 2 points 4 months ago

Okay, I actually do need to seek. However, something about going out over bluetooth instead of over the headphone jack has made it work, so.. no idea, but there you go. (Or maybe it's something else that I did, but, either way, it's working, so.. cool.)

this post was submitted on 25 Jun 2024
8 points (90.0% liked)

Python

6343 readers
4 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS