Package Details: jellyfin-mpv-shim 2.0.2-1

Git Clone URL: https://aur.archlinux.org/jellyfin-mpv-shim.git (read-only, click to copy)
Package Base: jellyfin-mpv-shim
Description: Cast media from Jellyfin Mobile and Web apps to MPV
Upstream URL: https://github.com/jellyfin/jellyfin-mpv-shim
Licenses: MIT
Submitter: kruzah
Maintainer: kruzah
Last Packager: kruzah
Votes: 11
Popularity: 1.69
First Submitted: 2020-04-01 14:52 (UTC)
Last Updated: 2021-12-29 16:10 (UTC)

Dependencies (14)

Required by (0)

Sources (1)

Latest Comments

kekonn commented on 2022-06-24 20:51 (UTC)

This is actually out of date now: https://github.com/jellyfin/jellyfin-mpv-shim/releases/tag/v2.2.0

kruzah commented on 2021-12-20 18:03 (UTC)

Another tip you might want in that case, if you use yay, is pacman -Qqo /usr/lib/python3.9 | yay -S -. The q flag in Qqo prints only the package names and nothing else, and you can pipe that list into yay and make yay install packages from stdin. Now you don't have to type out all of the names of the packages either :-)

l4kr commented on 2021-12-18 14:58 (UTC)

@kruzah this magic worked, thanks!

chrisqq commented on 2021-12-18 14:52 (UTC)

@kruzah that is a nifty little trick I am going to be keeping in my back pocket going forward. Thanks, that sorted it.

kruzah commented on 2021-12-18 14:14 (UTC)

@chrisqq There may be other old Python packages that are out of date, or dependences of dependencies. Run pacman -Qo /usr/lib/python3.9 and do a clean build and reinstall of all the packages that show up.

chrisqq commented on 2021-12-17 22:13 (UTC)

@GGJamie I tried that then tried again with your example (and corrected hellyfin to jellyfin) and I still get the same error. I also did a cleanbuild of all the l isted dependencies

NGGJamie commented on 2021-12-15 22:51 (UTC) (edited on 2022-03-20 11:14 (UTC) by NGGJamie)

To fix the recent errors, you have to cleanbuild the python dependencies for the newest version of python. So, if you're using yay for example, yay -S --answerclean All python-mpv-jsonipc python-jellyfin-apiclient python-setuptools as well as any optional python libraries you're using.

chrisqq commented on 2021-12-15 05:00 (UTC) (edited on 2021-12-15 05:03 (UTC) by chrisqq)

Hi I am also getting an error, it's slightly different than l4kr's error:

Traceback (most recent call last):
  File "/usr/bin/jellyfin-mpv-shim", line 33, in <module>
    sys.exit(load_entry_point('jellyfin-mpv-shim==2.0.1', 'console_scripts', 'jellyfin-mpv-shim')())
  File "/usr/bin/jellyfin-mpv-shim", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 919, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 518, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for jellyfin-mpv-shim

l4kr commented on 2021-12-14 16:51 (UTC) (edited on 2021-12-14 16:52 (UTC) by l4kr)

Hi, I'm getting these lines when running jellyfin-mpv-shim:

Traceback (most recent call last):
File "/usr/bin/jellyfin-mpv-shim", line 33, in <module>
sys.exit(load_entry_point('jellyfin-mpv-shim==2.0.1', 'console_scripts', 'jellyfin-mpv-shim')())
File "/usr/bin/jellyfin-mpv-shim", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/jellyfin_mpv_shim/mpv_shim.py", line 11, in <module>
from .clients import clientManager
File "/usr/lib/python3.10/site-packages/jellyfin_mpv_shim/clients.py", line 1, in <module>
from jellyfin_apiclient_python import JellyfinClient
ModuleNotFoundError: No module named 'jellyfin_apiclient_python'

kruzah commented on 2021-03-13 21:00 (UTC)

@sseneca Looks like an issue with the python-pydantic dependency. I checked the change history on that package, and it seems that the maintainers picked up on that a few hours after your post, so it should be fixed now.

sseneca commented on 2021-03-13 09:40 (UTC) (edited on 2021-03-13 09:40 (UTC) by sseneca)

I suddenly started getting this error today:

Traceback (most recent call last):
  File "/usr/bin/jellyfin-mpv-shim", line 33, in <module>
    sys.exit(load_entry_point('jellyfin-mpv-shim==1.8.1', 'console_scripts', 'jellyfin-mpv-shim')())
  File "/usr/bin/jellyfin-mpv-shim", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/jellyfin_mpv_shim/mpv_shim.py", line 9, in <module>
    from . import i18n
  File "/usr/lib/python3.9/site-packages/jellyfin_mpv_shim/i18n.py", line 4, in <module>
    from .conf import settings
  File "/usr/lib/python3.9/site-packages/jellyfin_mpv_shim/conf.py", line 9, in <module>
    from pydantic import BaseModel
  File "/usr/lib/python3.9/site-packages/pydantic/__init__.py", line 2, in <module>
    from . import dataclasses
  File "/usr/lib/python3.9/site-packages/pydantic/dataclasses.py", line 3, in <module>
    from .class_validators import gather_all_validators
  File "/usr/lib/python3.9/site-packages/pydantic/class_validators.py", line 8, in <module>
    from .errors import ConfigError
  File "/usr/lib/python3.9/site-packages/pydantic/errors.py", line 5, in <module>
    from .typing import display_as_type
  File "/usr/lib/python3.9/site-packages/pydantic/typing.py", line 23, in <module>
    from typing_extensions import Annotated, Literal
ModuleNotFoundError: No module named 'typing_extensions'

Installing python-typing_extensions fixed this for me, so if others are having it this issue it should be added to depends

kruzah commented on 2021-01-07 13:41 (UTC) (edited on 2021-01-07 13:42 (UTC) by kruzah)

Thanks @triatk. The issue appears to be python-pystray missing gobject as a dependency - I've forwarded the report to that package's maintainer, hopefully that should fix the dependency issue.

The blue screen issue is tracked upstream in this issue. It appears to be caused by graphics backend problems or something being broken in libmpv1 on KDE. Possible fixes include setting mpv_ext to true in Jellyfin MPV Shim's config file, or switching graphics renderer from OpenGL to Vulkan. You could check the linked issue and see if any of the solutions work for you.

triatk commented on 2021-01-04 08:53 (UTC) (edited on 2021-01-08 16:55 (UTC) by triatk)

@kruzah without gobject, the systray wont show under KDE, the video playback is normal. after install it, the systray is working but the video playback is bluescreen.

2021-01-04 09:50:39,381 [    INFO] conf: Loaded settings from json: 
    /home/xavier/.config/jellyfin-mpv-shim/conf.json
    2021-01-04 09:50:39,481 [    INFO] player: Using libmpv1 playback backend.
    Exception in thread Thread-4:
    Traceback (most recent call last):
      File "/usr/lib/python3.9/threading.py", line 954, in bootstrap_inner
        self.run()
      File "/usr/lib/python3.9/site-packages/jellyfin_mpv_shim/gui_mgr.py", line 179, in 
    run
        self.queue = Queue()
      File "/usr/lib/python3.9/multiprocessing/context.py", line 102, in Queue
        from .queues import Queue
    ImportError: cannot import name 'Queue' from partially initialized module 
    'multiprocessing.queues' (most likely due to a circular import) 
    (/usr/lib/python3.9/multiprocessing/queues.py)
    Process STrayProcess-1:
    Traceback (most recent call last):
      File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
        self.run()
      File "/usr/lib/python3.9/site-packages/jellyfin_mpv_shim/gui_mgr.py", line 439, in 
    run
        from pystray import Icon, MenuItem, Menu
      File "/usr/lib/python3.9/site-packages/pystray/__init__.py", line 48, in <module>
        Icon = backend().Icon
      File "/usr/lib/python3.9/site-packages/pystray/__init__.py", line 40, in backend
        return importlib.import_module(__package__ + '.' + module)
      File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "/usr/lib/python3.9/site-packages/pystray/_appindicator.py", line 19, in 
    <module>
        gi.require_version('Gtk', '3.0')
    AttributeError: module 'gi' has no attribute 'require_version'
Update: Thanks @kruzah. After the python-pystray update, the systray is working and after edit the config mpv_ext to true, the video playback is back to normal now.

kruzah commented on 2020-12-15 20:23 (UTC)

@triatk Could you post the full stack trace from Python? I cannot test without python-gobject because too many of my installed packages depend on it. Upstream does not specify it as a dependency, and it is listed as an optdepend for this package's dependency python-pywebview already. Said dependency should be usable without python-gobject if its Qt optdepends are installed instead.

kruzah commented on 2020-12-15 20:18 (UTC)

@chrisqq Python was recently upgraded to 3.9 in main repos, and it's likely that your installation of python-mpv was built for 3.8. You should cleanly build that package, so that it is re-built for 3.9. You can check which packages you have that are built for Python 3.8 using pacman -Qo /usr/lib/python3.8/site-packages. All of the python-* packages listed should be rebuilt and reinstalled to ensure you have the latest version.

If you have yay installed, you can run pacman -Qoq /usr/lib/python3.8/site-packages | yay -S --answerclean All - to do this.

triatk commented on 2020-12-15 18:50 (UTC)

please add python-gobject to the dependencies. otherwise it will throw a error: AttributeError: module 'gi' has no attribute 'require_version'

chrisqq commented on 2020-12-15 17:27 (UTC)

getting this error running jellyfin-mpv-shim on manjaro: 2020-12-15 10:25:56,589 [ INFO] conf: Loaded settings from json: /home/chris/.config/jellyfin-mpv-shim/conf.json Traceback (most recent call last): File "/usr/bin/jellyfin-mpv-shim", line 33, in <module> sys.exit(load_entry_point('jellyfin-mpv-shim==1.8.1', 'console_scripts', 'jellyfin-mpv-shim')()) File "/usr/lib/python3.9/site-packages/jellyfin_mpv_shim/mpv_shim.py", line 71, in main from .player import playerManager File "/usr/lib/python3.9/site-packages/jellyfin_mpv_shim/player.py", line 41, in <module> import mpv ModuleNotFoundError: No module named 'mpv'

mpv is definitely installed:

mpv 0.33.0-42-g4029a695b5 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects built on UNKNOWN FFmpeg library versions: libavutil 56.62.100 libavcodec 58.115.102 libavformat 58.65.100 libswscale 5.8.100 libavfilter 7.93.100 libswresample 3.8.100 FFmpeg version: N-100410-gcd821c18dc

Usage: mpv [options] [url|path/]filename

Basic options: --start=<time> seek to given (percent, seconds, or hh:mm:ss) position --no-audio do not play sound --no-video do not play video --fs fullscreen playback --sub-file=<file> specify subtitle file to use --playlist=<file> specify playlist file

--list-options list all mpv options --h=<string> print options which contain the given string in their name

kruzah commented on 2020-08-08 14:01 (UTC)

jellyfin-mpv-shim-web has now been added as an optdepend. It is required for desktop support.

kruzah commented on 2020-08-08 13:34 (UTC)

Thanks @JP-Undercover, this does indeed appear to be a packaging issue. I believed I had packaged everything, but I missed the jellyfin-web dependency. I'll push an update to this package that includes jellyfin-web and also update to 1.7 at the same time. That should resolve the issue.

oUndercover commented on 2020-08-08 11:41 (UTC)

I've installed this package and werkzeug gave constant 404 when trying to run jellyfin-mpv-desktop while the server, which is in my local network, is reachable and webUI works as expected. Also i've been using jellyfin-mpv-shim for the past few days and it works as expected, it's just the desktop that doesn't.

Server logs:

Aug 07 16:55:15 UD-TinyPiNAS jellyfin[12151]: [16:55:14] [INF] [81] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS ::ffff:10.1.1.2 request
Aug 07 16:55:36 UD-TinyPiNAS jellyfin[12151]: [16:55:36] [WRN] [82] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS ::ffff:10.1.1.2 error receiving data: The remote party closed the WebSocket conne>
Aug 07 16:55:36 UD-TinyPiNAS jellyfin[12151]: [16:55:36] [INF] [82] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS ::ffff:10.1.1.2 closed
Aug 07 16:55:41 UD-TinyPiNAS jellyfin[12151]: [16:55:41] [INF] [81] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS ::ffff:10.1.1.2 request
Aug 07 16:55:50 UD-TinyPiNAS jellyfin[12151]: [16:55:50] [INF] [81] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS ::ffff:10.1.1.2 closed
Aug 07 17:01:54 UD-TinyPiNAS jellyfin[12151]: [17:01:54] [INF] [67] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS ::ffff:10.1.1.2 request
Aug 07 17:02:03 UD-TinyPiNAS jellyfin[12151]: [17:02:03] [INF] [68] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS ::ffff:10.1.1.2 closed
Aug 07 17:02:36 UD-TinyPiNAS jellyfin[12151]: [17:02:36] [INF] [74] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS ::ffff:10.1.1.2 request
Aug 07 17:02:55 UD-TinyPiNAS jellyfin[12151]: [17:02:55] [INF] [67] Emby.Server.Implementations.HttpServer.HttpListenerHost: WS ::ffff:10.1.1.2 closed

Desktop logs:

2020-08-07 17:02:36,591 [    INFO] werkzeug: 127.0.0.1 - - [07/Aug/2020 17:02:36] "GET /index.html HTTP/1.1" 404 -
2020-08-07 17:02:36,694 [    INFO] werkzeug: 127.0.0.1 - - [07/Aug/2020 17:02:36] "GET /index.html HTTP/1.1" 404 -
2020-08-07 17:02:36,799 [    INFO] werkzeug: 127.0.0.1 - - [07/Aug/2020 17:02:36] "GET /index.html HTTP/1.1" 404 -
2020-08-07 17:02:36,903 [    INFO] werkzeug: 127.0.0.1 - - [07/Aug/2020 17:02:36] "GET /index.html HTTP/1.1" 404 -

After reaching out to the devs in a github issue he thinks that this is due to a packaging problem in this package and that the web client needs to be packaged with the application and asked me to reach out to you.

I've installed all the optional packages listed in the dependencies section. I'm also running Manjaro but all the packages matched the arch repos.

kruzah commented on 2020-05-01 15:28 (UTC)

@malcolm python-pystray is required for systray support; upstream does not specify a version, and the latest version available in AUR appears to work just fine. It is listed as an optional dependency already.

malcolm commented on 2020-04-17 03:21 (UTC)

and pystray?

kruzah commented on 2020-04-12 07:45 (UTC) (edited on 2020-04-12 07:45 (UTC) by kruzah)

@chrisqq Thanks for the report. I didn't notice the dependencies had updated. I've fixed the dependency now and also flagged python-mpv-jsonipc as out-of-date. Hopefully the packager of python-mpv-jsonipc will notice and update the package so this shim works again.

chrisqq commented on 2020-04-11 23:44 (UTC)

I just updated to this and now when I run jellyfin-mpv-shim I get this error: pkg_resources.DistributionNotFound: The 'python-mpv-jsonipc>=1.1.9' distribution was not found and is required by jellyfin-mpv-shim

It appears to be requiring a package newer than what is possible to install on arch (and newer than what is claimed as dependencies above).