Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
External player with flatpak
#1
How do external players work with the flatpak?

Testing flatpak now that the Ubuntu builds are retired and using mpv as an example it will not play:
Code:
sh: line 1: /usr/bin/mpv: No such file or directory
Reply
#2
You couldn't make it work, could you?

I'm trying to set this up with Flatpak on Debian 12, following the instructions on both the Wiki and this thread, with no success. Even giving All possible permissions to the program via Flatseal. I can get players to show under "Play using" but they just won't play anything.

Can we please get confirmation that external players just don't get along with Flatpak? Or am I wrong and it can be done?
Reply
#3
(2024-08-07, 21:06)delbruck Wrote: You couldn't make it work, could you?

I'm trying to set this up with Flatpak on Debian 12, following the instructions on both the Wiki and this thread, with no success. Even giving All possible permissions to the program via Flatseal. I can get players to show under "Play using" but they just won't play anything.

Can we please get confirmation that external players just don't get along with Flatpak? Or am I wrong and it can be done?

What I've read that kodi flatpak run in a sandbox , like all flatpak haven't got access to the filesystem.

Check this out https://davejansen.com/give-full-filesys...lications/ maybe give permission for /usr/bin/mpv or what ever external players location is
Reply
#4
I recently worked on "Play using..." via JSON API, using Kodi 20.5 and 21.0 flatpack versions. I could play from Kodi 21.0 to Kodi 20.5 and to several TVs and Monitors which have UPnP support.
Reply
#5
Great! Thanks for confirming that it can be done. I'll keep trying.

@Sidewinder_2011
Thank you for the link and the idea, I think I took care of that permission with Flatseal, but I'll double check with the CLI.
Reply
#6
Welcome 😊

One thing I forgot to mention. I also have 1 device which did not work. This is an „OpenHome“ device. Maybe this helps to narrow down the problem on your side.
Reply
#7
That might be a clue, thanks again!
Reply
#8
Solved.

Grant permission to spawn on host:
Code:
flatpak override tv.kodi.Kodi --talk-name=org.freedesktop.Flatpak

Update playercorefactory.xml:
Code:
<player name="mpv" type="ExternalPlayer" audio="false" video="true">
  <filename>flatpak-spawn</filename>
  <args>--host /usr/bin/mpv "{1}"</args>
Reply
#9
Yesss, this works. Thanks for posting your solution.
Reply
#10
In case anyone wants to use flatpak SMPLayer as an external player, this is the XML that worked for me. Thanks again, mcfang.

Code:

<playercorefactory>
  <players>
    <player name="SMPlayer" type="ExternalPlayer" audio="false" video="true">
      <filename>flatpak-spawn</filename>
      <args>--host /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=smplayer --file-forwarding info.smplayer.SMPlayer "{1}"</args>
    </player>
  </players>
  <rules action="prepend">
    <rule video="true" player="SMPlayer"/>
  </rules>
</playercorefactory>
Reply

Logout Mark Read Team Forum Stats Members Help
External player with flatpak0