Éléments logiciels permettant de faciliter l'enregistrement d'une partie de flipper (physique, non virtuel) en utilisant un raspberry et 2 webcams.
| images | ||
| .gitignore | ||
| LICENSE | ||
| main.py | ||
| pywatch.desktop | ||
| README.md | ||
pywatch
Éléments logiciels permettant de faciliter l'enregistrement d'une partie de flipper (physique, non virtuel) en utilisant un raspberry et 2 webcams.
Matériels
Cette liste de matériel correspond à celui que j'ai utilisé, évidemment le projet devrait pouvoir fonctionner sur d'autres matériels/
- Raspberry Pi 5
- carte SD 32Go
- écran tactile 3,5" 480x320 et boitier
- webcam Microsoft Corp. LifeCam HD-3000
- webcam lihappe8 Corp. USB 2.0 Camera
Prérequis
- raspbian installé (utilisateur par défaut: pywatch)
Connexion SSH
apt install openssh-server
systemctl enable --now ssh
Configuration de l'écran tactile
sudo -s
apt remove portmap cups cups-daemon
apt autoremove
apt install git
git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show/
./LCD35-show
Installation
sudo apt update
sudo apt install python3-imageio-ffmpeg python3-imageio ffmpeg python3-ipython python3-pil.imagetk v4l-utils
sudo apt install ffmpeg python3-pil python3-imageio python3-dbus python3-tk
git clone https://git.bonnegent.fr/bonnegent/pywatch.git
cd pywatch
Détection des webcam
v4l2-ctl --list-devices
Formats supportés
v4l2-ctl -d /dev/video0 --list-formats-ext
## Détection des micros
arecord -l
ffmpeg -hide_banner -devices 2>&1 | grep -E 'video4linux2|alsa'
Test d'un micro
arecord -D hw:0,0 -f S16_LE -r 44100 -c 1 -d 5 /tmp/test_audio.wav
aplay /tmp/test_audio.wav
Lancement manuel
/home/pywatch/pywatch/main.py --fullscreen
Lancement automatique
cp pywatch.desktop ~/.config/autostart/
Adapter si besoin le fichier ~/.config/autostart/pywatch.desktop (par rapport au dossier d'installation ou au nom de l'utilisateur).