i want to build a small cd player with normal pc usb cd player, Rpi 3b+, dac, oled screen and buttons. Currently im working on soft, and because i'm new to python (i was only using c++ before) im thinkering what library to use. Currently I stucked with vlc. I found how to get cd playback working here, but i want to get also metadata (Title etc.) like in desktop version SS. How can i achive it?
My current test code:
import vlc
import time
instance = vlc.Instance()
player = instance.media_player_new()
medialist = instance.media_list_new()
listplayer = instance.media_list_player_new()
listplayer.set_media_player(player)
medialist.add_media("cdda:///E:/")
listplayer.set_media_list(medialist)
listplayer.play()
time.sleep(10)
MEDIA=instance.media_new("cdda:///O:/") #this whole section doesnt work
MEDIA.get_mrl()
MEDIA.parse()
for i in range(13): #get metadata
print("{} - {}".format(i, MEDIA.get_meta(i)))
listplayer.pause()
print("pauza")
time.sleep(10)
listplayer.play()
print("play")
time.sleep(10)
listplayer.next()
print("next")
time.sleep(10)
listplayer.previous()
print("previous")
time.sleep(10)
listplayer.stop()
listplayer.play()
print("stopplay")
time.sleep(10)
I was trying to do something like they did here
I made it work. Next to add is button control, oled display, duration of song (and current state), and last but not least ability to play whatever song without iterating (eg song 6 from start)