Skip to content

Commit

Permalink
README merge cleanup and added project docs
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Telfer committed Feb 1, 2021
1 parent e0d123f commit 6e5680a
Show file tree
Hide file tree
Showing 9 changed files with 628 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,4 @@ Andre Telfer ([email protected]).
Harshdeep ([email protected])
Muhammad Bilal Zubair ([email protected])
Mithra Perera
>>>>>>> Stashed changes

Binary file added docs/assets/demo-ui.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/gcloud-create-instance.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/gcloud-instance-os.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/gcloud-ssh.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/hackathon-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/open-gcloud-instances.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
575 changes: 575 additions & 0 deletions docs/assets/system-graphic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions docs/gcloud-virtual-camera.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Virtual Camera on GCloud

## Creating an Instance

1. Log into G-Cloud console: https://console.cloud.google.com/

If this is your first time, you may need to set up things like billing in later steps

2. Navigate to Compute Engine > Virtual Instances:
![](assets/open-gcloud-instances.PNG)

3. Create Instance
![](assets/gcloud-create-instance.PNG)

4. Change the instance OS to Ubuntu 18.04, then create the instance
![](assets/gcloud-instance-os.PNG)

5. You should now be able to connect to the instance using the SSH button
![](assets/gcloud-ssh.PNG)

## Setup

Docs: https://github.com/umlaeute/v4l2loopback

```
sudo apt update
sudo apt install -y build-essential linux-modules-extra-gcp linux-generic ffmpeg v4l-utils python3-pip
sudo -H pip3 install --upgrade youtube-dl
git clone https://github.com/umlaeute/v4l2loopback
cd v4l2loopback
make && sudo make install
sudo depmod -a
sudo modprobe v4l2loopback devices=4
```

Now running `v4l2-ctl --list-device` should list 4 video devices (ex. /dev/video0)

## Run

### Creating a Virtual Camera Device

Download a video from youtube:
```
youtube-dl https://www.youtube.com/watch?v=-1dSY6ZuXEY --output "spooky.%(ext)s"
```

To run a video as if it's coming from a camera (/dev/video0)

```
ffmpeg -stream_loop -1 -re -i spooky.mp4 -f v4l2 /dev/video0
```

0 comments on commit 6e5680a

Please sign in to comment.