ciromattia / kcc

KCC (a.k.a. Kindle Comic Converter) is a comic and manga converter for ebook readers.
ISC License
2.76k stars 221 forks source link

Kindle Scribe mobi limited to 1920 height #460

Open pretenderlu opened 1 year ago

pretenderlu commented 1 year ago

When I choose ks for output, the generated mobi does not reach the resolution of 18602480, but xxxx1920.What seems to be a limitation?

darodi commented 1 year ago

@pretenderlu

Do you have an example? input file and settings used? (GUI settings or command line settings)

pretenderlu commented 1 year ago

I have tried many times, whether it is ks or other custom, or choose not to process the picture……maybe you can try any one picture 1860x2480 Sample:https://drive.google.com/file/d/1SMI5fIbq0gVkc75bcrg3JgtzOncC2N/view?usp=share_link

darodi commented 1 year ago

@pretenderlu

I tried your input file same settings as Quicker_20230119_163441.png if I unzip the generated 001.epub

in \001\OEBPS\Images\ the file test.jpg is 1860 x 2480 Pixels (4.61 MPixels) (3:4)

<img width="1860" height="2480" src="../Images/test.jpg"/> in 001\OEBPS\Text\test.xhtml

Where and how do you see a result of xxxx1920?

powersee commented 1 year ago

@darodi if you turn the epub to mobi, the picture will be change

pretenderlu commented 1 year ago

@darodi Epub is OK. The problem is the mobi format file.

darodi commented 1 year ago

How did you convert to mobi?

pretenderlu commented 1 year ago

@darodi Just use KCC, output epub & mobi as the same time.

pretenderlu commented 1 year ago

@darodi I just use KCC, so that means I using kindlegen.

The kindlegen is from https://www.amazon.com/Kindle-Previewer/b?ie=UTF8&node=21381691011 in Amazon Kindle Previewer 3 Folder\lib\fc\bin.

nicoladicicco commented 1 year ago

I experience the same issue (.epub is 18602480, .mobi/azw3 is x1920) both by using KindleGen and Send to Kindle via browser. :(

darodi commented 1 year ago

@pretenderlu @nicoladicicco

Indeed, there seems to be a limitation with kindlegen.

What is the result if you open the created epub in Kindle Previewer 3 https://www.amazon.com/Kindle-Previewer/b?ie=UTF8&node=21381691011 and export to mobi?

Use the GUI or command line: Put C:\Users\username\AppData\Local\Amazon\Kindle Previewer 3\ in your path or go into that directory then:

"Kindle Previewer 3.exe" 001.epub -convert -output .

There is also a new pc version of Send to Kindle for Windows. https://www.amazon.com/sendtokindle/pc Is the result correct with it on your device?

pretenderlu commented 1 year ago

@darodi Unfortunately, still the same result.

axu2 commented 1 year ago

I thought the images looked a little soft, so this is why. I converted the final MOBI back to EPUB using Calibre and see it now. image

Looks like kindlegen used to have a -preserve_img parameter that either got removed or renamed. https://reverseengineering.stackexchange.com/questions/14121/how-to-find-obfuscated-hidden-command-line-parameters.

There's a bunch of references to 1920 here: https://kdp.amazon.com/en_US/help/topic/G9GSTY4LTRT39D4Z

pretenderlu commented 1 year ago

@axu2 I'm just more confused, after all, ks can support such a large resolution, it's still a shame. Speed is not a point of concern for me.

darodi commented 1 year ago

@pretenderlu @axu2 @powersee @nicoladicicco

Amazon has announced the retirement of its proprietary MOBI file format for eBooks, and a transition to the EPUB format for use on Kindle devices and apps. (August 2022)

I don't own a kindle scribe, but could someone try to use https://www.amazon.com/sendtokindle with an epub to send to kindle scribe and tell the result?

I doubt the file in the kindle will be a mobi file, and the resolution might be correct.

nicoladicicco commented 1 year ago

@darodi I have sent recently several epubs to my Scribe using Send to Kindle via web. They are converted to AZW3, and to the best of my recent experience the image resolution is still downscaled (down to 1440x1920).

Amazon's support for epubs means that you can indeed sideload epubs to your device... but for now they still need to be converted in their proprietary format

AkitoFire commented 1 year ago

Is there any other way to send a file to the Kindle Scribe with the native resolution of the panel (2480x1860)? Or does that mean you're always limited to x1920 and <256kB images? I'm new to Kindle devices, so I don't know

AkitoFire commented 1 year ago

Thanks! That's honestly pretty sad, wanted to get a Scribe for high-quality manga...

axu2 commented 1 year ago

Yea, it's barely better than the Kobo Elipsa. Maybe Amazon will unlock the resolution later in a future version of Kindle Previewer, I bet the maximum resolution was hard coded like 10 years ago for the Kindle Fire which had 1920 height.

EDIT:

These projects don't use kindlegen to create MOBI, bypassing the 1920 restriction: https://github.com/leotaku/kojirou https://github.com/tsopeh/mapaki

both use the go library: https://github.com/leotaku/mobi

Feel free to experiment and report your results on image quality/sharpness/file size. The fact that this is a 3rd party implementation of MOBI file creations may have issues since I haven't tried it myself.

~An idea could be using KCC Scribe profile but select CBZ output to resize to 2480 height and other kcc optimizations. And use that CBZ in the other projects to make a MOBI without the 1920 restriction.~

celogeek commented 1 year ago

I've done some test with local conversion. I create an epub from my comic, which resolution is ...x3031 (3031 height). The size is 245M

I also create an epub from the same comic with max resolution set to 1920 (height). The size is 122M

Then I run on each of my epub,

kindlepreviewer EPUB -convert

I have 2 mobi. The high resolution take a long time to convert and the size is 374M The standard resolution take little time to convert and the size is 246M

When I ask calibre to transform those mobi to ZIP or EPUB, I check the images directory after unpacking, both have image with maximum width or height to 1920 both have the same size of 126M

So, first, if the image is resized, why do we have 2 differents size of mobi here ? And why both mobi lead to the same epub size ?

is it possible that the image is actually correct in the mobi, but calibre downsize it during conversion ???

Summary: HR(3031 height): Mobi = 374M => epub = 126M => image from epub limited to 1920 SD(1920 height): Mobi = 246M => epub = 126M => image from epub limited to 1920

celogeek commented 1 year ago

After fixing my converter call, with "dont_append_source" (thx @darodi ), both endup with similar size. The big difference is the time of conversion. For the 1920 resolution, it's few seconds, as if he don't need to do anything, just convert. The 3031 resolution, take 15 min I think, and each image seems to be resize.

With the current support of amazon, image <=1920 is highly recommended. Same result but very fast conversion.

I see some module on GoLang to create AZW3, I haven't seen something about resizing image in it, I will give it a try.

celogeek commented 1 year ago

The module seems to generate an older version of AZW3. So even the format has versioning. I haven't found an obvious way to transform an ePub to AZW3 in the doc. I see this: https://github.com/leotaku/mobi Is a kind of helper for the PDB database. At some point, it's a matter of pushing html+css+image into the palm database in a specific order I suppose. The HTML include ref to image, but ref are encoded differently into an MOBI. It's like a ID in a database.

I will try to find some example with an image.

AcidWeb commented 1 year ago

This application create hybrid MOBI/AZW3 files. Don't be misled by extension of file output. All problems described in this topic are limitations of the used format and/or kindlegen itself.

Remember that Amazon already moved to KFX format.

If KindleGen work "slow" that mean it reconverting images created by KCC again as they are outside the specification.

Don't expect this issue to be fixed on Amazon side. This is not a bug.

celogeek commented 1 year ago

Is they a way to create KFX from Epub with a tools from amazon ? or third party tools ? may be calibre ? is that accurate ? does it works ?

celogeek commented 1 year ago

KFX support larger image ?

darodi commented 1 year ago

There is a plugin in calibre to convert epub to kfx https://www.mobileread.com/forums/showthread.php?t=272407 I haven't tried HQ images yet.

ghost commented 1 year ago

I had tried this method, use the plugin in calibre to convert epub which is generated by KCC, the picture in the result kfx file could not fill the full screen.

2ji3150 commented 3 months ago

There is a plugin in calibre to convert epub to kfx https://www.mobileread.com/forums/showthread.php?t=272407 I haven't tried HQ images yet.

I use Calibre to convert CBZ files to KFX (using the KFX output plugin) and use the viewer in Calibre. It displays that the image resolution is 1859 x 2480 (no cropping). However, as others have said, the image does not fully fit on Kindle Scribe.

axu2 commented 3 months ago

Did you use the process described here?

https://www.mobileread.com/forums/showpost.php?p=4430602&postcount=1547

2ji3150 commented 3 months ago

Did you use the process described here?

https://www.mobileread.com/forums/showpost.php?p=4430602&postcount=1547

You saved my life! Yes, it is the best way! Absolutely the best quality. I can only say that the creation process is too complicated. Using Kindle Create is very painful; aside from the error prompts, it crashes if there are any non-English characters in the path. It also seems that the author's name cannot be entered in Unicode (though I'm not sure about this yet). Compared to Kindle's official books, the converted KFX only lacks the fast page-turning and bookmark functions, which is almost ideal. I hope that in the future, there will be a way to simplify these processes, especially a fully CLI-based method...

axu2 commented 3 months ago

@2ji3150 if you could upload some comparison shots here or on mobileread, that'd be cool.