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

Some concerns #7

Closed pukster closed 10 years ago

pukster commented 10 years ago

I hope I don't irritate you with the torrent of issues I am posting, my only intention is to make you aware of some problems I've noticed. Also, I am by no means an expert programmer, so forgive me if I am missing something in a lot of these issues.

That being said, I have noticed a few things that strike me as odd:

1) Does wait_after_sync do anything at all? It looks like it is just set to the current time, and then 5 seconds later reset to False.

2) Is there any reason you are using \x1b[C for right/left arrow instead of \x1B[C? I am surprised it is not case sensitive to be honest.

3) Why in your build of omxplayer does repeatadly pressing the right-arrow key move the playback to the very beginning?

4) I don't know if this is crucial, but I think you are missing a millisecond in there. In the wait_for_sync conditional you are looking for a window of -0.1-0.1 or 0.2ms, whereas the TOLERANCE variable is set to 0.3ms

5) Finally, any particular reason why you use a master-slave approach where all slaves must seek ahead (fast forward) then wait, as opposed to having the fastest player pause itself until either all the others catch up to it, or another player overtakes it in which case the other player would be assigned the role of the fastest player and it pauses itself. This seems so much more practical than fast forwarding 10s then pausing. This fast forward approach makes this script useless for shorter videos (~1 min). Again, I hope I am not missing something glaring.

magdesign commented 10 years ago

1) wait after sync is because omxplayer outputs wrong timecode values during the first few seconds while playing. new builds may correct this...

5) thats why we made our own build of omxplayer with a seek time of 2s. the problem is that the movie you encoded to h264 must have a gop size of 2s or smaller, they also call it i-frames. ffmpeg makes standard gop sizes of 10s, if you export it directly from after effects you get i-frames every second. i'm sill working on this issue to get more info about how to set this i-frames!