logical evolution:
grab.sh: <kindle-ip e.g 192.168.1.70> [Trim Y max]
ssh root@"$1" cat /dev/fb0 | ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt gray \
-s `ssh root@"$1" eips -i | grep xres_virtual | \
[ $# > 1 ] && -v arg=$2 awk '{print$2"x"arg}' || awk '{print$2"x"$4}'` \
-i - -f image2 -vcodec mjpeg kindle-$1-`date +%s`.jpeg
Should detect framebuffer size and performs pull request simultaneously.
Also assign a unique name based on time and IP. handles 3rd arg via ternary
One slight problem on some KT there is a 608x3584 virtual buffer and a 600x800 actual specification.
on the PW even bigger...
Quote:
Variable framebuffer info
xres: 758 yres: 1024
xres_virtual: 768 yres_virtual: 6144
|
I think the simple script with an extra arg allowing to trim on the Y would be a nice facility on the average linux box with ffmpeg. not sure but this might be fun on the kindle, there is probably an easier way
command <kindle-ip> [y-max]
would be a lot simpler than the current screenie faffing I do.
but to keep things simple
ssh root@demo cat /dev/fb0 | ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt gray -s `ssh root@demo eips -i | grep xres_virtual | awk '{print$2"x"800}'` -i - -f image2 -vcodec mjpeg out.jpeg
works as a nice one liner.
and if you know what it is you want...
export IP="192.168.1.77" && ssh root@"$IP" cat /dev/fb0 | ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt gray -s 768x1024 -i - -f image2 -vcodec mjpeg out.jpeg