blur-camera.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORK_DIR=/home/luqman/Develop/webcam-bg | |
# Cleanup everything on exit | |
functioncleanup_func { | |
sleep 0.5 | |
echo cleanup | |
} | |
trap"exit \$exit_code" INT TERM | |
trap"exit_code=\$?; cleanup_func; kill 0" EXIT | |
# Start the bodypix server | |
node $WORK_DIR/Linux-Fake-Background-Webcam/bodypix/app.js &>/dev/null & | |
source$WORK_DIR/env/bin/activate | |
# Start the virtual camera that's blurred | |
cd$WORK_DIR/Linux-Fake-Background-Webcam/fakecam | |
python3 fake.py -w /dev/video0 -v /dev/video10 -W 1280 -H 720 -F 30 --no-background --no-foreground |