ffmpeg -f x11grab -s $(slop --noopengl --format "%w"x"%h") -r 60 -i :0.0 -qscale 0 -vcodec huffyuv $(date +"%d.%m.%Y_%H:%M:%S").avi
ffmpeg -f x11grab -s 800x600 -r 60 -i :0.0+200,100 -qscale 0 -vcodec huffyuv $(date +"%d.%m.%Y_%H:%M:%S").avi
#!/bin/bash
NAME="$(date +%d.%m.%Y_%H%M%S).gif"
DEFAULT_DURATION=10
echo -ne "Select area which will be recorded"
AREA="$(xrectsel)"
IFS=+ read DIM X Y <<< $AREA
IFS=x read W H <<< $DIM
echo ""
#read -p "Enter recording duration in seconds: " USERDUR
# Duration and output file
if [ $USERDUR -gt 0 ]; then
DURATION=$USERDUR
else
DURATION=$DEFAULT_DURATION
fi
echo "$DURATION sec. Recording has started..."
byzanz-record --cursor --duration=$DURATION --x=$X --y=$Y --width=$W --height=$H /tmp/"$NAME"
echo "Recording has ended."
if [ -f /tmp/"$NAME" ]; then
xviewer /tmp/"$name"
fi
$ xclock&
[1] 6914
$ xdotool search -name xclock getwindowgeometry
Window 6291466
Position: 1422,487 (screen: 0)
Geometry: 164x164
$
$ xwininfo -name xclock
xwininfo: Window id: 0x60000a "xclock"
Absolute upper-left X: 1417
Absolute upper-left Y: 468
Relative upper-left X: 5
Relative upper-left Y: 19
Width: 164
Height: 164
Depth: 24
Visual: 0x20
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x22 (not installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +1417+468 -99+468 -99-418 +1417-418
-geometry 164x164-94+449