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

Question & option added #75

Closed renoproc closed 5 years ago

renoproc commented 6 years ago

Hi, just to ask if it's possible to add the --black option (I made it on my own here), in some cases this option is useful.

And a question : is it possible to enable a namedpipe option on omxplayer-sync ? As the omxplayer commandline : omxplayer -options /path/to/video/* < /tmp/omxPipe > /dev/null 2>&1 & This could be useful to allow commands using the namedpipe to send keypressed instructions to omxplayer, like p/space to pause/resume, - to decrease volume, +/= to increase volume...

magdesign commented 6 years ago

Pause, Resume and Volume can be controlled via DBus commands. I think we disabled key commands because it somehow disturbed the sync, but I am not sure.

renoproc commented 6 years ago

Yes I saw it (after), there is an issue discussion about key bindings : https://github.com/turingmachine/omxplayer-sync/issues/62

But I think that could be nice to add the black background (--black -b) option. If, as I do, someone works with another script, there are some text shown on the screens and the black option helps to hide it.

Also magdesign, I was inspired by pocketvj project (thanks for it), but because of my work with art students, we don't need all the interface and we made a scrapy script using socat/udp broadcast messages and Flirc dongle to be able to use a TV remote control. Which works like a charm.

pagaille commented 6 years ago

The b (black) option is implemented ASFAIK. Just launch the master with /usr/bin/omxplayer-sync -mub --no-osd ~/video.mp4

renoproc commented 6 years ago

As I saw there is no b option :

        p.add_option('--master', '-m', action='store_true')
        p.add_option('--slave', '-l', action='store_true')
        p.add_option('--destination', '-x', default='255.255.255.255')
        p.add_option('--loop', '-u', action='store_true')
        p.add_option('--verbose', '-v', action='store_true')
        p.add_option('--adev', '-o', default='both')
 self.options, arguments = p.parse_args()

But I didn't see these lines, which perhaps give the ability to pass new options to omxplayer (I'm not a pythoner, so I'm not sure)

            if argument.startswith('-'):
                self.omxplayer_options.append(argument)
else:

if someone can confirm ? Thanks a lot.

chiguire commented 5 years ago

You can pass arguments through to omxplayer when you don't specify the ones you've listed there (--master, --slave, etc.)

However, you must pass each argument quoted, e.g. omxplayer-sync -mu "--orientation 270", as otherwise the script will detect "270" as a separate argument and will not pass the argument through to omxplayer.

TL;DR; quote the arguments you want to pass to omxplayer.