ripose-jp / Memento

An mpv-based video player for studying Japanese
https://ripose-jp.github.io/Memento/
GNU General Public License v2.0
472 stars 22 forks source link

Jellyfin mpv shim? #217

Closed Huzwif2 closed 2 months ago

Huzwif2 commented 5 months ago

Id like to stream jellyfin content using the memento client is that possible?

ripose-jp commented 5 months ago

I don't know, but it's beyond the scope of this project at least. I'd read the documentation for the Jellyfin mpv Shim to see if it's possible. This section looks like it's the one you care about.

xrishox commented 2 months ago

i would really like to be able to use memento with jellyfin. i've used jellyfin-mpv-shim by itself and with other mpv based clients and it works fine. when i try to use it with this it doesn't work. i understand having jellyfin support being out of scope for this project, but being able to work with the mpv shim would be really awesome.

ripose-jp commented 2 months ago

Setting up a Jellyfin server with the shim so I can test looks like quite a bit of work. Could you provide me some more details on what your configuration is and what Memento's console output is so I can get a better idea of why it isn't working?

xrishox commented 2 months ago
2024-07-08 02:09:17,697 [ WARNING] mpv-jsonipc: MPV start failed.
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/python_mpv_jsonipc.py", line 430, in __init__
    self.mpv_process = MPVProcess(ipc_socket, mpv_location, **kwargs)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/python_mpv_jsonipc.py", line 250, in __init__
    raise MPVError("MPV start timed out.")
python_mpv_jsonipc.MPVError: MPV start timed out.

(memento:4480): dbind-WARNING **: 02:09:17.830: Couldn't connect to accessibility bus: Failed to connect to socket /run/user/1000/at-spi/bus_0: No such file or directory

is the error i am getting. i'm on arch using memento and jellyfin-mpv-shim from the aur.

    "mpv_ext": true,
    "mpv_ext_ipc": null,
    "mpv_ext_no_ovr": false,
    "mpv_ext_path": "/usr/bin/memento",
    "mpv_ext_start": true,
    "mpv_log_level": "info",

is how i have it configured in jellyfin-mpv-shim's "conf.json"

if i change it to this:

    "mpv_ext": true,
    "mpv_ext_ipc": null,
    "mpv_ext_no_ovr": false,
    "mpv_ext_path": "/usr/bin/mpv",
    "mpv_ext_start": true,
    "mpv_log_level": "info",

which would not be using the mpv that ships with jellyfin-mpv-shim but the one that comes with arch it works as is expected.

i have a bit of a strange setup right now so i'll try with a more standard setup to see if i can get it working. thanks for giving it some attention!

edit 1: if you are trying to get the shim working at all you should be able to run it and connect it as is. when you want to connect memento (or another mpv client) you change the mpv_ext settings in the conf file. for some clients to work it requires disabling "mpv_ext_start". if you do that then you need to launch it manually.

ashirogisensei commented 2 months ago

I just wanted to add that I'm also very interested in this as a feature as I use jellyfin often. I'd be willing to donate if this could be made into a feature. It tracks your progress, has a really nice interface, I like it a lot.

Either way thanks!

ripose-jp commented 2 months ago

Entirely speculation at this point since I haven't set up Jellyfin to test this, but it looks like the cause is due to how Memento handles command line options. Currently it's set up to pass each command line option to each file individually in the loadfile arguments. This is fine when you're using Memento normally by passing in a file as an argument. This falls apart when there is no file as an argument since the options never modify behavior.

From what I can tell, the Jellyfin shim works using the --input-ipc-server and --idle arguments, with the first one being particularly important. Memento should probably apply those arguments regardless of whether or not a file is loaded, instead of how its currently doing it so issues like this don't crop up.

If you'd be willing, could you change your Jellyfin shim config to

    "mpv_ext": true,
    "mpv_ext_ipc": "/tmp/jellyfin-memento-sock",
    "mpv_ext_no_ovr": false,
    "mpv_ext_path": "/usr/bin/memento",
    "mpv_ext_start": false,
    "mpv_log_level": "info",

and add the following lines to Memento's mpv.conf?

input-ipc-server=/tmp/jellyfin-memento-sock
idle=yes

You'll have to manually open up Memento, but if I'm correct this should workaround the issue. @xrishox Let me know if this works for you. If it does, it means I'm right about the issue and I can work on a more permanent fix.

I'd be willing to donate if this could be made into a feature.

I don't accept money because I don't ever want to be obligated to work on Memento. The fastest way to get new features in is to make a PR.

xrishox commented 2 months ago
cat ./.config/jellyfin-mpv-shim/conf.json | grep mpv_ext
    "mpv_ext": true,
    "mpv_ext_ipc": "/tmp/jellyfin-memento-sock",
    "mpv_ext_no_ovr": false,
    "mpv_ext_path": "/usr/bin/memento",
    "mpv_ext_start": false,
 cat ./.config/memento/mpv.conf 
input-ipc-server=/tmp/jellyfin-memento-sock
idle=yes

i set logs to debug

jellyfin-mpv-shim 
2024-07-08 07:44:18,162 [    INFO] player: Using external mpv playback backend.
2024-07-08 07:44:18,173 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-08 07:44:18,173 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-08 07:44:18,173 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-08 07:44:18,173 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-08 07:44:18,173 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-08 07:44:18,194 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-08 07:44:18,194 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-08 07:44:18,205 [   ERROR] pystray._base: Failed to dock icon
Traceback (most recent call last):
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/pystray/_xorg.py", line 162, in _update_icon
    self._assert_docked()
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/pystray/_xorg.py", line 395, in _assert_docked
    assert self._systray_manager
AssertionError
2024-07-08 07:44:18,206 [   ERROR] pystray._base: Failed to dock icon
Traceback (most recent call last):
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/pystray/_xorg.py", line 143, in _show
    self._assert_docked()
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/pystray/_xorg.py", line 395, in _assert_docked
    assert self._systray_manager
AssertionError
2024-07-08 07:44:18,208 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-08 07:44:18,208 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://10.0.0.210:8096/socket?api_key=REDACTED&device_id=4e87d106-6631-455c-96bb-7e9485427baa
2024-07-08 07:44:18,224 [    INFO] websocket: Websocket connected
2024-07-08 07:44:18,225 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-08 07:44:18,468 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-08 07:44:21,485 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
2024-07-08 07:44:21,496 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
--<[ session/131249571035216 ]
2024-07-08 07:44:21,497 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/131249571035216 ]
2024-07-08 07:44:21,498 [ WARNING] clients: Partially connected. Retrying 1/3.
2024-07-08 07:44:22,499 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-08 07:44:22,499 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-08 07:44:22,500 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-08 07:44:22,500 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-08 07:44:22,500 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-08 07:44:22,518 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-08 07:44:22,518 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-08 07:44:22,530 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-08 07:44:22,531 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://10.0.0.210:8096/socket?api_key=REDACTED&device_id=4e87d106-6631-455c-96bb-7e9485427baa
2024-07-08 07:44:22,549 [    INFO] websocket: Websocket connected
2024-07-08 07:44:22,550 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-08 07:44:22,556 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-08 07:44:25,571 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
2024-07-08 07:44:25,587 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
--<[ session/131249571490224 ]
2024-07-08 07:44:25,587 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/131249571490224 ]
2024-07-08 07:44:25,588 [ WARNING] clients: Partially connected. Retrying 2/3.
2024-07-08 07:44:26,589 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-08 07:44:26,590 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-08 07:44:26,590 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-08 07:44:26,590 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-08 07:44:26,590 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-08 07:44:26,621 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-08 07:44:26,621 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-08 07:44:26,639 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-08 07:44:26,640 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://10.0.0.210:8096/socket?api_key=REDACTED&device_id=4e87d106-6631-455c-96bb-7e9485427baa
2024-07-08 07:44:26,668 [    INFO] websocket: Websocket connected
2024-07-08 07:44:26,668 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-08 07:44:26,676 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-08 07:44:29,691 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
2024-07-08 07:44:29,705 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
--<[ session/131249571494064 ]
2024-07-08 07:44:29,705 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/131249571494064 ]
2024-07-08 07:44:29,706 [ WARNING] clients: Partially connected. Retrying 3/3.
2024-07-08 07:44:30,707 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-08 07:44:30,707 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-08 07:44:30,707 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-08 07:44:30,708 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-08 07:44:30,708 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-08 07:44:30,724 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-08 07:44:30,724 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-08 07:44:30,737 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-08 07:44:30,737 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://10.0.0.210:8096/socket?api_key=REDACTED&device_id=4e87d106-6631-455c-96bb-7e9485427baa
2024-07-08 07:44:30,756 [    INFO] websocket: Websocket connected
2024-07-08 07:44:30,756 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-08 07:44:30,766 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-08 07:44:33,783 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
--<[ session/131249501938512 ]
2024-07-08 07:44:33,794 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/131249501938512 ]
2024-07-08 07:44:33,799 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
memento
Cannot load libcuda.so.1
Error from org.freedesktop.ScreenSaver "Object does not exist at path “/org/freedesktop/ScreenSaver”"
qt.qpa.wayland.textinput: virtual void QtWaylandClient::QWaylandTextInputv3::zwp_text_input_v3_leave(wl_surface*) Got leave event for surface 0x0 focused surface 0x5ac60e676d00

when memento isn't running it fails in a different way:

jellyfin-mpv-shim 
2024-07-08 09:04:21,044 [    INFO] player: Using external mpv playback backend.
Traceback (most recent call last):
  File "/home/anonymous/miniconda3/envs/jelly/bin/jellyfin-mpv-shim", line 8, in <module>
    sys.exit(main())
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/jellyfin_mpv_shim/mpv_shim.py", line 71, in main
    from .player import playerManager
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/jellyfin_mpv_shim/player.py", line 1165, in <module>
    playerManager = PlayerManager()
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/jellyfin_mpv_shim/player.py", line 205, in __init__
    self._player = mpv.MPV(
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/python_mpv_jsonipc.py", line 438, in __init__
    self.mpv_inter = MPVInter(ipc_socket, self._callback, self._quit_callback)
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/python_mpv_jsonipc.py", line 294, in __init__
    self.socket = Socket(ipc_socket, self.event_callback, self.quit_callback)
  File "/home/anonymous/miniconda3/envs/jelly/lib/python3.10/site-packages/python_mpv_jsonipc.py", line 141, in __init__
    self.socket.connect(self.ipc_socket)
ConnectionRefusedError: [Errno 111] Connection refused

so at the bare minimum it at least seems to be recognizing and seeing memento it is just failing to make a consistent connection?

2024-07-08 07:44:21,498 [ WARNING] clients: Partially connected. Retrying 1/3.

seems to indicate this as well

xrishox commented 2 months ago

I was able to get it working using the flatpak version of jellyfin-mpv-shim and the flatpak of memento. I enabled access to /tmp for both using flatseal. this is the configuration I used for both:

    "mpv_ext": true,
    "mpv_ext_ipc": "/tmp/sock",
    "mpv_ext_no_ovr": false,
    "mpv_ext_path": null,
    "mpv_ext_start": false,
    "mpv_log_level": "debug",

i don't need to have the path for the player to be listed since all of the communication is done over ipc. I just first launched memento then launched jellyfin-mpv-shim.

this is my memento mpv.conf

input-ipc-server=/tmp/sock
idle=yes

so it does in fact sound like you were correct with what you were thinking. i suspect the issue i was running into with the last post was a problem with how the aur was installing it or a dependency issue or something. whereas flatpak deterministically installs it perfectly with all dependencies.

though since i can only get it working over flatpak i can't imagine any changes you would do on your end would make it any more accessible, since i suspect the only way it would be possible for the 2 to communicate this way would be by manually setting up an ipc connection.

though whatever you think your fix might be might be useful for people on windows or macos.

ripose-jp commented 2 months ago

Thank you for putting in the work to figure it out and test it. I can't comment yet on why the Flatpak version works with IPC but the AUR version doesn't, but I'd suspect it's probably some configuration issue somewhere. I doubt dependencies play much of a role unless there's a bug in one of them. I'll proceed with the straightforward solution of passing configuration options straight to mpv before initialization and hopefully that will fix this bug. If I get the time, I'll spin up a VM and figure out what's up with AUR version.

ripose-jp commented 2 months ago

I've pushed a fix to master. @xrishox If you're able, could you test it with your original config?

xrishox commented 2 months ago

i should be able to check it out tomorrow. what configuration should i test it with? still having all of the ipc stuff?

ripose-jp commented 2 months ago

Your originally config. It should hopefully work.

    "mpv_ext": true,
    "mpv_ext_ipc": null,
    "mpv_ext_no_ovr": false,
    "mpv_ext_path": "/usr/bin/memento",
    "mpv_ext_start": true,
    "mpv_log_level": "info",
xrishox commented 2 months ago

compiled memento myself and then installed jms from the aur and ran it. memento launched as expected but had an issue connecting to jms. it seems to be the same error as before.

jellyfin-mpv-shim 
2024-07-09 18:46:33,409 [    INFO] player: Using external mpv playback backend.
Gtk-Message: 18:46:33.505: Failed to load module "canberra-gtk-module"
Gtk-Message: 18:46:33.506: Failed to load module "canberra-gtk-module"
Error from org.freedesktop.ScreenSaver "The name is not activatable"
2024-07-09 18:46:34,114 [   ERROR] menu: Could not load profile manager.
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/jellyfin_mpv_shim/menu.py", line 79, in __init__
    self.profile_manager = VideoProfileManager(self, player_manager, player)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jellyfin_mpv_shim/video_profile.py", line 66, in __init__
    raise FileNotFoundError("Could not find default shader pack.")
FileNotFoundError: Could not find default shader pack.
2024-07-09 18:46:34,119 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-09 18:46:34,119 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-09 18:46:34,119 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-09 18:46:34,119 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-09 18:46:34,119 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-09 18:46:34,132 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-09 18:46:34,132 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-09 18:46:34,143 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-09 18:46:34,143 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://nas:8096/socket?api_key=REDACTED&device_id=afab6c2b-55e2-4135-8213-221d0853db82
2024-07-09 18:46:34,186 [    INFO] websocket: Websocket connected
Gtk-Message: 18:46:34.186: Failed to load module "canberra-gtk-module"
2024-07-09 18:46:34,187 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-09 18:46:34,256 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-09 18:46:37,281 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
--<[ session/140364487151680 ]
2024-07-09 18:46:37,292 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/140364487151680 ]
2024-07-09 18:46:37,292 [ WARNING] clients: Partially connected. Retrying 1/3.
2024-07-09 18:46:37,293 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
2024-07-09 18:46:38,293 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-09 18:46:38,293 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-09 18:46:38,293 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-09 18:46:38,293 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-09 18:46:38,293 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-09 18:46:38,336 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-09 18:46:38,336 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-09 18:46:38,352 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-09 18:46:38,353 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://nas:8096/socket?api_key=REDACTED&device_id=afab6c2b-55e2-4135-8213-221d0853db82
2024-07-09 18:46:38,376 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-09 18:46:38,437 [    INFO] websocket: Websocket connected
2024-07-09 18:46:38,438 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-09 18:46:41,412 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
2024-07-09 18:46:41,427 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
--<[ session/140364490759712 ]
2024-07-09 18:46:41,427 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/140364490759712 ]
2024-07-09 18:46:41,427 [ WARNING] clients: Partially connected. Retrying 2/3.
2024-07-09 18:46:42,428 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-09 18:46:42,428 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-09 18:46:42,428 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-09 18:46:42,428 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-09 18:46:42,428 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-09 18:46:42,442 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-09 18:46:42,442 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-09 18:46:42,454 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-09 18:46:42,454 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://nas:8096/socket?api_key=REDACTED&device_id=afab6c2b-55e2-4135-8213-221d0853db82
2024-07-09 18:46:42,467 [    INFO] websocket: Websocket connected
2024-07-09 18:46:42,467 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-09 18:46:42,469 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-09 18:46:45,478 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
--<[ session/140364460190432 ]
2024-07-09 18:46:45,491 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/140364460190432 ]
2024-07-09 18:46:45,491 [ WARNING] clients: Partially connected. Retrying 3/3.
2024-07-09 18:46:45,492 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
2024-07-09 18:46:46,492 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-09 18:46:46,492 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-09 18:46:46,492 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-09 18:46:46,492 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-09 18:46:46,492 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-09 18:46:46,504 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-09 18:46:46,504 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-09 18:46:46,514 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-09 18:46:46,515 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://nas:8096/socket?api_key=REDACTED&device_id=afab6c2b-55e2-4135-8213-221d0853db82
2024-07-09 18:46:46,525 [    INFO] websocket: Websocket connected
2024-07-09 18:46:46,526 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-09 18:46:46,531 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-09 18:46:49,541 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
2024-07-09 18:46:49,558 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
--<[ session/140364460046816 ]
2024-07-09 18:46:49,558 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/140364460046816 ]

then i tried uninstalling jms from the aur and installing it from conda/pip and its seemingly the same issue.

jellyfin-mpv-shim 
2024-07-09 18:49:52,541 [    INFO] player: Using external mpv playback backend.
Gtk-Message: 18:49:52.640: Failed to load module "canberra-gtk-module"
Gtk-Message: 18:49:52.641: Failed to load module "canberra-gtk-module"
Error from org.freedesktop.ScreenSaver "The name is not activatable"
2024-07-09 18:49:53,759 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-09 18:49:53,759 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-09 18:49:53,759 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-09 18:49:53,759 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-09 18:49:53,759 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-09 18:49:53,817 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-09 18:49:53,817 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-09 18:49:53,878 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-09 18:49:53,879 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://nas:8096/socket?api_key=REDACTED&device_id=afab6c2b-55e2-4135-8213-221d0853db82
2024-07-09 18:49:53,911 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-09 18:49:53,920 [    INFO] websocket: Websocket connected
2024-07-09 18:49:53,920 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-09 18:49:56,921 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
--<[ session/140286231509840 ]
2024-07-09 18:49:56,930 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/140286231509840 ]
2024-07-09 18:49:56,931 [ WARNING] clients: Partially connected. Retrying 1/3.
2024-07-09 18:49:56,931 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
2024-07-09 18:49:57,931 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-09 18:49:57,932 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-09 18:49:57,932 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-09 18:49:57,932 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-09 18:49:57,932 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-09 18:49:57,945 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-09 18:49:57,945 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-09 18:49:57,964 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-09 18:49:57,964 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://nas:8096/socket?api_key=REDACTED&device_id=afab6c2b-55e2-4135-8213-221d0853db82
2024-07-09 18:49:57,974 [    INFO] websocket: Websocket connected
2024-07-09 18:49:57,975 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-09 18:49:57,981 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-09 18:50:00,998 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
--<[ session/140286232186112 ]
2024-07-09 18:50:01,016 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/140286232186112 ]
2024-07-09 18:50:01,016 [ WARNING] clients: Partially connected. Retrying 2/3.
2024-07-09 18:50:01,017 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
2024-07-09 18:50:02,017 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-09 18:50:02,018 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-09 18:50:02,018 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-09 18:50:02,018 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-09 18:50:02,018 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-09 18:50:02,031 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-09 18:50:02,032 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-09 18:50:02,039 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-09 18:50:02,039 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://nas:8096/socket?api_key=REDACTED&device_id=afab6c2b-55e2-4135-8213-221d0853db82
2024-07-09 18:50:02,050 [    INFO] websocket: Websocket connected
2024-07-09 18:50:02,050 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-09 18:50:02,053 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-09 18:50:05,066 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
--<[ session/140286232197632 ]
2024-07-09 18:50:05,078 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/140286232197632 ]
2024-07-09 18:50:05,078 [ WARNING] clients: Partially connected. Retrying 3/3.
2024-07-09 18:50:05,079 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
2024-07-09 18:50:06,080 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin connect
2024-07-09 18:50:06,080 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: Begin getAvailableServers
2024-07-09 18:50:06,080 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: connect has 1 servers
2024-07-09 18:50:06,080 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: begin connect_to_server
2024-07-09 18:50:06,080 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info/public
2024-07-09 18:50:06,094 [    INFO] JELLYFIN.jellyfin_apiclient_python.connection_manager: calling onSuccessfulConnection with server fedora
2024-07-09 18:50:06,094 [    INFO] JELLYFIN.jellyfin_apiclient_python.api: Sending get request to system/info
2024-07-09 18:50:06,104 [    INFO] JELLYFIN.jellyfin_apiclient_python.client: User is authenticated.
2024-07-09 18:50:06,104 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: Websocket url: ws://nas:8096/socket?api_key=REDACTED&device_id=afab6c2b-55e2-4135-8213-221d0853db82
2024-07-09 18:50:06,118 [    INFO] websocket: Websocket connected
2024-07-09 18:50:06,118 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: --->[ websocket ]
2024-07-09 18:50:06,121 [    INFO] clients: Not connected yet, waiting 3 seconds...
2024-07-09 18:50:09,134 [ WARNING] clients: Client is not actually connected. (It does not show in the client list.)
2024-07-09 18:50:09,148 [    INFO] JELLYFIN.jellyfin_apiclient_python.ws_client: ---<[ websocket ]
--<[ session/140286232193648 ]
2024-07-09 18:50:09,149 [    INFO] Jellyfin.jellyfin_apiclient_python.http: --<[ session/140286232193648 ]

i'm suspecting that the issue may be with my computer/setup rather than something on your end. i may try setting it up in a windows vm or and ubuntu vm and see if i have any better luck.

ripose-jp commented 2 months ago

You could give this issue a look over https://github.com/jellyfin/jellyfin-mpv-shim/issues/390. From Memento's side, this issue is probably solved, but I leave this open a little long until something more definitive comes along. Thanks for your help.

ghanemahmed commented 2 months ago

Hello, I have been following this thread and tested it with the recent commit. It works as expected with the default config

    "mpv_ext": true,
    "mpv_ext_ipc": null,
    "mpv_ext_no_ovr": false,
    "mpv_ext_path": "/usr/local/bin/memento",
    "mpv_ext_start": true,
    "mpv_log_level": "info",

mentioned earlier.

xrishox commented 2 months ago

hey thanks for the info! yeah it seems there is an issue on my side. i'll keep messing with it. makes me feel a lot better seeing that someone else had things work as expected though.