Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-31-2020, 08:56 AM   #1
bmsleight
Member
bmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enough
 
Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
Ok Monitor

OkMonitor

Making an OK Monitor from one or many e-readers.
  • VGA or HDMI connection
  • Resolution 1024x768 or lower
  • 5 fps - 6 inch screen or
  • 6 fps - 12 inch screens
  • Wireless, around 2 hours+
  • lag of around 1.2 seconds.

Big thanks to:-
  • NiLuJe
  • GeekMaster - their code lives on.
  • OpenWRT
  • Raspberry PI
  • JoppyFurr
  • This forum (mobileread.com - Kindle Developer's Corner)

Hardware needed, PI4, microSD card, USB HDMI Capture, (optional VGA in to HDMI out), Kindle Paperwhite V1 (one or four)

Software; MIT License.

Warning: Please do not skip installing Coward's Rescue Pack.
Warning: Grants SSH access to kindle via known key
Warning: Connects via a local wifi network, with known password

Overview and more details: https://barwap.com/projects/okmonitor/

Finished it before the end of the year.
bmsleight is offline   Reply With Quote
Old 12-31-2020, 08:56 AM   #2
bmsleight
Member
bmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enough
 
Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
*reserved*
bmsleight is offline   Reply With Quote
Advert
Old 12-31-2020, 09:57 AM   #3
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: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You *might* be able to achieve better performance if the ordered dither and rotate is moved to the transcoder, and then simply throw the frames at FBInk's print_raw_data.

As long as the input is actually 8bpp (which ffmpeg can do just fine, IIRC), that boils down to a memcpy, so, very fast.

Alternatively, FBInk can do the dithering for you (and it's relatively cheap). It could technically do the rotation, but not in a cheap way, and not on a Kindle.

EDIT: Well, it can do 16c dithering for you. Which is aimed at quality, not speed. For videos, if you really want speed, you'd possibly want a bitonal dithering and switch to A2 waveform modes.
On some devices, the *kernel* can do that for you, though: c.f., https://github.com/NiLuJe/FBInk/blob...nk.h#L237-L240 & https://github.com/NiLuJe/FBInk/blob....c#L1813-L1820

As for the rotation, an easier solution would be to cheat and rotate the framebuffer to Landscape first w/ fbdepth, that does work on a Kindle.

(c.f., FBInk's doom PoC).

Last edited by NiLuJe; 12-31-2020 at 10:05 AM.
NiLuJe is offline   Reply With Quote
Old 12-31-2020, 10:31 AM   #4
bmsleight
Member
bmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enough
 
Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
Quote:
Originally Posted by NiLuJe View Post
You *might* be able to achieve better performance if the ordered dither and rotate is moved to the transcoder, and then simply throw the frames at FBInk's print_raw_data.
Just when you think a project is finished!

God, my C skills need improving. I like the idea - ffmpeg could transcode this easier and maybe I could use a "lessor" PI. Might even reduce lag down as well.

The rabbit hole of toolchain set-up awaits.

Any hints how to stream to fbink ?
bmsleight is offline   Reply With Quote
Old 12-31-2020, 11:39 AM   #5
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: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Well, it's C, so, sky's the limit . There's networking involved, so, probably sockets though. Either in a way that keeps boundaries so you read frame-by-frame, or a stream that you chunk yourself into frame-size bytes before pushing that to FBInk.

Or keep going through an extra shell layer that uses nc to dump that in a local FIFO, but that seems like a waste when you can just do nc's job in C directly ;p.

Last edited by NiLuJe; 12-31-2020 at 11:43 AM.
NiLuJe is offline   Reply With Quote
Advert
Old 12-31-2020, 11:43 AM   #6
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: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
As far as toolchains go, https://github.com/koreader/koxtoolchain (or KOReader's docker images).
NiLuJe is offline   Reply With Quote
Old 12-31-2020, 12:14 PM   #7
bmsleight
Member
bmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enough
 
Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
Thank - useful.

The limitation is CPU speed at the moment. From the limited tests I have run. ffmpeg & raw2gmv is limited by CPU speed.

Quote:
Or keep going through an extra shell layer that uses nc to dump that in a local FIFO, but that seems like a waste when you can just do nc's job in C directly ;p.
When I only have a hammer in your toolkit, everything looks like a nail. I need to improve on my c & sockets skills. I have not done socket in c for 20 years.... even then not well.... Bare metal is fun. Might investigate https://github.com/NiLuJe/py-fbink/blob/master/hello.py

However, as per you first reply - a better way could be - transcoder then simply throw the frames at FBInk's print_raw_data. I expect ffmpeg is do that quickly, even if I need to split the screen in to quarters again.

Quote:
As far as toolchains go, https://github.com/koreader/koxtoolchain (or KOReader's docker images).
Firing up a debian vm....

I pretty sure - based upon loopback test that the USB HDMI capture is never going to be better than 800ms https://barwap.com/projects/okmonito...ation/#/laglag But shaving off the other 400ms would be good. Also fbink is on more than just PW1.

Any thoughts on max fps for fbink ?
bmsleight is offline   Reply With Quote
Old 12-31-2020, 12:59 PM   #8
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: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Will depend on screen resolution, and ultimately the bottleneck will be the EPDC, not FBInk (as I said, for 8bpp data, that's a memcpy, so, barely a few ms).
NiLuJe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Monitor KyBunnies Lounge 10 05-23-2015 02:41 AM
E-Ink Monitor xibalban Which one should I buy? 22 01-08-2015 10:42 PM
Al-Monitor recipe swerling Recipes 0 09-24-2014 02:14 PM
Monitor (superhero novel) RobertLCollins Self-Promotions by Authors and Publishers 2 11-14-2013 12:23 PM


All times are GMT -4. The time now is 09:56 PM.


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