Open xiongyihui opened 7 years ago
Install dependencies: sudo apt-get install libmpv1
sudo apt-get install libmpv1
import mpv import time player = mpv.MPV() def my_handler(name, value): print(name, value) player.observe_property('time-pos', my_handler) player.observe_property('time-remaining', my_handler) player.play('music.wav') print(player.duration) player.wait_for_property('duration') print(player.duration) time.sleep(3)
Install dependencies:
sudo apt-get install libmpv1