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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 03-22-2013, 05:53 PM   #76
pdurrant
The Ghost Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 32,183
Karma: 88959342
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by tomsem View Post
This will be especially useful now that the Personal Documents service preserves kf8 formatting. AFAICT, it does not strip the source before storing (file size is only modestly reduced), and there is a 50MB maximum file size enforced by Send to Kindle (and that limit is higher than can generally be sent as an email attachment). In some cases, it might be helpful to upload separate kf8 and mobi files to get under this minimum (mobi still required for iOS). Is there a way to do this?
KindleUnpack can split a file into separate Mobi and KF8 files.
pdurrant is online now   Reply With Quote
Old 03-23-2013, 11:40 AM   #77
tomsem
Wizard
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 2,444
Karma: 2519673
Join Date: Apr 2009
Location: USA
Device: iPod Touch, Xoom, Kindle PW, iPad3, Fire HD2
Quote:
Originally Posted by pdurrant View Post
KindleUnpack can split a file into separate Mobi and KF8 files.
Thanks,!
tomsem is offline   Reply With Quote
Old 04-20-2013, 06:48 AM   #78
steppe
Enthusiast
steppe began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
Quote:
Originally Posted by pdurrant View Post
As always, please comment with any bug reports or problems.
Hi. This is probably not a bug or problem, I just noticed that the stripped mobi from KindleStrip1.35 is slightly smaller than the stripped file produced by KDP, about 18KB difference. Why could this be?


Update: I used KindleUnpack to investigate and it turns out that this difference in size is due to an extra JPEG thumbnail of the cover image added by KDP (180 x 240 pixels, 17.3KB). It's a puzzle why KDP would do that because an identical thumbnail is already present in the ebook. KindleStrip doesn't add that extra thumbnail. I guess I answered my own question
Attached Files
File Type: zip Difference in file size.zip (6.37 MB, 53 views)

Last edited by steppe; 04-20-2013 at 07:58 AM.
steppe is offline   Reply With Quote
Old 04-20-2013, 07:46 AM   #79
pdurrant
The Ghost Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 32,183
Karma: 88959342
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
OK, I've downloaded and unpacked both with KindleUnpack 0.6.1., with the log everything option.

The stripped by KDP (presumably you mean uploaded to Amazon and this is the actual published file) has one more section in the Mobi file format, which results in 8 more bytes in the Mobi header.

Interestingly, it has the header fields identified as "first_content" and "last content" set to -1, instead of 1 and 61. I doubt that that's significant.

The extra section seems to come immediately after section 61 (the last of the text sections).

The KDP one also has more EXTH metadata - an extra 12 bytes, which is an entry for K8_Boundary_Section, which is set to -2 (0xFFFFFFFE).

The KDP one also has 12 fewer bytes (of NULLs) at the end of the header. 8180 instead of 8192. This is probably because of the extra EXTH.

Aha! The extra section, section 62 is an extra image file. It seems to be another Thumbnail image of the cover. Which is odd, as that's already present as section 61. The section 62 version is very nearly the same length, but has different binary coding. i.e. it's not an exact copy of 61, but probably newly scaled version of the cover image.

The extra image section is 0x456C (=17772) bytes, and there's the 8 bytes for the index to the section. That's a total of 17780 bytes in the KDP file.

1098644 + 17780 = 1116424

I wonder why KDP adds an extra thumbnail image.

(Checking in more detail, in the KDP version the EXTH identifying the thumbnail image does point to the new section. But in the other one, the existing thumbnail image is correctly identified, so KDP should know that it was there. Very mysterious.)

Last edited by pdurrant; 04-20-2013 at 07:49 AM.
pdurrant is online now   Reply With Quote
Old 04-20-2013, 07:51 AM   #80
steppe
Enthusiast
steppe began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
Quote:
Originally Posted by pdurrant View Post
I wonder why KDP adds an extra thumbnail image.
You just stole my thunder as I reached a similar conclusion myself Thanks for investigating this stuff and for the detailed response. Much appreciated.

The original file with the source attached was made by KindleGen 1.2 (old version) and perhaps this is the reason why KDP tries to provide an updated cover thumbnail.

Update: Yes, this was probably due to the old version of KindleGen because if I build the ebook using the latest KindleGen (2.8) and upload that file to KDP, the extra thumbnail is not added. Interestingly, KDP fails to strip the source files this time around (the .mobi file in the "Downloadable Previewer" still contains the attached source files), but if I proceed to the next publication step (Pricing and rights), KDP does show the reduced size of the file that will be published (1.05MB versus 4.84MB). Unpacking the .mobi file from the "Downloadable Previewer" (using KindleUnpack.61) suggests that the final published file is nearly identical in size to the file produced by KindleStrip: 4,965KB minus 3,827KB zipped source equals 1,138KB. The file produced by KindleStrip1.35 is 1,136KB.

Last edited by steppe; 04-20-2013 at 08:30 AM.
steppe is offline   Reply With Quote
Old 08-05-2013, 09:28 PM   #81
jefftriplett
Junior Member
jefftriplett began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2012
Device: kindle
Since a few of my side-projects relies on Kindlestrip I've been maintaining a version on github for a while. It's also available on pypi via `pip install kindlestrip` for anyone who uses pip.
jefftriplett is offline   Reply With Quote
Old 08-10-2013, 08:02 PM   #82
adam_omega
Member
adam_omega began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2009
Device: none
I code comic books and manga for the various eReader devices and am finding that if I use "KindleGen v2.9 for Windows (XP, Vista, 7)" and then strip the file with "kindlestrip.py 1.35"...
The end of the books show repeated pages and pages that are out of order (sometimes even the book's cover repeated). If I try to upload this data to KDP, I get an invalid mobi file error.

[Update: the problem seems to be with KindleGen v2.9. Downgrading to v2.8 doesn't have the issue when running KindleStrip.]

Last edited by adam_omega; 08-10-2013 at 08:44 PM.
adam_omega is offline   Reply With Quote
Old 08-11-2013, 03:23 AM   #83
pdurrant
The Ghost Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 32,183
Karma: 88959342
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by adam_omega View Post
I code comic books and manga for the various eReader devices and am finding that if I use "KindleGen v2.9 for Windows (XP, Vista, 7)" and then strip the file with "kindlestrip.py 1.35"...
The end of the books show repeated pages and pages that are out of order (sometimes even the book's cover repeated). If I try to upload this data to KDP, I get an invalid mobi file error.

[Update: the problem seems to be with KindleGen v2.9. Downgrading to v2.8 doesn't have the issue when running KindleStrip.]
Thanks for the report. If you could send me (paul@durrant.co.uk) source files that show the problem, I might be able to take a look at some point in the next couple of weeks.

Note that if you're uploading to Amazon for KDP, there's no need to use KindleStrip unless the pre-kindlestrip files are above Amazon's file upload limit.
pdurrant is online now   Reply With Quote
Old 08-11-2013, 04:36 AM   #84
adam_omega
Member
adam_omega began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2009
Device: none
Quote:
Originally Posted by pdurrant View Post
Thanks for the report. If you could send me (paul@durrant.co.uk) source files that show the problem, I might be able to take a look at some point in the next couple of weeks.
Sure, I'll send you an email some file links next week.


Quote:
Note that if you're uploading to Amazon for KDP, there's no need to use KindleStrip unless the pre-kindlestrip files are above Amazon's file upload limit.
Yes, they're 160~200 page books that clock in at around 40mb each on their own (as they're nothing but image files), so they have to be striped to be uploaded.
adam_omega is offline   Reply With Quote
Old 09-01-2013, 11:45 PM   #85
steppe
Enthusiast
steppe began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
Quote:
Originally Posted by adam_omega View Post
I code comic books and manga for the various eReader devices and am finding that if I use "KindleGen v2.9 for Windows (XP, Vista, 7)" and then strip the file with "kindlestrip.py 1.35"...
The end of the books show repeated pages and pages that are out of order (sometimes even the book's cover repeated). If I try to upload this data to KDP, I get an invalid mobi file error.

[Update: the problem seems to be with KindleGen v2.9. Downgrading to v2.8 doesn't have the issue when running KindleStrip.]
Interesting. I tested my fixed-layout templates and was unable to reproduce this issue. Built using KindleGen 2.9 (Windows) and tested in Kindle Previewer 2.901 (Fire, Fire HD, Fire HD 8.9", and Paperwhite modes) and on my Paperwhite device. The templates are about 14 pages long, 600 x 1024 pixels; I tested both the "comic" book type, portrait orientation (with or without a TOC page) and the "children" book type, landscape orientation (with or without a TOC page). Attaching the source files.
Attached Files
File Type: zip Comics 6x.zip (9.43 MB, 40 views)
File Type: zip Childrens_HTML-CSS.zip (13.90 MB, 35 views)
steppe is offline   Reply With Quote
Old 11-11-2013, 04:12 AM   #86
quiris
Connoisseur
quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.
 
quiris's Avatar
 
Posts: 96
Karma: 1432
Join Date: Oct 2013
Location: Poland
Device: Kindle Paperwhite
I have problem with stripped Mobi file.

1. The file w-obronie-wolnosci.epub (created with Sigil) has got logo "helion.pl" placed on title page.
2. The file w-obronie-wolnosci.mobi was created with kindlegen 2.9 for Mac.
3. The file w-obronie-wolnosci_stripped.mobi was created with KindleStrip 1.35 and has got following problem:

a. The file loaded in KindlePreviewer 2.92 with KindleFire settings has got replaced logo "helion.pl" with other image.
b. The same file loaded in KindlePreviewer 2.92 with Kindle e-ink settings has no such problem.
Attached Files
File Type: epub w-obronie-wolnosci.epub (1.47 MB, 32 views)
File Type: mobi w-obronie-wolnosci.mobi (3.61 MB, 30 views)
File Type: mobi w-obronie-wolnosci_stripped.mobi (2.13 MB, 34 views)
quiris is offline   Reply With Quote
Old 11-11-2013, 06:17 AM   #87
pdurrant
The Ghost Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 32,183
Karma: 88959342
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by quiris View Post
I have problem with stripped Mobi file.

1. The file w-obronie-wolnosci.epub (created with Sigil) has got logo "helion.pl" placed on title page.
2. The file w-obronie-wolnosci.mobi was created with kindlegen 2.9 for Mac.
3. The file w-obronie-wolnosci_stripped.mobi was created with KindleStrip 1.35 and has got following problem:

a. The file loaded in KindlePreviewer 2.92 with KindleFire settings has got replaced logo "helion.pl" with other image.
b. The same file loaded in KindlePreviewer 2.92 with Kindle e-ink settings has no such problem.
Can you confirm that the output of KindleGen (before kindlestrip) displays correctly? It is not clear from your post that you have checked this.
pdurrant is online now   Reply With Quote
Old 11-11-2013, 02:35 PM   #88
KevinH
Guru
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 953
Karma: 410248
Join Date: Nov 2009
Device: many
can verify problem

Hi Paul,

Please try the attached DumpMobiHeader_v014.py on a Kindlegen 2.9 generated mobi. You will see that there is now an extra BOUNDARY followed by a CONT section (container) that has its own exth and which has following sections where they are keeping high definition format copies of specific images.

I have modified DumpMobiHeader_v014 to at least show those new sections and dump the exth values in the new CONT header. There are other values in the CONT header as well but I am not sure what any of them are yet.

My guess is that the Kindle Fire and HD use these high resolution images stored outside the mobi 6 part and that somehow when kindlestrip removes the SRCS sections it is throwing off the code that accesses these now shifted high definition images.

My rec would be to go back to nulling out the SRCS sections so that we don't upset any offsets to images we do not understand yet.

I have attached the latest DumpMobiHeader_v014.zip here so please look at the original mobi using it and see if that makes any sense to you.

Take care,

KevinH
Attached Files
File Type: zip DumpMobiHeader_v014.zip (5.7 KB, 41 views)
KevinH is offline   Reply With Quote
Old 11-12-2013, 03:51 AM   #89
quiris
Connoisseur
quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.quiris is no ebook tyro.
 
quiris's Avatar
 
Posts: 96
Karma: 1432
Join Date: Oct 2013
Location: Poland
Device: Kindle Paperwhite
Quote:
Originally Posted by pdurrant View Post
Can you confirm that the output of KindleGen (before kindlestrip) displays correctly? It is not clear from your post that you have checked this.
I'm absolutely sure (200%). Original file displays the logo correctly.
quiris is offline   Reply With Quote
Old 11-12-2013, 04:49 AM   #90
pdurrant
The Ghost Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 32,183
Karma: 88959342
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by KevinH View Post
My rec would be to go back to nulling out the SRCS sections so that we don't upset any offsets to images we do not understand yet.

I have attached the latest DumpMobiHeader_v014.zip here so please look at the original mobi using it and see if that makes any sense to you.
Thanks, Kevin. It looks like an update is needed, but I don't know when I'll get time.
pdurrant is online now   Reply With Quote
Reply

Tags
k5 tools, mobi2mobi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript Wrapper Application for Kindlegen pdurrant Kindle Formats 20 07-09-2014 05:29 PM
how to use python script with windows xp tuufbiz1 Other formats 12 01-08-2011 08:22 AM
How do I get a shortcut for a Python script onto the taskbar in W7? Sydney's Mom Workshop 6 03-28-2010 08:11 PM
Nedd a little help with a python script gandor62 Calibre 1 08-07-2008 09:59 PM
Python script to create collections gwynevans Sony Reader Dev Corner 2 03-13-2008 12:29 PM


All times are GMT -4. The time now is 05:30 AM.


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