Mpv as secondary external player/library decoder

  • Hello,

    I'd like to discuss the possibility of including mpv as a choce for external player in Kodi, as documented in Kodi Wiki, which would be including mpv on playercorefactory.xml file and thus appearing as 'play using...' in context menu.

    I think mpv is a incredibly flexible and constantly developed piece of software which auto-detects best system configuration for current os and enables endless user configurable options. It supports good tonemapping options, vulkan renderers, hardware/software acceleration, resizers..., which could be edited by ssh.

    In my opinion mpv is the best video player for linux, and if LibreELEC is linux based it wouldn't be hard to make custom builds or use builds for debian, raspbian. How is mpv compared to Kodi player infrastructure?

  • Using alternative players is possible in some OS (Windows, maybe Desktop Linux) because there's a Windowing environment that handles the display of things and the instruction to play something can be somewhat delegated. LE has more complicated distro packaging and we run on the DRM framebuffer so there is a VERY tight integration between Kodi and FFMpeg and the display hardware; so you would first need to compile mpv into the LE image (as we have no package manager or means to simply install it) and then you can configure it as an external player; at which point you'll almost certainly find that mpv is not the solution to whatever problem you think it might solve.

  • I see.

    Out of curiosity:

    What sort of linux OS and display manager does LE run on?

    DRM framebuffer would be the GPU driver, which is kernel based, right?

    Is there OpenGL or Vulkan support?

    Which is the display server, Xorg or Wayland?

    Excuse for so many questions, I'm trying to understand and thanks for your attention.

  • LibreELEC is using official Linux kernels and running a custom userland OS (so nothing like Debian, Arch, Fedora etc) and we don't use any window manager at all.

    Kodi is in full charge over all graphics stuff and interfacing directly to the graphics drivers (that is, all the stuff your windowing system and window manager would normally do).

    This has the benefit that kodi is in full control of everything graphics related and there are no additional layers in between that might decrease performance or hinder doing advanced stuff (like HDR output).

    so long,

    Hias

  • I watched this pull request to Libreelec:

    mpv-drmprime: update to 0.37.0

    mpv player uses ffmpeg libplacebo that ASAIK is capable of decoding Dolby Vision, default since 0.37.0, which requires Fmpeg 4.4 or newer and libplacebo 6.338.0 or newer. Decoding DV by LE would be a great asset, given that only Android OS set-top-boxes are licensed.

    How exactly is mpv-drmprime library used in Libreelec?

    I say so because mpv library opens up the possibility of dynamic tonemapping of Dolby Vision to HDR10 for non compatible displays (apart from SDR tonemapping), similar to HDFURY LLDV video processor. For example Samsung Tv can't decode Dolby Vision, but can play static HDR10.

    Edited once, last by wyup (December 16, 2023 at 5:42 PM).

  • Some "git grep" in the buildsystem doesn't show anything dependent upon the mpv-drmprime package so it's probably an orphan that should be deleted. I'll ask in team chat.