Open Aniruddh-J opened 1 year ago
I cannot help you with that since I don't have an Apple device to test this on. Here's a few suggestions of what you could try:
mpv
binary and of libmpv are the same. You can get the version of the command-line binary by running mpv --version
(first line of output), and the version of libmpv by running import mpv; player = mpv.MPV(); print(player.mpv_version)
.log_level
and registering a log handler like this:
def my_log(loglevel, component, message):
print('[{}] {}: {}'.format(loglevel, component, message.strip()))
player = mpv.MPV(log_handler=my_log, loglevel='debug')
--vo
option in the command-line utility, vo
parameter to mpv.MPV(...))$DISPLAY
on your shell to get libmpv to find your display outputI'm running into the same issue. The debug logs look like it's running but nothing shows. Just a python icon that pops up but no player.
Also on MacOS (Apple Silicon). Wilder still, I hear the video playing back, do not see the window/image.
Both versions of mpv match.
From debug-level log:
[error] vo/gpu-next/vulkan: Failed to initialize macvk context, no NSApplication initialized.
[fatal] cplayer: Error opening/initializing the selected video_out (--vo) device.
Since command-line on MacOS works, ran in verbose mode. I see:
[vo/gpu/libplacebo] Failed creating instance: VK_ERROR_EXTENSION_NOT_PRESENT
[vo/gpu/libplacebo] Failed initializing vulkan instance
[vo/gpu/vulkan] Initializing GPU context 'macvk'
[vo/gpu/libplacebo] Initialized libplacebo v7.349.0 (API v349)
[vo/gpu/libplacebo] Creating vulkan instance with extensions:
Compare this to logging from Python on same OS:
[v] vo/gpu/libplacebo: Failed creating instance: VK_ERROR_EXTENSION_NOT_PRESENT
[v] vo/gpu/libplacebo: Failed initializing vulkan instance
[v] vo/gpu/vulkan: Initializing GPU context 'macvk'
[error] vo/gpu/vulkan: Failed to initialize macvk context, no NSApplication initialized.
[v] vo/gpu-next: Probing for best GPU context.
Obviously they diverge in the last two logs.
Maybe there's a clue in the above as to how the C/L handles video playback more robustly on MacOS.
Hello,
I installed mpv using Homebrew and tested if it is working with the command
mpv {filename}
but it doesn't work using this Python library: