Created
January 11, 2021 05:12
-
-
Save luqmana/856bdd5088fe40e9c5cae3437b4bea47 to your computer and use it in GitHub Desktop.
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 | |
function cleanup_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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment