Last active
May 13, 2016 08:26
-
-
Save neerajvashistha/8aad9ce90897de4ff1e7230f1774ea64 to your computer and use it in GitHub Desktop.
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
fname=`date +"%d.%m.%Y_%H:%M:%S_%P"`.'_screencast.mp4' | |
input_width=320 # preselect width an height of video source | |
input_height=240 # other possible combinations: 640/480; 320/240 | |
ASPECT=43 # '169' (16:9) or '43' (4:3); this value affects video playback with mplayer or vlc only! | |
V_NORM="pal" # preselect TV-norm 'PAL' oder 'NTSC' | |
DEV_VIDEO="/dev/video0" | |
title="Select Recording Type" | |
INPUT=`zenity --width=710 --height=350 --title="$title" --list --radiolist --column="Choice" \ | |
--column="Mode" --column="Description" \ | |
TRUE "0" "Screen Recording + audio from default speakers" \ | |
FALSE "1" "Screencast Only(Screen Recording+audio from mic)" \ | |
FALSE "2" "Webcast Only(Webcam video & mic audio)" \ | |
FALSE "3" "Screencast + Webcast(Screen Recording+Webcam video & mic audio)" ` || exit 0 | |
#echo $INPUT | |
if [ 0 -eq ${INPUT} ]; then | |
cvlc -q -vvv screen:// :screen-fps=30 :live-caching=300 :input-slave=pulse://alsa_output.pci-0000_00_1b.0.analog-stereo.monitor --sout "#transcode{vcodec=h264,vb=384,fps=5,acodec=mpga}:duplicate{dst=std{mux=mp4,access=file,dst='$fname'}}" --sout-keep :screen-mouse-image=file:///home/cipher/exp/Mouse_pointer_small.png & | |
python myRecorder.py & | |
elif [ 1 -eq ${INPUT} ]; then | |
cvlc -q -vvv screen:// :screen-fps=20 :live-caching=300 :input-slave=alsa://hw:1,0 --sout "#transcode{vcodec=h264,vb=384,fps=5,acodec=mpga}:duplicate{dst=std{mux=mp4,access=file,dst='$fname'}}" --sout-keep :screen-mouse-image=file:///home/cipher/exp/Mouse_pointer_small.png & | |
python myRecorder.py & | |
elif [ 2 -eq ${INPUT} ]; then | |
amixer -q -D pulse sset Master mute; vlc --volume-step=1 v4l2://${DEV_VIDEO}:width=$input_width:height=$input_height:norm=${V_NORM} ${V_ASPECT} :input-slave=alsa://hw:1,0 --sout "#transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mpga,ab=192,channels=2}:duplicate{dst=display,dst=std{access=file,mux=mp4,dst='$fname'}}" ; amixer -q -D pulse sset Master unmute | |
elif [ 3 -eq ${INPUT} ]; then | |
vlc -q --video-on-top --qt-minimal-view -vvv v4l2://${DEV_VIDEO}:width=$input_width:height=$input_height:norm=${V_NORM} ${V_ASPECT} & | |
vlc -q screen:// :screen-fps=20 :screen-follow-mouse :live-caching=300 :input-slave=alsa://hw:1,0 --sout "#transcode{vcodec=h264,vb=384,fps=5,acodec=mpga}:duplicate{dst=std{mux=mp4,access=file,dst='$fname'}}" & | |
python myRecorder.py & | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment