11-14-2012, 08:37 PM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2012
Device: none
|
Problem, Kindle doesn't open my mobi file
Hi
I am developer and i decided to write a export odt to mobi plugin for the software (Calligra Author) that i am working on it. After attempts i succed to write it or better to say not succed because now calibre can open and show the files but kindle can't. I check the differences between my file and other files ( mobi files that i had created them with mobi packet creator and calibre). I don't know where is the problem and where i am working wrong. I attached my file. I really like to do to make my file work because i am working on it for month, and i realy need help. and sorry if i write bad because my english is not very good. Regards moji |
11-14-2012, 09:16 PM | #2 |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Hi! Welcome to MobileRead!
I can't help you with the file validation, but it did also break my copy of Kindle 4PC. But we do have a number of developers around here who have worked on the guts of Mobi files. One of them should be able to help you. |
11-14-2012, 09:18 PM | #3 |
Resident Curmudgeon
Posts: 75,739
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You could have a look at the code of Calibre and see if that helps.
|
11-14-2012, 09:35 PM | #4 |
Grand Sorcerer
Posts: 11,732
Karma: 128354696
Join Date: May 2009
Location: 26 kly from Sgr A*
Device: T100TA,PW2,PRS-T1,KT,FireHD 8.9,K2, PB360,BeBook One,Axim51v,TC1000
|
Have you looked at the Mobiperl tools?
https://dev.mobileread.com/trac/mobiperl Mobils might help you compare your output to a known-good mobi file. Plus the source code for the HTML to Mobi converter might be useful. |
11-14-2012, 09:47 PM | #5 |
Grand Sorcerer
Posts: 27,856
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The problem is that you've not converted the html from your original source (whatever that may be) into any kind of valid mobi markup. It's a MOBI by all external appearances (the binary database structure is valid), but that's about it. Your internal mobi markup frankly looks like straight-up HTML4 -- complete with inline CSS. That'll never fly on any MOBI app/device. Calibre views it because calibre's viewer doesn't really render MOBIs. It extracts the contents of all ebooks into an OEBPS-compliant format for viewing.
Hit up the MOBI WIKI here, and use something like Mobi_Unpack.py to see what the markup looks like inside some valid MOBIs. Last edited by DiapDealer; 11-14-2012 at 09:50 PM. |
11-15-2012, 01:57 AM | #6 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Moved to the Mobi forum.
|
11-15-2012, 02:14 AM | #7 |
Indie Advocate
Posts: 2,863
Karma: 18794463
Join Date: Sep 2010
Location: Melbourne, Australia
Device: Kindle
|
Given that Kindle is my platform of choice at the moment I really should get my a** into gear and learn the mobi format a bit. I could possibly put together a couple of utilities to help me.
|
11-15-2012, 04:48 AM | #8 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2012
Device: none
|
Thanks for all of your answers.
DiapDealer i will use Mobi mark up and will back again. but i have used Mobi_unpack to unpack my mobi files its html is ok but in its debug ther are some thing that i think should be the problem. These are the part of unpack debug: Section is 7 First 4 bytes: 46 4c 49 53 Skipping FLIS section Section is 8 First 4 bytes: 46 43 49 53 Skipping FCIS section Section is 9 Skip section 9 as it contains the EOF record. I don't have any idea !! Thank all again. |
11-15-2012, 06:07 AM | #9 | |
Grand Sorcerer
Posts: 27,856
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Use calibre or kindlegen to convert your source material to a MOBI. Then use Mobi_Unpack to examine the raw markup they produce as compared to the raw markup in your mobi. The difference will be quite apparent. MOBI-markup is more akin to HTML3.2 -- all inline attributes and no styles/classes. Last edited by DiapDealer; 11-15-2012 at 06:21 AM. |
|
11-22-2012, 05:54 PM | #10 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2012
Device: none
|
Hi DiapDealer
Thanks for your help As you told me i put a standard mobi mark up in mobi and now kindle can open my ebooks but an uncmpress one. Thank you |
11-25-2012, 07:14 AM | #11 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2012
Device: none
|
Hi all
again me and my mobi converter problem. The problem is now about image, its html is standard as i know and think header is ok too. But Kindle desktop previewer can not open it. :/ Again no idea why!! I have attached file. Moji |
11-25-2012, 08:08 AM | #12 | |
The Grand Mouse 高貴的老鼠
Posts: 72,087
Karma: 307935764
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
By comparing the files (use mobiunpack in dump mode) and tweaking the file you generate, you should be able to find out which bits you need. But bear in mind that there's no guarantee. The Mobi file format is officially undocumented. Last edited by pdurrant; 11-25-2012 at 09:02 AM. |
|
11-26-2012, 11:42 AM | #13 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2012
Device: none
|
Thank you pdurrant
But it didn't help me, any idea? when i get diff from my ebook and one of calibre ebook (mobi) in headers There is an attribute "Extra Record Data Flags" ( https://wiki.mobileread.com/wiki/MOBI#MOBI_Header) in mobi header That for calibre is "1". This attribute is important? and it can be the problem? |
11-26-2012, 12:31 PM | #14 | |
The Grand Mouse 高貴的老鼠
Posts: 72,087
Karma: 307935764
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
The other two bits indicate other stuff that can be at the end of the text sections. Since you're creating the file, and it only currently has one small text section, this is not your problem. |
|
11-26-2012, 01:09 PM | #15 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2012
Device: none
|
Hi
I fixed the problem and now i support images too. The problem was about two bytes zero. After the text i should add two bytes zero. This two bytes zero called "Magic Records ". Thanks from all. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle Fire doesn't display some images in MOBI file | RobFreundlich | Devices | 2 | 03-25-2012 07:15 AM |
Can I get a .mobi file to open on the cover image? | Todd Young | Conversion | 2 | 01-17-2012 02:25 PM |
Java open source api required to convert from PDF to MOBI file | tmpnkvee | Kindle Formats | 5 | 12-05-2011 07:39 AM |
Problem sending mobi file to Kindle via email | readslow | Amazon Kindle | 5 | 07-29-2011 08:45 PM |
sigil doesn't open epub file | cyberbaffled | Sigil | 8 | 11-10-2009 03:28 PM |