Skip to content

Instantly share code, notes, and snippets.

@luqmana
Created January 11, 2021 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luqmana/856bdd5088fe40e9c5cae3437b4bea47 to your computer and use it in GitHub Desktop.
Save luqmana/856bdd5088fe40e9c5cae3437b4bea47 to your computer and use it in GitHub Desktop.
#!/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