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

Duration before first sync #83

Closed rickvboxtel closed 5 years ago

rickvboxtel commented 5 years ago

I am trying out omxplayer-sync. It is working great but, I get this long 5s sync pause on my slaves, always after 8-9s of playing the video. Is it possible for the master to send it's position faster, and not after 8-9s? Or is it possible to pause all devices till they are synced correctly and then start playing the video?

Thank you, Rick

turingmachine commented 5 years ago

Try to lower SYNC_GRACE_TIME. It defines the time at the beginnung of a video and after sync, during which no attempt to sync will be done. The output of omxplayer was not accurate at the beginning of a video in the past. Maybe this issue is no longer present. For example try to set it to 0.5.

rickvboxtel commented 5 years ago

Hey Simon,

I've tried to set the SYNC_GRACE_TIME to .5, this caused to snyc more often, but still after the 8/9 seconds mark. I feel like the master needs 8/9s till it has established a connection and can communicate with the slaves. Could this be correct?

Thank you for your quick response and help! Rick

turingmachine commented 5 years ago

No that should not be the case. Try run the slave in verbose mode and check for position_master value. What kind of connectivity do you use?

rickvboxtel commented 5 years ago

I use a wired-ethernet connection with a switch. The output of the slave looks like this:

local: 8.14 3 master: 9.54 14 deviation: 1.41 median_deviation: 1.41 filename: synctest.mp4 jump to 12.54 enter pause... local: 13.00 0 master: 10.55 14 deviation: -2.45 median_deviation: -0.52 filename: synctest.mp4 we are sync, play... local: 13.02 1 master: 11.56 14 deviation: -1.46 median_deviation: -1.46 filename: synctest.mp4 local: 13.04 1 master: 12.57 14 deviation: -0.47 median_deviation: -0.96 filename: synctest.mp4 local: 13.57 14 master: 13.59 15 deviation: 0.02 median_deviation: -0.47 filename: synctest.mp4 local: 14.58 14 master: 14.60 15 deviation: 0.02 median_deviation: -0.22 filename: synctest.mp4 local: 15.59 15 master: 15.61 15 deviation: 0.02 median_deviation: 0.02 filename: synctest.mp4 local: 16.60 15 master: 16.62 15 deviation: 0.02 median_deviation: 0.02 filename: synctest.mp4 local: 17.61 15 master: 17.63 16 deviation: 0.02 median_deviation: 0.02 filename: synctest.mp4 local: 18.62 15 master: 18.64 16 deviation: 0.02 median_deviation: 0.02 filename: synctest.mp4 local: 19.63 16 master: 19.65 16 deviation: 0.02 median_deviation: 0.02 filename: synctest.mp4 local: 20.64 16 master: 20.66 16 deviation: 0.02 median_deviation: 0.02 filename: synctest.mp4

toddfreese commented 5 years ago

I'm having this same problem. Did you find a solution?

rickvboxtel commented 5 years ago

Hey Todd,

I did not solve it... However the application I made needed:

Movie one: Really tight sync with the sound on both televisions in sync (you can do this by changing the sync_tolerance to ~0.025)

Second movie: Just in sync. And I changed the sync_tolerance to about 0.2.

On the second movie my raspberry Pi's make so little error it doesn't need to synchronize. This way I did kinda solve it.

Also I have discovered that using the same version of Raspberry Pi's does limit the synchronisation quite a bit. I am using Raspberry Pi 3B's, but have tested it with Raspberry Pi 1B and 2B also.