The short answer is that with few exceptions you should NEVER need to scale down .mobi files because Amazon.com will do it for you.
I think 5.5 MB is a reasonable file size for an epub file. I don't know if it is a typo, but 60MB is a bit high for mobi files.
However, when you buy a .mobi file directly from the publisher, the preferred way to get it to your device is to upload it to Amazon's Personal Document Server which will feed it via wifi to your device.
See:
http://www.pcmag.com/article2/0,2817,2484180,00.asp
For mobi files, I do NOT recommend trying to transfer it to your device via USB because it requires you to put a bloated file onto a device which may not be ready to process it.
Uploading it to Amazon.com first will let Amazon to send to device a file size appropriate for it.
I was testing an ebook before I published it on Amazon.com. The epub file had high quality graphics and was 7.6 MB. The Mobi file was 16mb, but after I uploaded it to the Kindle's Personal Document server, I think the Kindle e-ink device only needed to download a smaller 1.5 MB file size to the device. It looked perfect even at that smaller size. Amazon reduced the size and resolution of graphics to match the device.
(It's possible that O'Reilly has multimedia files which are causing the bloat, but i doubt it.)
Some authors and publishers have problems optimizing their graphics and file sizes, but the Oreilly guys producing those ebooks are the best in the industry. So they are providing a book optimized for several different platforms and devices.
If you ordered the ebook directly from Amazon, then Amazon would automatically download the file size appropriate for your device. But when you purchase the ebook directly from the publisher, you are buying essentially a file before it has been compressed by Amazon.com (that's why it is foolish to transfer the file via usb to your device).
I am a big believer in buying the non-DRM file from a publisher or Smashwords rather than buying it from Amazon.com, but if you do that, you need to upload it to your device.
By the way, as someone who produces ebooks, producing .mobi files are a real pain in the neck --although I appreciate that Amazon now is sending you a file size according to what your device can handle.
FURTHER THOUGHTS: I occasionally have issues reading epub files with lots of graphics on Google Play Books or ibooks. Sometimes you're just going to have to live with the file size (especially if the graphics are a vital part of the content), but I trust O'reilly to do as much optimizing as possible. Occasionally you have self-published ebooks by amateurs which make no effort to keep file size down. This raises an interesting question: what file size would be difficult to read on current devices and reading software? Generally, if the epub is over 25 MB, I have found it cumbersome to read on a tablet.
In general - I am not recommending Calibre in full. Except its brilliant capability in converting ePub to pdf, kindle to epub etc etc.
ОтветитьУдалитьRegardless of viewer, the best way to reduce the file size is:
Unzip the epub file - Use any zip file reader, open the epub and expand it.
It will show many folders - and there will be one Image folder.
See the file sizes - if they are big - they may need attention. Use any graphic tool like photoshop - and reduce the resolution to 72 or 96. Reduce the file width to around 700 or 800 pixels - if they are large.
DO NOT RENAME THE FILES.
Open the ePub in zip reader and copy those images back to ePub.
Save it and your file should be smaller.
The other and the best solution is open epub with Sigil.
(I am with experience of over 3000 ePub/Kindle production in last 5 years for over 400 clients . If you need any assistance, please let me know via Quora.)
Epub files are essentially a collection of folders and files that are zipped. The overall file size is overwhelmingly due to the sizes of the image(s) in the epub.
ОтветитьУдалитьFirst, make a copy of the epub
Second, change the copy file extension from .epub to .zip
Third, unzip the zip file.
Fourth, there will be an /images folder that has been unzipped
Fifth, take these images and compress them with a decent image compression program or an online web compressions service. For Linux: Trimage or ImageMagick; for Windows: Caesium; for OSX: ImageOptim. Note that most of these are GUI apps that support drag-and-drop and do in-place compression. This is easiest.
Sixth, take the compressed images and replace the uncompressed images (if done in-place then the originals are already replaced).
Seventh, rezip all the files in the epub. Most operating systems have a built in tool supporting the creation of zip files. In OSX they call this creating an “archive”.
Eighth, rename the .zip file to .epub
Ninth, compare file sizes between the .epub with the newly compressed images compared with the original .epub
Note: For a process which is a little more technical but quick and results in roughly using ImageMagick from the command line and tackling all of the .jpg files in a directory, using FishShell as the scripting interface:
for file in *.jpg;
convert -strip -interlace Plane -quality 85% $file $file;
end
This resulted in two sample epubs: 48mb to 15mb (60% reduction), and 110mb to 38mb (65% reduction).
All images in MOBI files are stored as JPEGs. For certain classes of image, jpegs are much larger than PNGs. Various MOBI renderers have various problems trying to render PNG images.
ОтветитьУдалитьTry using Amazon's free Kindlegen utility to convert from epub to mobi. Specify standard or HuffDic compression and -- here's the key -- include "-dont_append_source" in the command prompt instruction. For me, including that last (undocumented?) option reduced file size by approximately *half*, with no effect that I can see when reading the ebook file in calibre.
ОтветитьУдалитьTried this with an epub I had shrunk from ~63 MB to <5 MB by lossy compression of jpg images. Normal conversion in calibre gave me a mobi of ~12 MB! Kindlegen without appending source gave me a mobi of ~6 MB.
For images inside a MOBI (AZW) ebook, the largest in-line displayed image size for the Kindle 1 is 525x640 and the Kindle 2 should be similar (images are automatically rescaled to fit). Both now support a 600x800 "zoom" mode, which will also use landscape if necessary, see Kindle now Zooms AZW Images.
ОтветитьУдалитьSome ebook images were optimized for the Kindle 1 by using only 4 grey scales, and these are now usable but suboptimal on the Kindle 2. If you want to optimize for the Kindle 2, then 16 greyscales and 525x640 or 600x800 or 800x600 are good sizes (keep the original aspect ratio). Note that the Kindle 3 will probably have a screen larger than 600x800 pixels (and the iPhone has a color screen), so device specific optimizations are only a good idea if you really need the very best result on a single device type.
If the original is large and in color, I would use it "as is" in JPEG format. By large I mean at least 500x500, and I would not change the size of images up to about 1500x1500. Let the device rescale the image for you. If the original image is small, then get a larger version if at all possible.
I attach a test MOBI file, and screenshots from a Kindle and from Windows MobiPocket Reader with a 600x800 reading window. The treatment of images is dramatically different on the two devices. Under Windows, all images are displayed full size if possible and if not an "image mode" is available by clicking on the image. The image mode allows magnification, but the standard view is always unmagnified. On the Kindle, all images are doubled in size up to a maximum of 525x640 and images that are then too large are resized while maintaining their aspect ratio to fit. Unlike with TOPAZ ebooks, there is no image/zoom mode. In previous threads (e.g. All on the Mac: PDFs with Formatting) I had concluded that the Kindle's MOBI/AZW maximum image size is 520x640. Direct inspection of the attached screenshots indicate that it is actually 525x640.
ОтветитьУдалитьAmazon DTP software forces images to be no larger than 450x550, see Full-screen Images. So all its images will be resized on the Kindle! However, its recommended aspect ratio of 9 to 11 is very close to the actual aspect ratio of 525 to 640.
The actual size of the viewable book area on the Kindle 1 screen is 524px × 640px, and the viewable book area on the Kindle 2 screen is 520px × 622px. Any images larger or smaller than that (including those sized 450px × 550px) will be automatically re-sized until the width or height fits the viewable book area.
ОтветитьУдалитьKeep in mind Calibre won’t help if it is a fixed layout book. While azw3 has all the data, it won’t correctly export to mobi. all bug reports regarding fixed layouts are turned down. I have an epub with lots of images, 10 mb in size, but the resulting mobi is 200 kb, it completely ignores all the images when it converts.
ОтветитьУдалитьkindle preview generates a correct mobi for you from an epub, but it adds your sourcefiles into it. so that the resulting file is much bigger than necessary
It would be great with a mobi packer plugin for Calibre.
edit: kindlegen takes an undocumented parameter: -dont_append_source
KindleUnpack is primarily intended for debugging KindleGen issues. If your original Kindle books is an AZW3 book or a MOBI book generated with KindleGen, you can edit it with Calibre Editor.
ОтветитьУдалитьSimply select the book in Calibre, right-click it and select Edit book. This will automatically unpack the book and open it in Calibre Editor. If you save the book it'll be automatically reassembled.
I am using a scanner to digitalize documents at high quality (600 dpi), using the scanner software. Afterwards I use the 'Optimize Scanned PDF' function of Adobe Acrobat, mainly to deskew the pages.
ОтветитьУдалитьThe optimized file is about 15 times smaller than the original, but there is a slight loss in quality, even shifting the control bar completely to the high quality side and deactivating all the optimizing tasks, except for the deskew function.
Is there any way to deskew the documents minimizing the qualtiy loss? I'm using Acrobat 9 Pro Extended in case it matters
The mobi created by kindlegen is so huge because kindle will append the source files to the mobi file.
ОтветитьУдалитьWe can use the script kindlestrip.py to make the mobi be small.
But the author said we shouldn't use the kindlestrip.py to make mobi file be small now because it may make the wrong mobi formater. We should use the arguemt "-dont_append_source" when we use kindlegen.exe to generate mobi file.
For, example "kindlegen.exe -dont_append_source xxxxx.epub".
And the mobi file will be small.
:: This batch script converts all the epubs in its folder to mobi.
ОтветитьУдалить:: It requires that you have Kindlegen installed, see
:: https://www.amazon.com/gp/feature.html?docId=1003018611
:: Thanks http://www.mobileread.com/forums/showpost.php?p=2554984&postcount=2
:: For the latest version of this script, see
:: https://gist.github.com/arthurattwell/79a69ad9cda5e5518c6fe4c32d207b2c
:: Don't show these commands to the user
@echo off
:: Keep variables local, and expand at execution time not parse time
setlocal enabledelayedexpansion
:: Set the title of the window
title epub2mobi
echo This will convert all epub files here to mobi.
pause
for %%f in ("*.epub") do (
echo Converting "%%f"...
call kindlegen -dont_append_source "%%f" >> conversion.log
echo Done.
)
echo All done.
pause
Use optimized graphics and Calibre’s “do not covert” option to drastically lower you Amazon KDP delivery fees.
ОтветитьУдалить