turingmachine / omxplayer-sync

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

Question about wifi, not an issue #59

Closed 1024jon closed 7 years ago

1024jon commented 7 years ago

Will it only broadcast sync data over ethernet or will it try to use the wifi as well? I would like to connect them together with ethernet and have them on wifi to load files, but I don't want it to flood my wireless.

barlaensdoonn commented 7 years ago

It does broadcast data over wifi as well. In my experience that does not impact network performance in any way.

Based on lines ~335-380 in the code, it's using sockets to pass that info. I'm not very familiar with sockets in general, but it looks like the python library allows specifying of a specific interface: https://www.quora.com/Which-Python-library-allows-us-to-specify-network-interface-to-connect-to-the-Internet

1024jon commented 7 years ago

Thanks, I appreciate the info

1024jon commented 7 years ago

I guess along these lines...will the sync work over wifi or is the latency too high?

barlaensdoonn commented 7 years ago

sync does work via wifi, but not as reliably or as fast as over ethernet.

In this scenario - using omxplayer-sync over wifi - I have had some luck with not using the server as a display, and only attaching displays to the clients. This is because the server is typically slightly ahead of the clients due to network latency, and the difference is noticeable on the displays when viewing the server next to the clients. But the clients generally seem to stay in sync with each other, even if they are not as in sync with the server. So just using the clients as displays can help with the latency problem.

I think I also changed the SYNC_TOLERANCE variable to a higher value. However this is kind of hacky, and it is still not comparable to ethernet. In the end it depends a lot on the content and if a difference of a few frames is tolerable.

1024jon commented 7 years ago

Gotcha, thanks again