Skip to content

Instantly share code, notes, and snippets.

@EvanDotPro
Created August 10, 2012 00:36
Show Gist options
  • Save EvanDotPro/b88a40146eb82aa7e317 to your computer and use it in GitHub Desktop.
Save EvanDotPro/b88a40146eb82aa7e317 to your computer and use it in GitHub Desktop.
#!/bin/bash
VIDEO_SIZE="hd1080"
FPS="10"
/home/ecoury/x11grabr/x11grabr -i :0.0 -s "$VIDEO_SIZE" -r "$FPS" -F -bnone |
ffmpeg -f alsa -i pulse -f rawvideo -pix_fmt bgra -s "$VIDEO_SIZE" -r "$FPS" -i - \
-vf "movie=/dev/video0:f=video4linux2, scale=320:-1, setpts=PTS-STARTPTS [webcam]; [in][webcam] overlay=main_w-overlay_w-2:main_h-overlay_h-2 [out]" \
-acodec libmp3lame -ar 44100 -ac 1 \
-vcodec libx264 -threads 4 \
-x264opts "sync-lookahead=0:rc-lookahead=10:threads=4:sliced-threads=1:bframes=0:scenecut=0:crf=30" \
-f flv -metadata streamName=evan "tcp://127.0.0.1:6666/flvplayback"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment