Feb-29-2020, 11:09 PM
I am using VLClib to create a music player, the actual player is a GUI but the code I need help with does not change or interact with the GUI (yet).
I am trying to find the duration of the song before it starts playing (so I can turn it into some sort of duration bar later on), but I am having trouble getting it to work.
I have tried to find alternative methods of getting the duration of a song but cannot find any.
I am working with .mp3, .wav and .oog - But I will be expanding my media types in the future. So if there is a solution, it has to work with those file types.
Thanks in advance!
I am trying to find the duration of the song before it starts playing (so I can turn it into some sort of duration bar later on), but I am having trouble getting it to work.
I have tried to find alternative methods of getting the duration of a song but cannot find any.
# So far I have this print(s.get_duration())This, should print the medias length in ms, which I can convert to seconds, but it does nothing.
I am working with .mp3, .wav and .oog - But I will be expanding my media types in the future. So if there is a solution, it has to work with those file types.
Thanks in advance!