MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Kindle Formats (https://www.mobileread.com/forums/forumdisplay.php?f=168)
-   -   Kindle Fixed Layout file size too big (https://www.mobileread.com/forums/showthread.php?t=240878)

holdit 06-11-2014 09:55 AM

Kindle Fixed Layout file size too big
 
Need to revisit this question as I see 4 to 5 different answers from different dates. Earliest is 2010 latest is 2012.

I have a Kindle Fixed Layout .mobi file which is 115mb ( content is ALL images and I cannot lower the quality or they will be blurry) am I going to be able to upload this .mobi to Amazon without a problem?

I'm sure I'm not the only self publisher who has this problem as many children's books go over the 50mb limit.

Can someone give me a 2014 answer as there HAS to be a way as Ive seen a lot of books published on Amazon way over 50mb.

anyone?
thx

HI

Doitsu 06-11-2014 01:03 PM

Amazon recently officially revealed that there's switch that will prevent KindleGen from attaching the source files thus greatly reducing the overall file size: -dont_append_source

For example:

Code:

KindleGen -dont_append_source my.epub
will generate a .mobi file without attached sourcefiles.

You could also add the -c2 parameter for added compression:

Code:

KindleGen -c2 -dont_append_source my.epub
Note that adding the -c2 parameter may significantly increase the compile time.

holdit 06-11-2014 01:49 PM

Now thats an answer, great! And thanks but I see I'm able to add the code to the Kindlegen terminal wise, but I normally take the content.opf file and open it in my Kindle Previewer which generates the mobi.

Can I do this manually using unpacking the .mobi and adding the code then repeat OR do I have to use KindleGen?

thx

HI

holdit 06-11-2014 02:10 PM

Just looked at a tuts how to use Kindlegen, pretty easy but after I drag the content.opf file when I hit enter KG compiles the .mobi but where and when do I add the additional code?

R

Doitsu 06-11-2014 02:10 PM

Quote:

Can I do this manually using unpacking the .mobi and adding the code then repeat OR do I have to use KindleGen?
There's no need to upack the mobi, unless you no longer have the source files. Simply execute KindleGen with the -dont_append_source parameter and the name of the .opf file.
(Kindle Previewer uses KindleGen in the Background.)

If you're "command line challenged," try the following:

1. Make a backup copy of your source files.

2. Download Kindlegen and extract Kindlegen.exe to the folder that contains the .opf file:

3. Create a text file with Notepad and paste following text into it:

Code:

DEL conversion.log
FOR %%f IN ("*.opf") DO  (
        kindlegen -dont_append_source "%%f" >> conversion.log
)

Then save it as kg.cmd. (Make sure that the file has a .cmd extension.)

Double-click kg.cmd and wait for the .mobi file to appear in the Explorer.
If nothing happens, check conversion.log for error messages.

If you want to give the -c2 parameter a try simply add it before -dont_append_source:

Code:

DEL conversion.log
FOR %%f IN ("*.opf") DO  (
        kindlegen -c2 -dont_append_source "%%f" >> conversion.log
)


holdit 06-11-2014 02:15 PM

I think I got it so I will just add

-dont_append_source

THEN

drag the content file into the terminal?

If so add

KindleGen -c2 -dont_append_source my.epub

THEN drag the .opf to the terminal and hit enter?

E

holdit 06-11-2014 02:15 PM

by the way I'm on a Mac

holdit 06-11-2014 02:48 PM

Error I'm getting

Last login: Wed Jun 11 13:46:57 on ttys000
ralphiedees-Mac-Pro:~ tuneraider$ /Users/tuneraider/Downloads/GTLW_FILES/GTLW_KindleFixed/KindleGen_Mac_i386_v2_9/kindlegen /Users/tuneraider/Downloads/GTLW_FILES/GTLW_KindleFixed/content.opf KindleGen -c2 -dont_append_source

************************************************** ***********
Amazon kindlegen(MAC OSX) V2.9 build 0730-890adc2
A command line e-book compiler
Copyright Amazon.com and its Affiliates 2013
************************************************** ***********

Info:I9007:option: -c2: Kindle Huffdic compression
Info:I9018:option: -donotaddsource: Source files will not be added
Error(kindlegen):E30005: Could not find file KindleGen
ralphiedees-Mac-Pro:~ tuneraider$

JSWolf 06-11-2014 03:15 PM

Quote:

Originally Posted by Doitsu (Post 2849077)
Amazon recently officially revealed that there's switch that will prevent KindleGen from attaching the source files thus greatly reducing the overall file size: -dont_append_source

For example:

Code:

KindleGen -dont_append_source my.epub
will generate a .mobi file without attached sourcefiles.

You could also add the -c2 parameter for added compression:

Code:

KindleGen -c2 -dont_append_source my.epub
Note that adding the -c2 parameter may significantly increase the compile time.

-c2 will also increase the time it takes for the Kindle to open the eBook. It will also increase the processor usage and batter to have to decompress -c2. -c2 is not a good idea to use.

JSWolf 06-11-2014 03:18 PM

Quote:

Originally Posted by holdit (Post 2849152)
Error I'm getting

Last login: Wed Jun 11 13:46:57 on ttys000
ralphiedees-Mac-Pro:~ tuneraider$ /Users/tuneraider/Downloads/GTLW_FILES/GTLW_KindleFixed/KindleGen_Mac_i386_v2_9/kindlegen /Users/tuneraider/Downloads/GTLW_FILES/GTLW_KindleFixed/content.opf KindleGen -c2 -dont_append_source

************************************************** ***********
Amazon kindlegen(MAC OSX) V2.9 build 0730-890adc2
A command line e-book compiler
Copyright Amazon.com and its Affiliates 2013
************************************************** ***********

Info:I9007:option: -c2: Kindle Huffdic compression
Info:I9018:option: -donotaddsource: Source files will not be added
Error(kindlegen):E30005: Could not find file KindleGen
ralphiedees-Mac-Pro:~ tuneraider$

The best way to do it is...

Kindlegen -dont_append_source inputfilename outputfilename

I don't see a need to use -c2 as it won't gain enough to be worthwhile. Also, you did leave out the name of the eBook and you also need to specify the output filename as well.

eschwartz 06-11-2014 04:05 PM

You used "/path/to/kindlegen /path/to/opf KindleGen -c2 -dont_append_source"

You should've used "/path/to/kindlegen /path/to/opf -c2 -dont_append_source"

Try (no need for path to current dir, it makes things longer and more confusing):

Downloads/GTLW_FILES/GTLW_KindleFixed/KindleGen_Mac_i386_v2_9/kindlegen Downloads/GTLW_FILES/GTLW_KindleFixed/content.opf -c2 -dont_append_source

Kindlegen was looking for a file called "KindleGen" to convert.

@JSWolf, I suggest you stop telling other people how worth their time it is to decrease the size of their book in order that they can actually upload it. Regardless of whether it does enough to decrease the size, it costs nothing but some time that can easily be spent doing other things away from the computer. Also, your command-line instructions have the momentous failure of having nothing whatsoever to do with the actual workings of this particular program... which you would know if you had tried running the program to see the instructions. Take note of the usage:

Code:

C:\Documents and Settings\<username>\My Documents\Downloads\kindlegen_win32_v2_9>
kindlegen.exe

*************************************************************
 Amazon kindlegen(Windows) V2.9 build 0731-890adc2
 A command line e-book compiler
 Copyright Amazon.com and its Affiliates 2013
*************************************************************

Usage : kindlegen [filename.opf/.htm/.html/.epub/.zip or directory] [-c0 or -c1
or c2] [-verbose] [-western] [-o <file name>]

Note:
  zip formats are supported for XMDF and FB2 sources
  directory formats are supported for XMDF sources
Options:
  -c0: no compression
  -c1: standard DOC compression
  -c2: Kindle huffdic compression
  -o <file name>: Specifies the output file name. Output file will be created i
n the same directory as that of input file. <file name> should not contain direc
tory path.
  -verbose: provides more information during ebook conversion
  -western: force build of Windows-1252 book
  -releasenotes: display release notes
  -gif: images are converted to GIF format (no JPEG in the book)
  -locale <locale option> : To display messages in selected language
      en: English
      de: German
      fr: French
      it: Italian
      es: Spanish
      zh: Chinese
      ja: Japanese
      pt: Portuguese
      ru: Russian

No output file need be specified (it's optional ;)), there is no option to put in the title (which belongs in the opf), and the input file can be specified either before or after the switches, so that is not the solution either.

eschwartz 06-11-2014 04:12 PM

I gave kindlegen a run on a random book (322 KB). Without "-c2" it was 708 KB. With "-c2" it was 539 KB.

Increased compression: 23% smaller results. Not bad.

Without:
Info(prcgen):I1039: Final stats - text compressed to (in % of original size): 53.29%

With:
Info(prcgen):I1039: Final stats - text compressed to (in % of original size): 35.44%

I wouldn't be so quick to get all dismissive about trying the compression. All it costs it time, and honestly, not even all that much of it.

holdit 06-11-2014 04:19 PM

That worked thanks, got the file down to 65MB do I still have to get this down to 50 or under?

R

Hitch 06-19-2014 06:48 AM

Quote:

Originally Posted by holdit (Post 2849201)
That worked thanks, got the file down to 65MB do I still have to get this down to 50 or under?

R

Sorry, but: yes. Unless you are publishing for a company with a "real" publisher's contract (no offense; it's a different publishing contract than those provided to KDP-publishers, used for companies like Random House and smaller imprints), you're stuck using the KDP for upload, and if that file is larger than 50, you'll have problems. You can, of course, try it; it never hurts to try. But generally: 50 is your mark.

BPH's use FTP, and thus, are exempt from those limits.

HTH.
Hitch


All times are GMT -4. The time now is 07:30 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.