turingmachine / omxplayer-sync

OMXPlayer-Sync facilitates synchronization of multiple OMXPlayer instances over the network in a master/slave fashion.
194 stars 70 forks source link

Kodi support #55

Closed Alladinsane closed 6 years ago

Alladinsane commented 7 years ago

I was just curious if anyone had attempted to replace Kodi's built-in omxplayer with omxplayer-sync. We have a kodi installation in our lobby running a random playlist of company produced videos. I thought it would be cool if I could sync that playback to a slave pi in a small conference room.

turingmachine commented 7 years ago

You could rename the stock omxplayer to something like omxplayer.stock and rename omxplayer-sync to omxplayer. You also would need to edit the omxplayer-sync script, so that omxplayer.stock is called instead of omxplayer.

If that would work, you still have the problem that kodi most probably does supply only one file at a time to omxplayer. So omxplayer-sync has no way to know what other files are in playlist, as the playlist is managed by kodi and not by omxplayer-sync.

omxplayer-sync is simply a wrapper around stock omxplayer and controls it via dbus. When multiple files are supplied to omxplayer-sync, the slave players are aware which file of the playlist needs to be played.

If this is an unattended setup anyway, I would suggest you just use omxplayer-sync as is:

Screen/Rasperry 1 (Master): omxplayer-sync -muv video1.mp4 video2.mp4 video3.mp4 videos/*

Screen/Rasperry 2 (Slave): omxplayer-sync -luv video1.mp4 video2.mp4 video3.mp4 videos/*

The Slave is aware what file is currently running on the master and will play it accordingly. As soon as the correct file is playing the slave will sync to the same position where the master currently is.