03-08-2012, 04:43 PM | #16 |
Enthusiast
Posts: 35
Karma: 2000
Join Date: Dec 2010
Device: none
|
I have a question that someone may be able to answer here. I've tested converting an ePub to Mobi using both Calibre and the new Kindle Previewer. The problem I found is that using the Previewer, it converts basically perfectly, styles and all...but with the latest Calibre it still seemed to align right on every paragraph, as Mobi's have apparently always done.
No problem, I'm sure that will all be fixed soon enough since Calibre is the all around most useful tool I've seen so far (next to Sigil for what it does . However, the Mobi file converted with the new Previewer (which I think uses the new KindleGen) is much larger than the original ePub (5mb larger). I've been told it's because Mobi keeps the original in there when it does the conversion, which wouldn't be a problem except that Amazon charges you per-MB and that can add up on a big book. I heard about Kindlestrip possibly removing the excess original material, but I'm not sure it will work since Amazon's new K8 format seems to be a new issue for all these programs. So, does anyone know if it's possible to remove the junk from a converted Mobi file and reduce the size so it's in-line with the original ePub size (or less if Mobi crunches images as I hear it does?) Does removing it damage it's usability in some way I won't want? And, is there any word on when Calibre might convert like the new Previewer does, keeping the styles intact? (If it left out the excess baggage..that would be sweet too) Thanks, JT |
03-08-2012, 05:09 PM | #17 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
If you were to strip out the old mobi format before uploading to Amazon, then only those with Kindle Fires (or the newest apps) would be able to read your book. The new format won't work on the older eInk Kindle devices (so far). |
|
03-08-2012, 05:19 PM | #18 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Hi,
There are standalone python 2.7 tools that do what you want available in the Mobi forum here at Mobileread. Grab the latest Mobi_Unpack_v045.zip from here: https://www.mobileread.com/forums/sho...&postcount=297 It will allow you to split your Kindlegen output into mobi7 (original mobi) and mobi8 (KF8) pieces, as well as convert the KF8 piece to be an epub that should look exactly like what your Kindle Previewer shows you. It may be easier to simply install the latest mobi_unpack_plugin. See the Calibre plugin thread for the latest version link. To remove the extra source archive get kindlestrip_v133.py that understands mobi file produced by the latest Kindlegen: https://www.mobileread.com/forums/sho...0&postcount=36 |
03-08-2012, 07:02 PM | #19 | |
onlinenewsreader.net
Posts: 324
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
|
Quote:
|
|
03-08-2012, 07:32 PM | #20 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I took Kovid's response to mean that he, himself, is not interested in working on a solution that involves third-party, proprietary binaries. And will not exert any effort on that front. Nor will something like that be included in calibre's official distribution. I get that. That's not what calibre is about.
That certainly doesn't stop someone from writing a third-party plugin that allows the user to supply the location of their local copy of kindlegen to build KF8's from ebooks in their calibre library... if only until an official calibre solution exists. There need be no dissension here. Last edited by DiapDealer; 03-08-2012 at 07:35 PM. |
03-08-2012, 10:04 PM | #21 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@nickredding: The difference between windows and kindlegen is that while the user *already* has windows, she may not already have kindlegen. In other words, calibre does not distribute an operating system of any kind open or closed source. When a user downloads calibre they are guaranteed that every part of calibre *itself* is open source. That little fact allows me, for instance, to make claims like this: http://manual.calibre-ebook.com/faq....a-virus-trojan. You may well be comfortable with using binary blobs for your software, not everyone else is, and I suggest you not dismiss their concerns out of hand. It is for this very reason that I refused to include the opencandy binary blob into the calibre installer, despite the fact that it might have increased my income from calibre.
To me one of the coolest things about calibre is how quickly bugs in the conversion engine are fixed, when they can be fixed. Relying on kindlegen means I would be forcibly reduced to depending on Amazon, and given the utter lack of quality in their ebook software division (something you as someone who has worked on MOBI can attest to) that is no small thing. Finally, my main motivation in writing calibre is to prevent the ebook ecosystem from relying on corporate entities and closed source software. In other words, one of my goals is to make knowledge of ebook formats available in the public domain. To me, reading and ebooks are important enough for that to be essential. Last edited by kovidgoyal; 03-08-2012 at 10:07 PM. |
03-08-2012, 10:43 PM | #22 |
Enthusiast
Posts: 35
Karma: 2000
Join Date: Dec 2010
Device: none
|
stripping before and after...but what gets charged?
I'll understand if no one has a definite answer for this, but so far I'm at least getting great helpful answers. So, if a Mobi file has both original and K8 formats in it, and if from that Amazon only sends the customer the right format portion based on which Kindle the customer has, I'd love to know if the publisher/author gets charged the transfer fee based only on the size the customer downloads, or the whole original size.
If the whole file is 15mb (because it's packed with 2-3 different content formats so Amazon can strip it apart and send one of them to the customer) I'd hope they don't charge the author for transfering the whole file size everytime if a customer really only downloads a portion, not the whole 15mb. Anyone know? Thanks, JT |
03-09-2012, 02:39 PM | #23 |
Enthusiast
Posts: 35
Karma: 2000
Join Date: Dec 2010
Device: none
|
KindleStrip > an amazing script...
Partly to answer my own question above, I've just now run the recent Kindlestrip python script against my huge Mobi file, stripping out the original ePub. Holy @#$!! what a difference. I have to say this is a sweet and simple little script, and it reduced the original 14.5mb Mobi file down to under 5mb.
For those who care, that amounts to a savings of $1.50 per book if Amazon charges the 'transfer fee' based on a file uploaded to them and left at the original 'Previewer' converted size. Serious money to say the least. On another point, which is significant to me, if anyone happened to get the original Mobi file, they'd be able to strip out the ePub and have that format as well...basically for free. Stripping it out is to the author's advantage I suppose. Amazon may strip it out, I don't know, but it made me wonder whether having all versions in there is done for other reasons. Maybe they want access to the ePub to offer that in the future. So, I want to say a big thank you to Kovid, DiapDealer, and definitely KevinH for all the help. My vote would be to incorporate the script into Calibre somehow since it would definitely make Calibre valuable not only for what it already is, but the potential cost savings described above. (Last thing: I noticed in testing with the new Kindle Previewer, that output looks great in the Fire preview, but apparently all other 'devices' still present the old (K7?) version, even the Kindle for iPad--no blockquotes, all right aligned, etc. That was disappointing since I might have hoped Amazon would let things look as good on the iPad as the do on the Fire...but maybe they have a different agenda.) A big thanks you to all you guys. -JTT btw, I'm starting a small publishing biz, for reasons more than just my own book. I think I'll write an article on what I've learned, and I'll definitely speak highly of Calibre and all of you. |
03-10-2012, 02:53 AM | #24 | |
self publishing novelist
Posts: 30
Karma: 54620
Join Date: Oct 2011
Location: dual citizenship in the interwebz and canada
Device: none
|
A lot to digest.... tossing my few cents back in the pot
I'd like to thank everyone for looking at this so thoroughly.
Quote:
The ePub file I started with was 819.3kb I ran it through kindlegen and it came out 2.2 a MB mobi that I uploaded to KDP. KDP processed it, accepted it and allowed me to download it to preview, and it was now 1.4 MB I don't have a Kindle Fire so I haven't been able to test it. As I understand it (but bear in mind I'm a noob self publisher, so I may well be wrong) the new kindle gen mobi files are designed to work on all Kindles. Since old Kindles and New Kindles are not compatible, I think this new container mobi included both an old fashioned mobi that works on older models, and the kf8 that works on kindle fire. Presumably when I uploaded the kindle genned version Amazon's processing compressed the thing. I would think when someone buys a kindle eBook they would want it to work, no matter which Kindle device they have. I would be worried that stripping out a version would mean that it might not work on one or the other. |
|
03-10-2012, 08:00 AM | #25 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
People have been stripping the source portion of the kindlegen output before uploading to Amazon for a long time with no adverse effects, but like you mentioned... I wouldn't suggest stripping out one format or the other before uploading. You may be limiting someone's ability to view your book that way (it would be different if you wanted to distribute your ebook on your own, and are only concerned with one format or the other). |
|
03-10-2012, 10:15 AM | #26 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
FYI: calibre's next release will be able to read KF8 both the standalone version and the combined into a single mobi file version. Thanks due to KevinH for the code on which this is based.
http://bazaar.launchpad.net/~kovid/c...revision/11644 |
03-11-2012, 11:01 AM | #27 | |
(he/him/his)
Posts: 12,160
Karma: 79742714
Join Date: Jul 2010
Location: Sunshine Coast, BC
Device: Oasis (Gen3),Paperwhite (Gen10), Voyage, Paperwhite(orig), Fire HD 8
|
Quote:
Any thoughts on when Calibre might have a version that can convert TO KF8? I realize that this is both a bigger task, and one that is less critical. |
|
03-11-2012, 11:27 AM | #28 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not anytime soon, unless someone else tackles it, I have a rather full inbox. The only reason KF8 read support was added so quickly was because KevinH sent me code I could adapt for it.
|
03-11-2012, 12:19 PM | #29 |
(he/him/his)
Posts: 12,160
Karma: 79742714
Join Date: Jul 2010
Location: Sunshine Coast, BC
Device: Oasis (Gen3),Paperwhite (Gen10), Voyage, Paperwhite(orig), Fire HD 8
|
Understood. Well, maybe KevinH will be motivated. IAC, I very much appreciate what we've got, and thanks to KevinH for his work.
|
03-11-2012, 01:17 PM | #30 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Hi,
I will take a look at this but no promises. Basically, KF8 is just a joined and reformatted epub. The problem is generating the skel, div, and other indexes and if necessary the DATP sections. It seems all KF8's come with DATP sections which may or may not be required. AFAIK, no one has reversed the DATP (they are not required for original mobi except I think for mobi dictionaries). I do not have code that actually writes or reads DATP section contents, nor do I have code that writes indexes other than ncx indexes. Also the right way to deal with all of the restructuring of the html is probably to use the lxml.etree code, but I am not familiar with it at all. I always resort to using regular expressions but moving and extracting tags and tag contents and adding aid= "" attributes just with regular expressions would be a pain. So don't hold your breath ... if (and this is a big if) I can figure out how to use the lxml.etree code, and if there is code inside calibre to write ctoc, tag maps, and INDX indexes and if the DATP sections are not required, then I can probably get something working. If DATP sections are required, I simply do not have the free time to reverse engineer them. KevinH |
Tags |
amazon, calibre, fonts, kindle, sigil |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Does Calibre support the Kindle FIRE? | TomTeaPack | Devices | 3 | 11-15-2011 09:02 PM |
Why People developed books in mobi or prc format, If Kindle support PDF book | tushar | Kindle Formats | 4 | 08-11-2011 03:50 AM |
Calibre support of new Kindle 3 | chilady1 | Calibre | 7 | 01-15-2011 04:36 PM |
Kindle support in calibre | user_none | Amazon Kindle | 85 | 09-20-2009 05:26 PM |
Does Calibre Support Kindle DX? | Sonist | Calibre | 16 | 06-20-2009 07:59 PM |