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

Position of video missing #66

Closed hitesh83 closed 6 years ago

hitesh83 commented 6 years ago

Both Master and Slave working perfectly, only want to position the video same like --win "x1 x2 x3 x4" Any help in this ?

hitesh83 commented 6 years ago

pi@raspberrypi:~$ omxplayer -s --win 0,0,720,960 Test_10sec.mp4 Video codec omx-h264 width 720 height 960 profile 100 fps 25.000000 Subtitle count: 0, state: off, index: 1, delay: 0 V:PortSettingsChanged: 720x960@25.00 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0 M: 9776363 V: 0.18s 0k/ 4800k A: -9.78 0.00s/ 0.00s Cv: 0k Ca: 0k have a nice day ;)

pi@raspberrypi:~$ omxplayer-sync --win 0,0,720,960 Test_10sec.mp4 WARNING: dbus connection could not be established org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.omxplayer was not provided by any .service files WARNING: omxplayer did not start. Try to test with omxplayer -s OPTIONS

Any way to use --win with omxplayer-sync ?

hitesh83 commented 6 years ago
add this line on line-162

self.omxplayer_options.append('--win 0,0,720,960') this works for me even without putting "-s", as of now this is hard-coded, if anyone wants flexibility of each player separately, more work need to be done,

turingmachine commented 6 years ago

Your solution would be the workaround I would have proposed. omxplayer-sync uses a primitive detection if an argument is meant for omxplayer or for omxplayer-sync, it only picks arguments that starts with '-'. Given the following argument list: ['--win', 'x1 y1 x2 y2', 'file1.mpg', 'file2.mpg'], you have no way to detect if 'x1 y1 x2 y2' is a parameter for '--win' option or an argument on its own. The proper solution would be to replicate the argument spec of omxplayer in omxplayer-sync, either by copying or by parsing the help output of omxplayer-sync. The following gist contains code for the latter approach, I didn't manage to finish it beacause of some edge cases. https://gist.github.com/turingmachine/02eff55b34e19b2f571128ffc5b21618. Pull request are welcome!

hitesh83 commented 6 years ago

Thanks for the reply, My python knowledge is limited, still will try to use your gist approach to make more options available for omxplayer-sync