Closed bandudas closed 8 years ago
Here is some info that has been useful to me previously: http://raspberrywebserver.com/serveradmin/run-a-script-on-start-up.html
I have also had luck using PocketVJ's web interface buttons to run a script on the master that starts both the master and all slaves on the network if you provide the ip addresses of the slaves in the script, and have the RSA keys set up to allow the master to ssh into the slaves. This script might also work on startup, although I haven't tried it. https://github.com/barlaensdoonn/PocketVJ/blob/master/sync/startallplayers.py
Make sure all pi's have an ip address and the rj45 is connected before boot. Basicly you can put into /etc/rc.local before the line exit0:
/usr/bin/omxplayer-sync -mu -o both /wehre/your/video/is/* &
for starting the master in endless loop and /usr/bin/omxplayer-sync -lu -o both /wehre/your/video/is/* &
for starting the slaves in endless loop
thank you @barlaensdoonn and @magdesign my loop start and sync automatically! your script works like a charm :dancer:
anyway,is it ok with pi to shutdown it with just pluggin out the power chord?
Hello,
When I try to put this code before exit0, it never loads the terminal, so I cannot ctr+c to cancel. Now I can't change videos or edit. How can I exit at this point? Is there another place to put the code to start after loading the terminal? Thank you.
With alt + F1 or alt + F2 etc. you can change the terminals. You can kill omxplayer with kill -9. Why would you want to put it in autostart and then change it?
Basically I put it in autostart with a test video. Now I want to switch it out either through the terminal or GUI.
When I type alt+F1 or F2, nothing happens. What do you mean by change terminals? Can you elaborate? It seems with adding the launch code in /etc/rc.local, the terminal never launches? Is that correct?
I ended up fixing the rc.local autolaunch through SSH from another computer. I added the code to /etc/profile so that omxplayer-sync launches after the terminal loads, which allows for keyboard access to cancel (ctrl+c). I think that solved it.
Thank you turingmachine, i've tried omxplayer-sync and it works like a charm, i'm kinda new with pi, if i want to autostart the sync when pi boot up, what should i do?