works on Buster 32 bits console on boot, logged on PI user = pi password = raspberry
pip install pathlib
pip install PyOSC
sudo apt-get install libdbus-1-dev libdbus-glib-1-dev -y
sudo pip install omxplayer-wrapper
change cmdLine.txt and create a backup
logo.nologo vt.global_cursor_default=0
: remove cursor
touch ~/.hushlogin
sudo nano /etc/systemd/system/[email protected]/autologin.conf
change
ExecStart=-/sbin/agetty --autologin pi --noclear %I xterm-256color
with:
ExecStart=-/sbin/agetty --skip-login --noclear --noissue --login-options "-f pi" %I $TERM
Remove the file /etc/profile.d/sshpasswd.sh
(sshpwd.sh
for stretch)
If you want to remove even the bash prompt (e.g. “pi@raspberrypi:~ $”), open .bashrc file.
nano ~/.bashrc
Then add the line below at the bottom of the file.
PS1=""
Note that port In and Out are part of user settings
/video/status/ 0
Print status player on console and callback in osc too
- WAITING = 0
- ASKPLAYING MAIN VIDEO = 1
- PLAYING MAIN VIDEO = 2
- END MAIN VIDEO = 3
- ASK PLAYING SECOND = 4
- PLAYING SECOND VIDEO = 5
- END SECOND 2D SCREEN = 6 ( 2nd screen is over, but the the 1st screen)
note that PAUSE is not a status
/video/playmain
Play the main video
/video/playwait
Play the secondary video. Works only if state is WAITING or PLAYING MAIN VIDEO
/video/stop
Stop everything, go to waiting mode
/rpi/startx
start X desktop in background
/rpi/reboot
/rpi/shutdown
/app/ispi
write on console is machine is considered as raspberry pi arm
/app/quit
quit app
/app/test
write test on console and give back OSC test message
program is : /home/Document/museum_video_player/main2.py
fat32 is /media/fat32/
userSettings file has to be : /media/fat32/settings/userSettings.json
sudo systemctl stop museum.service
sudo systemctl disable museum.service
sudo systemctl enable museum.service
sudo reboot
use OSC command /app/quit
cd /home/pi/Documents/museum_video_player
python main2.py
python json_tester.py
python omxplayer_tester.py
note : sound is not configurated
first start desktop, using keyboard startx
or /rpi/startx
OSC message
open a browser, then open ip_of_raspberry
Random mode allows you to play randomly a couple of main.mp4 / wait.mp4 What is needed ?
- Activate random by adding new line on Json file : "random": { "nbFolder": X (where X is a number) }
- Add X couples of main.mp4/wait.mp4 located in folder "1" , "2", "3" .... "X"
- Check that everything is fine, user
python json_tester.py
- Double check on log when app is starting :
===== init settings ====
SETTINGS : user setting
==== playlist =====
/media/fat32/main.mp4
/media/fat32/wait.mp4
VideoPlayer RANDOM Mode activated
Set Random Folder
New Random Folder =3
===== OSC SERVER ====
deactivate Random mode in removing the random key inside the json folder