python-mpv icon indicating copy to clipboard operation
python-mpv copied to clipboard

The right mpv to use with your module

Open mikeconnell opened this issue 4 years ago • 5 comments

Having problems with python3 modules for MPV, because I'm not using the right MPV version. I'm using Linux Mint XCFE 19.3, which is based on Ubuntu 18.04. I was wondering if you guys could direct me to right version of MPV that will work with Ubuntu 18.04. I have had to rebuild OS three times because of problems with getting MPV, Python3, wxpython4, and the python MPV module to work together. It seems to be a one shot thing, and after all pieces are loaded it either works or it doesn't, and after the choices are made nothing besides an OS rebuild will get all the pieces back to what they were. If you can suggest the MPV version that will work with my OS, python3 and your module, I will give it a shot. thanks in advance

mikeconnell avatar Aug 06 '20 21:08 mikeconnell

Hi, AFAIK libmpv1 from your distro's repository should work just fine.

McSinyx avatar Aug 07 '20 04:08 McSinyx

I am having similar issues, libmpv1 and libmpv-dev which are the only two versions available via apt, both throw the following error : libmpv.so.1: undefined symbol: mpv_render_context_create. I am on ubuntu 18.04 with python 3.7.9. And trying to run the default minimal example in the readme :

import mpv

player = mpv.MPV(ytdl=True)
player.play('https://youtu.be/DOmdB7D-pUU')
player.wait_for_playback()

nhamilakis avatar Dec 14 '20 18:12 nhamilakis

Hey there,

The render context API is a bit new. Ubuntu 18.04 LTS uses a three-year-old version of libmpv that doesn't have it yet. Please either update your libmpv to something more recent or use a python-mpv version from the same vintage (v0.3.9 and v0.3.10 look like good candidates).

python-mpv is fairly agile w.r.t libmpv versions, but beyond +/- 2 years it's a bit difficult. The specific feature that's the issue here, render contexts, was introduced in mpv v0.33.0 on Feb 28, 2018 and added to python-mpv in v0.5.2 on Jul 25 2021. I don't yet stick explicit compatibility notes on the releases because usually things just work (TM) and I don't currently have the infrastructure to do efficient cross-testing.

Have a nice week :)

jaseg avatar Dec 15 '20 08:12 jaseg

Thank you for the reply, yes i suspected the issue was there, do you think if i take the latest version of mpv from their github and compile it manually it will work with the latest version of python-mpv ?

A good practice for future versions of python-mpv would be to have a compatibility table somewhere in the readme or wiki for each version, it would be very usefull when setting up to know which version targets which, even if its just breaking changes.

Cheers :)

nhamilakis avatar Dec 15 '20 11:12 nhamilakis

Thanks for your feedback. I'll try to put together some compatibility tracking when I have the time.

The latest upstream mpv version should work with the latest python-mpv version. If it doesn't, please open another issue :)

jaseg avatar Dec 15 '20 12:12 jaseg