kanishka-linux / kawaii-player

Multimedia player, media library manager and portable media server with PC-To-PC casting feature.
GNU General Public License v3.0
617 stars 44 forks source link

Kawaii-Player doesn't play nice (or work at all) with Ubuntu 20.04 #25

Closed KINGCorgi closed 3 years ago

KINGCorgi commented 4 years ago

I noticed this upon a fresh install of Ubuntu running the most recent Ubuntu version. It seems that Kawaii Player doesn't work well with 20.04. Screenshot from 2020-05-06 19-44-41

That is all that is shown when I try and run any file. Doesn't have to be an .mkv,, mp4 also doesn't work.

EDIT: I forgot to mention, I installed this via .deb which in Ubuntu relies on the Ubuntu's flavor Software "store(?)".

kanishka-linux commented 4 years ago

Hi, can you mention following details?

opengl-render is the latest render api of mpv.. So kawaii-player/mpv combo will work best if using opengl-render.

In order to use opengl-render, one will need to install pympv. After that, set up libmpv as backend then change libmpv api from settings -> player -> libmpv api -> opengl-render. then restart the player.. If there is some problem, try removing config directory ~/.config/kawaii-player , (before removing, make sure to backup directory, if you've saved some important settings in the past), after that restart the player .

Kodehawa commented 4 years ago

I'm having the same issue under Arch Linux, sadly. (Tried using mpv and libmpv, libmpv crashes fully) image (See the "stop" button, it should be playing, and I pressed play!)

I've had the following crashes:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/kawaii_player/guisignals.py", line 220, in wrapper
    func(*args, **kargs)
  File "/usr/lib/python3.8/site-packages/kawaii_player/kawaii_player.py", line 3785, in playerPlayPause
    id_w = eval(p1)
  File "<string>", line 1, in <module>
AttributeError: 'Ui_MainWindow' object has no attribute 'label_epn_0'
fish: “kawaii-player” terminated by signal SIGABRT (Abort)
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/kawaii-player", line 33, in <module>
    sys.exit(load_entry_point('kawaii-player==4.2.0', 'gui_scripts', 'kawaii-player')())
  File "/usr/lib/python3.8/site-packages/kawaii_player/kawaii_player.py", line 14800, in main
    ui.setup_opengl_widget(app)
  File "/usr/lib/python3.8/site-packages/kawaii_player/kawaii_player.py", line 13337, in setup_opengl_widget
    self.tab_5 = MpvOpenglWidget(MainWindow, self, logger, TMPDIR, libmpv_api, app)
  File "/usr/lib/python3.8/site-packages/kawaii_player/mpv_opengl.py", line 351, in __init__
    self.init_opengl_cb()
  File "/usr/lib/python3.8/site-packages/kawaii_player/mpv_opengl.py", line 439, in init_opengl_cb
    self.mpv = MPV(**self.default_args)
  File "/usr/lib/python3.8/site-packages/kawaii_player/mpv_bak.py", line 616, in __init__
    _mpv_set_option_string(self.handle, k.replace('_', '-').encode('utf-8'), istr(v).encode('utf-8'))
  File "/usr/lib/python3.8/site-packages/kawaii_player/mpv_bak.py", line 104, in raise_for_ec
    raise ex(ec, *args)
AttributeError: ('mpv option does not exist', -5, (<MpvHandle object at 0x7f73941968c0>, b'cache-default', b'100000'))

(MPV and pympv are installed) Loading a video yields no results, all I get in a terminal (when it works-ish) it's

Could not parse stylesheet of object QLineProgress(0x55fcb8922230)
True update_playlist_thumb
426 --max--width--label--
426 --max--width--label--
426 --max--width--label--

There's a flash of a video trying to play on another screen. Disconnecting all screens but the main one makes a flash of a video appear when attempting to play a file but nothing more.

Previews appear in another screen: image

The local share doesn't seem to work either. Setting the IP makes it reset to a completely different IP when I click "check IP", which makes no sense.

Really, I couldn't get a single thing to work :( Also, using the System theme doesn't respect Kvantum style theming and tries to use Fusion instead, which doesn't fit with the rest of the system at all...

kanishka-linux commented 4 years ago

Hey sorry folks, lately I've not been able to give enough attention to how kawaii-player is working in latest distro updates. Will try to look at it in weekends.

kanishka-linux commented 4 years ago

if possible try installing pympv, for getting libmpv to work.. and change render engine to opengl-render .

Kodehawa commented 4 years ago

if possible try installing pympv, for getting libmpv to work.. and change render engine to opengl-render .

No luck :(

kanishka-linux commented 4 years ago

Finally, I opened my Arch box after some long time, and surprisingly found that kawaii-player refused to open up (No GUI), giving up segmentation fault message. :)

I uninstalled everything related to pyqt5 from arch linux repo sudo pacman -nRcs python-pyqt5

After that installed all dependencies using pip

sudo pip3 install PyQt5 pycurl bs4 Pillow mutagen lxml PyQtWebEngine PyOpenGL

Note: use sudo only if you want to install package system-wide, use carefully

also add PyOpenGL-accelerate to the list of dependecies, and then everything started working.

Don't use above method, if GUI is working fine atleast. It is preferable to use only system level package manager like pacman to install dependencies. Use pip3 only as a last resort.

After that, take the latest pull, (some mpv options have been outdated) and build package from it..

the error that you've posted

AttributeError: ('mpv option does not exist', -5, (<MpvHandle object at 0x7f73941968c0>, b'cache-default', b'100000'))

says that cache-default option has been removed. It is possible that some other options might have also been removed. so delete or backup ~/.config/kawaii-player directory as ~/.config/kawaii-player-backup , so as to avoid any conflict with old/new settings.

Now open the application and set config options properly.

Now everything is working on my system.

In More->Preferences->Config : consider removing all deprecated options before using that config tab. for example cache-default has been deprecated so comment it out. most probably video-aspect has also been deprecated.

Once everything is working, carefully copy all older configs from ~/.config/kawaii-player-backup to original config folder.

I guess, it should help in some way atleast :)

Kodehawa commented 4 years ago

imo that's not a reasonable solution (installing stuff from pip), but if it works that's pretty okie.

BTW. Try using Kvantum, seems like if you use the System theme, it tries to use Fusion instead of the system-wide Qt widget theme (this on KDE tho)

kanishka-linux commented 4 years ago

yeah.. sure.. Using pip is the last thing I want to try on any linux box for installing dependencies.

But in your case, it seems like you are already able to open up GUI without any problem, so you won't have to install anything using pip.

I think, you only have playback issue.. I've pushed some changes, removing some default options. So building from latest source and following rest of the steps mentioned in above post (i.e removing config directory and changing some preferences), might solve the issue.

About theming, I haven't tried Kvantum.. I normally test with default available themes, if it is there in default system themes of KDE, will try to look into it if possible.

kanishka-linux commented 3 years ago

closing this, latest version seems to be working fine. Many issues fixed with mpv/libmpv and added support for input_ipc_server when using binary - which should work on most linux based systems.