Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-13-2014, 12:39 PM   #31
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: 6029691
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
me@minty16 / $ ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt gray -s 608x800 -i data.raw -f image2 -vcodec mjpeg frame.jpeg

Quote:
ffmpeg version 0.8.12-6:0.8.12-0ubuntu0.13.10.1, Copyright (c) 2000-2014 the Libav developers
built on Jun 10 2014 15:38:48 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[rawvideo @ 0x8240c80] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'data.raw':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: rawvideo, gray, 608x800, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'gray' for codec 'mjpeg', auto-selecting format 'yuvj420p'
[buffer @ 0x824b340] w:608 h:800 pixfmt:gray
[avsink @ 0x8241180] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x824a8c0] w:608 h:800 fmt:gray -> w:608 h:800 fmt:yuvj420p flags:0x4
Output #0, image2, to 'frame.jpeg':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: mjpeg, yuvj420p, 608x800, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
[image2 @ 0x8249860] Could not get frame filename number 2 from pattern 'frame.jpeg'
av_interleaved_write_frame(): Input/output error
errors can be safely ignored.

This converts kindle touch and paperwhite raw framebuffer to JPG in one command

(8 bit only)

Last edited by twobob; 06-13-2014 at 02:10 PM.
twobob is offline   Reply With Quote
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: 6029691
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
Advert
Old 06-13-2014, 03:11 PM   #33
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,207
Karma: 18210797
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
ah, there was an interesting post while you where gone - try this:

grab screen layout data
rotate: portrait -> landscape -> portrait
grab screen layout data

Duh?
Who changed the screen?

I don't recall which model / which firmware - but it was really weird.
knc1 is offline   Reply With Quote
Old 06-13-2014, 11:25 PM   #34
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 10,295
Karma: 17931787
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O & Forma
@knc1: I think it was on a K4, with its weird not-really-a-K3-but-not-really-a-K5-either kernel module.

@twobob: There was an (old) tool called fbgrab that was built for that, but AFAIR, it didn't support the fb format used on the Kindle. I also vaguely remember someone doing a quick'n dirty C (I think?) version of something similar on a GitHub project. (Whoo, vague hints galore! ).

EDIT: Eh. I think that's what you were referring to here .

Last edited by NiLuJe; 06-13-2014 at 11:31 PM.
NiLuJe is offline   Reply With Quote
Reply

Tags
hello world, kindle, languages, titbits, twobob

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free (K) World's Collider: A Shared-World Anthology [Science Fiction/Horror] kg3 Deals and Resources (No Self-Promotion or Affiliate Links) 0 09-14-2012 06:06 PM
Kindle free book: Hungarian Cookbook: Old World Recipes for New World Cooks, Expanded greencat Deals and Resources (No Self-Promotion or Affiliate Links) 0 06-15-2011 04:07 AM
UK/DE Kindle free book: World Kitchen: World Recipes greencat Deals and Resources (No Self-Promotion or Affiliate Links) 1 06-02-2011 10:53 AM
Old World and New World Computing kjk Apple Devices 0 01-31-2010 02:09 PM


All times are GMT -4. The time now is 06:23 AM.


MobileRead.com is a privately owned, operated and funded community.