Hello,
consider the following code:
import mpv
_url = 'test.webm'
mpv = mpv.MPV()
mpv.loadfile(_url)
print('waiting')
mpv.wait_for_playback()
print('done')
On Linux, this will print waiting, then play test.webm, and finally print done as expected.
On macOS 10.12.6 using Python 3.6 and MPV 0.27 however, it only prints waiting and is then stuck forever while the Python-Rocket starts jumping in my Dock.
I looked into python-mpv's code, and for mpv.wait_for_playback() it is stuck in line 557, which is:
self._playback_cond.wait() # _playback_cond is threading.Condition
Using mpv.wait_for_property('filename', lambda x: x is None) instead, makes it stuck in line 569, which is:
sema.acquire() # sema is threading.Semaphore
The problem thus seems to somehow be related to the handling of the threading library.
Do you have any suggestion what might be causing this?
This is also possibly a duplicate of #59.
Hello,
consider the following code:
On Linux, this will print
waiting, then playtest.webm, and finally printdoneas expected.On macOS 10.12.6 using Python 3.6 and MPV 0.27 however, it only prints
waitingand is then stuck forever while the Python-Rocket starts jumping in my Dock.I looked into python-mpv's code, and for
mpv.wait_for_playback()it is stuck in line 557, which is:Using
mpv.wait_for_property('filename', lambda x: x is None)instead, makes it stuck in line 569, which is:The problem thus seems to somehow be related to the handling of the
threadinglibrary.Do you have any suggestion what might be causing this?
This is also possibly a duplicate of #59.