Skip to content

Instantly share code, notes, and snippets.

@aqiank
Created July 12, 2016 12:52
Show Gist options
  • Save aqiank/534e8822ed391d94cf9b397344dd0ac7 to your computer and use it in GitHub Desktop.
Save aqiank/534e8822ed391d94cf9b397344dd0ac7 to your computer and use it in GitHub Desktop.
ffmpeg muti-webcam stream to virtual webcam (provided by v4l2loopback)
#!/bin/sh
ffmpeg -re -i /dev/video0 -i /dev/video1 \
-filter_complex "
nullsrc=size=640x480 [base];
[0:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft];
[1:v] setpts=PTS-STARTPTS, scale=320x240 [upperright];
[base][upperleft] overlay=shortest=1 [tmp1];
[tmp1][upperright] overlay=shortest=1:x=320, format=yuv420p
" -f v4l2 /dev/video2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment