jaseg / python-mpv

Python interface to the awesome mpv media player
https://git.jaseg.de/python-mpv.git
Other
554 stars 69 forks source link

High CPU usage on linux vo=vdpau #71

Closed outi closed 6 years ago

outi commented 6 years ago

I'm hogh CPU usage ~80% using vdpau output (and any other too). Standalone mpv is using less than 10%... Any ideas? Can it be related to the event loop? see here: https://github.com/gnome-mpv/gnome-mpv/commit/158f259d99b72f2e886f4d85bc174b7bb62315a9

jaseg commented 6 years ago

The event loop is handled using mpv_wait_event. The only way that could cause high CPU load is if you have a very large amount of events going through. To reproduce your problem I'd need at least some sample code and a sample file.

marcin-koziol-iteo commented 6 years ago

After more tries I've noticed that mpv is losing "GLX context" after several playbacks and turned to software decoding, so I moved to vlc...

jaseg commented 6 years ago

Hmpf... sorry about that, I hope VLC works better for you. In the end it's unlikely I could have helped you since what you describe very much sounds like a problem deep in the bowels of libmpv. The principal ways of debugging this would be to

  1. Make super sure it's loading the correct libmpv and that libmpv is up-to-date, and make sure libmpv is the same version as the mpv command
  2. Turn on extensive logging with mpv.MPV(loglevel='debug', log_handler=print, ...) and go through these logs line by line, comparing them to logs produced by the command line mpv.