I'm new to vlc.py and i'm trying to play two instances of MediaPlayer() which is working but the second instance is not playing audio while the first instance is playing fine.
some basic codes from stackoverflow and python-vlc documentations
I'm new to vlc.py and i'm trying to play two instances of MediaPlayer() which is working but the second instance is not playing audio while the first instance is playing fine.
some basic codes from stackoverflow and python-vlc documentations
I had the similar problem in java. You have to play both songs in separate threads. Here is tutorial how to do it: https://realpython.com/intro-to-python-threading/ You can’t play two songs in one thread, because program have to wait until end of first song. Also if you want to do some actions while playing, create new threads for BOTH of MediaPlayer instances.
You can use the multiprocessing
module in Python. That way you can have 3 processes, where one is the controlling one, and the other two are the ones containing each one VLC instance.