Created
December 6, 2016 15:13
-
-
Save dpacmittal/9f0e1aea8a3732d8f7aec7b1dadc8cda to your computer and use it in GitHub Desktop.
Create a screencast using ffmpeg with audio recording and webcam capture on bottom right
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
T="$(date +%d-%m-%Y-%H-%M-%S)".mkv | |
if [ $# -gt 0 ]; then | |
if echo $1 | grep '\....$' > /dev/null; then | |
T=$1 | |
else | |
T=$1.mkv | |
fi | |
fi | |
# echo $T | |
ffmpeg -f alsa -i pulse -f x11grab -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -r 25 -i :0.0 -f video4linux2 -i /dev/video0 -filter_complex '[2:v]scale=480:-1[cam];[1:v][cam]overlay=W-w-10:H-h-10' -ab 192 -acodec pcm_s16le -qscale 0 $HOME/Screencasts/$T |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment