how to loop audio files without length?

This forum is about all development around libVLC.
ChingDim
New Cone
New Cone
Posts: 1
Joined: 20 Sep 2020 22:00

how to loop audio files without length?

Postby ChingDim » 20 Sep 2020 22:05

I am currently using python-vlc

My current audio loop method is to get the length of the audio file, then use a while true loop to play and wait for the time.

But this only works for files with audio length. codecs like FLAC will make the while true loop before the player even starts.

How do you properly loop an audio file?

The documentation is poor, I have no idea what I can do wiith libvlc

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

Re: how to loop audio files without length?

Postby mfkl » 21 Sep 2020 15:37

How do you properly loop an audio file?
maybe try

Code: Select all

--input-repeat=2
or listen to the end reached event in your code and start playback again.
The documentation is poor
Feel free to contribute to it to help improve it, when you learn more about it. https://www.videolan.org/developers/vlc ... ibvlc.html
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 20 guests