x11vnc
echo "Please, select window with vncviewer opened" WINGEOM=$(xwininfo | grep geometry | tr ' ' '+') OFFSET=$(echo $WINGEOM | cut -d'+' -f5,6 | tr '+' ',' | sed 's:^:+:') ffmpeg -f x11grab -r 15 -s 800x480 -i :0.0$OFFSET -vcodec libx264 -vpre lossless_ultrafast -threads 0 -y n900_screencast_$(date +%H_%M_%S).mkv
$ ffmpeg -f x11grab -s 800x480 -r 24 -b 100k -bf 2 -g 300 -i :0.0 -ar 22050 -ab 64k -acodec libmp3lame outputvid.mpeg
cvlc v4l2:///dev/video1 :v4l2-standard=0 :v4l2-input=1 :input-slave=alsa://plughw:2,0 --sout='#transcode{vcodec=mp2v,vb=4096,acodec=mp2a,ab=192,scale=1,channels=2,deinterlace,audio-sync}:duplicate{dst=display,dst=std{access=file, mux=ps,dst="out.mpg"}}'