View Single Post
Old 06-13-2014, 01:41 PM   #32
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
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

Last edited by twobob; 06-13-2014 at 02:13 PM.
twobob is offline   Reply With Quote