Kodi Community Forum
Win Is it possible to run 2 Kodi programs at the same time? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Kodi related discussions (https://forum.kodi.tv/forumdisplay.php?fid=6)
+--- Thread: Win Is it possible to run 2 Kodi programs at the same time? (/showthread.php?tid=372019)



Is it possible to run 2 Kodi programs at the same time? - jojobro - 2023-02-15

Is it possible to run 2 Kodi programs at the same time on the same machine?

I'm spending quite a bit of time messing with code within skins and addons, and it gets boring.
I want to watch(listen) to tv shows while I'm coding lol

I have enough monitors and computer power to do it.

I tried the -p portable option and couldn't get it to open two different versions, maybe I did it wrong?

Just want some clarification if this is even possible, thanks ahead of time!


RE: Is it possible to run 2 Kodi programs at the same time? - PatK - 2023-02-15

(2023-02-15, 05:52)jojobro Wrote: I want to watch(listen) to tv shows while I'm coding lol
That's what windowed mode is all about. But NO, only one at a time; Kodi utilizes the gfx engine, libraries & it's memory to the exclusion of multiples. Mind you it is possible to run a very old XBMC iteration along with Kodi (leaves the tantalizing hint, that multiple Kodi is possible should someone code for it). Another possibility is to just run another video player in parallel in another window. OTH if you have Picture in Picture on one of the monitors with multiple computers why not?


RE: Is it possible to run 2 Kodi programs at the same time? - black_eagle - 2023-02-15

Yes, it totally is.  Kodi is always running on my TV and feeding audio (usually radio) to my AVR whilst I have another test build running right now.  One is a systemwide install, the other (test build) is a portable version.  This is on Linux but it should be perfectly possible on other OS's provided that Kodi can "see" all the monitors you want to output to and you can handle multiple audio outs too.  In my case, output to AVR and TV is via HDMI and output to development monitor is via DVI with audio on the built in soundcard.


RE: Is it possible to run 2 Kodi programs at the same time? - jjd-uk - 2023-02-15

On Windows it's only possible if you can compile your own version as a section of the code needs to be changed.


RE: Is it possible to run 2 Kodi programs at the same time? - jbinkley60 - 2023-02-15

Another option is to run a hypervisor and VMs.  I have a Windows 10 host machine running VM Workstation and I can easily run 6 or 7 LibreElec VMs or Windows Guest systems of all different versions, along with a few other VMs at the same time.  I find this safer so that if I blow up a VM I can simply restore it in a couple of minutes.  I do this so I can also test across multiple OS instances of different types.


Jeff


RE: Is it possible to run 2 Kodi programs at the same time? - black_eagle - 2023-02-15

@jjd-uk Are you saying that the instructions at https://kodi.wiki/view/Portable_mode are incorrect then ?


RE: Is it possible to run 2 Kodi programs at the same time? - jjd-uk - 2023-02-15

You can install as many versions as you like which is what that wiki page is talking about, but you can only run one instance at a time. Running multiple instances is blocked in code for Windows, however it's simply to remove the block if you can compile, see https://github.com/jjd-uk/xbmc/commit/ea67cfc0fc079f38c2c289b24a8f68e84e14268f

Note it's been a long since I've used that, but don't see any reason why that wouldn't still work.


RE: Is it possible to run 2 Kodi programs at the same time? - black_eagle - 2023-02-16

Ah right, didn't realize that so thanks for the info.

cpp:
ps -ax | grep kodi
 897299 ?        S      0:00 daemon --name=kodi --respawn --delay=10 --limit=1 --core /usr/lib/x86_64-linux-gnu/kodi/kodi.bin
 897300 ?        Sl   1892:06 kodi: /usr/lib/x86_64-linux-gnu/kodi/kodi.bin
3585626 pts/4    SLl+   0:19 ./kodi-x11 -p
3590722 pts/0    S+     0:00 grep --color=auto kodi


Top two lines show systemwide installed Kodi running - 1st line is the command from the shell script that started it, 2nd line is the actual binary.  3rd line shows portable build running.


RE: Is it possible to run 2 Kodi programs at the same time? - jjd-uk - 2023-02-16

The multiple instance block on Windows dates back to when the port to Windows was first done I think, so it probably wasn't seen as a good thing back then when systems had more limited resources for running Kodi.


RE: Is it possible to run 2 Kodi programs at the same time? - izprtxqkft - 2023-02-17

if its using a mutex you might be able to close the mutant handle in the first process and start another, a little bit involved and windows is not my forte anymore so ymmv - https://scorpiosoftware.net/2020/03/15/how-can-i-close-a-handle-in-another-process

another option would be to use a sandbox, it should provide enough insulation against mutex detection, sandboxie used to be quite good at this and it looks like still in development - https://sandboxie-plus.com

downside to sandbox it might have video playback performance issues so maybe use it just for your dev testing and a main one for watching