A Python app and Docker image for webcam stream manipulation. This app will take the feed from the webcam (/dev/video0) and allow you to modify the video stream. It will send that modified output to a new, fake webcam device (/dev/video1) which can be used in chat applications like Google Hangouts/Meet, Zoom, etc.
Requires: A Linux host system (I used Ubuntu)
Original purpose: being able to apply deep fake effects during live video calls.
- Make sure you install the libraries from 'On the host system'
- Build docker image
Then:
sudo modprobe v4l2loopback exclusive_caps=1 && \
docker run -it --rm --device /dev/video0:/dev/video0 --device /dev/video1:/dev/video1 -v $(pwd):/code webcam:latest /bin/bash -l
You should be able to select the new webcam in your web browser / chat application.
sudo apt install v4l2loopback-dkms
Allows webcam to be used by Chrome, etc
sudo modprobe v4l2loopback exclusive_caps=1
docker build -t webcam:latest .