virtual cam notes
This commit is contained in:
parent
2f211f274c
commit
9f10391400
|
@ -112,3 +112,56 @@ ffmpeg -framerate 2 \
|
|||
```
|
||||
ffmpeg -i input.mp4 -i imagen.png -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" output.mp4
|
||||
```
|
||||
|
||||
# cámara virtual
|
||||
|
||||
es necesario instalar v4l2loopback, e.g.:
|
||||
|
||||
```
|
||||
sudo apt install v4l2loopback-utils
|
||||
```
|
||||
|
||||
y luego habilitar el módulo:
|
||||
|
||||
```
|
||||
sudo modprobe v4l2loopback
|
||||
```
|
||||
|
||||
si no hay más cámaras conectadas, el dispositivo virtual estará en /dev/video0
|
||||
|
||||
## pantalla completa
|
||||
|
||||
```
|
||||
ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
|
||||
```
|
||||
|
||||
si la imagen está en espejo, se puede utilizar el parámetro -vf hflip
|
||||
|
||||
=> https://superuser.com/questions/411897/using-desktop-as-fake-webcam-on-linux fuente
|
||||
=> http://trac.ffmpeg.org/wiki/Capture/Desktop capturing your desktop/screen recording
|
||||
=> https://ffmpeg.org/ffmpeg-devices.html#x11grab x11grab
|
||||
|
||||
## región específica
|
||||
|
||||
aquí utiliza la opción de video_size y el offset en la opción 1:
|
||||
|
||||
```
|
||||
ffmpeg -f x11grab -show_region 1 -r 15 -video_size 640x480 -i :0.0+10,130 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
|
||||
```
|
||||
|
||||
una opción interesante aquí puede ser:
|
||||
|
||||
```
|
||||
-follow_mouse centered
|
||||
```
|
||||
|
||||
## ventana
|
||||
|
||||
obtén la window id con xwininfo:
|
||||
|
||||
```
|
||||
xwininfo | grep "Window id"
|
||||
```
|
||||
|
||||
en teoría debería poder utilizar la id con la opción -window_id, pero no he tenido éxito (Option window_id not found)
|
||||
|
||||
|
|
Loading…
Reference in New Issue