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

Sync three players #26

Closed CooperWhitlow closed 9 years ago

CooperWhitlow commented 9 years ago

Hi,

I cannot get a second destination address to connect, only one slave via:

MASTER: omxplayer -muv -x slave1.local synctest.mp4 SLAVE: omxplayer -luv synctest.mp4

turingmachine commented 9 years ago

omxplayer-sync does only open one socket to send data. Thus you can only send to a single destination address. The default address if you omit the -x parameter is 255.255.255.255, which is the broadcast address of the local network.

If you start your master like this it will just work, assuming both players are in the same network segment. omxplayer -muv synctest.mp4

CooperWhitlow commented 9 years ago

Thanks for the reply! Is there any way to have two sockets opened to sync two slaves (total three players running), or is the script not designed for this?

turingmachine commented 9 years ago

Is the broadcast address not an option for you?

CooperWhitlow commented 9 years ago

For this instalation boadcast is not an option AFAIK because each player is running different mp4s. The playback timecodes must be synced because what happens in each video corresponds to each other, but they aren't actually identical videos.

Did I understand your question correctly?

magdesign commented 9 years ago

So give every video the same name and broadcast is the working solution then!

turingmachine commented 9 years ago

Yes, in order for videos to be synced, the videos must have the same name on all devices. You can supply multiple videos on each player. This way the slaves know which video to play if multiple videos are available. omxplayer-sync does only ever send timecodes, but by using the address 255.255.255.255 you send the timecode to all other devices in the network.

http://en.wikipedia.org/wiki/Broadcast_address

It guess this needs to be clarified in the usage section of the readme.

CooperWhitlow commented 9 years ago

Ah, I thought you were suggesting RTSP instead of omxplayer-sync (didn't realize the function 255.255.255.255 has in networks).

I'll remove my -x argument on my master and give this another go tomorrow.

CooperWhitlow commented 9 years ago

Well, after moving the RPis to the same gateway on my network, they connected! Apparently I was making it more complicated than it had to be because the default destination 'just works.' Thanks to TM and MD for your input!

I have another issue now--but it's unrelated--so I'm closing this ticket. I'll open a new 'issue' if needed. (I'm going through old issues first to make sure my new glitch wasn't already addressed in the past).

Thanks again, Cooper