for a little project I need to get the metadata(mainly title and artist) from songs on audio streams, for this I am using the vlc python library. This is my code with a Belgian radio station as an example:
import vlc
def getData(url):
Instance = vlc.Instance()
player = Instance.media_player_new()
Media = Instance.media_new(url)
Media.get_mrl()
player.set_media(Media)
player.play()
return player.audio_get_track_description()
print(getData("http://icecast.vrtcdn.be/mnm-high.mp3"))
But all I get is an empty array:
[]
I got a part of the code from another stackoverflow thread and am not entirely sure on how it works: https://stackoverflow.com/a/34244909/14788941
How can I solve this?