https://github.com/averissimo/cool-tricks
Cool tricks to remember
https://github.com/averissimo/cool-tricks
Last synced: 3 months ago
JSON representation
Cool tricks to remember
- Host: GitHub
- URL: https://github.com/averissimo/cool-tricks
- Owner: averissimo
- Created: 2020-05-01T13:26:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-13T17:57:36.000Z (about 6 years ago)
- Last Synced: 2025-09-14T20:47:29.730Z (9 months ago)
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> cool tricks to remember
## General settings
See [averissimo/linux-config](https://github.com/averissimo/linux-config)
## Use DSLR as webcam
[from stackoverflow](https://askubuntu.com/questions/856460/using-a-digital-camera-canon-as-webcam)
Requirements:
```
$ sudo apt install gphoto2 v4l2loopback-utils ffmpeg
```
Use it *(after plugging in camera via usb cable)*
```
#!/bin/bash
# killall gphoto processes
ps -aux | grep gphoto | grep -v grep | awk '{ print $2 }' | xargs kill -9
# add video loopbackd device
sudo modprobe v4l2loopback
# Use gphoto to capture and pipe it to loopback device (that can be used by skype, zoom, etc..)
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video2
```
note: `/dev/video2` might be different *(depending on computer)*, use `v4l2-ctl --list-devices` to see which one is the loopback *(dummy)*
## RStudio links
[Current version](https://rstudio.com/products/rstudio/download/) and [Preview](https://rstudio.com/products/rstudio/download/preview/)