09-05-2011, 04:11 AM | #136 |
Member
Posts: 18
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
(we crossed paths in the bitstream)
So if the kindlegensrc.zip is supposedly the source files, it is not the exact source files: the directory structure is modified, and the files are tweaked to reflect the changed directory structure. Maybe exporting any unknown binary data into files would make disassembling it a bit easier, at least. I have no clue where the .ncx file goes, or what format it gets placed in (maybe Kovid does), but without any obvious way of looking at it, it is pretty hard to figure that out. Seems reasonably likely, if there are more binary pieces than mobiunpack presently ignores, that one (or more) of them probably is the .ncx data. And maybe others would be the .mp3 files I was asking about earlier, although sadly adding .mp3 files is something that keeps slipping further out in my project list. |
09-05-2011, 04:12 AM | #137 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
If you have a kindlegensrc.zip, you can just ignore the remaining output of mobiunpack. Unfortunatly most mobi files don't contain the record which contains the kindlegensrc.zip, so using the content to improve the mobiunpack output won't help in most cases. But at least the new mobiwriter in calibre should handle ncx files, so the calibre source should give the information how the ncx content is encoded in the mobi file. Ciao, Steffen |
|
Advert | |
|
09-05-2011, 04:17 AM | #138 | |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
All the other files generated by MobiUnpack are generated by decoding the info in the Kindle ebook. In particular, the opf file is put together from bit of info in the header, EXTH records, and even from the HTML. It should have most of the info in the original opf file, but not all that info will actually be contained in the Kindle ebook. |
|
09-05-2011, 04:21 AM | #139 |
Member
Posts: 18
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
And regarding .mp3 files, here's a sample .mobi with .mp3 that I got from somewhere, maybe with the Kindlegen documentation?
|
09-05-2011, 04:22 AM | #140 |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Oooo... I wonder if the developer of that has documented it in the wiki? That would make life easier. Hmm.. apparently not. When I have some spare time I'll check the calibre sources.
|
Advert | |
|
09-05-2011, 04:27 AM | #141 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
Ciao, Steffen |
|
09-05-2011, 04:30 AM | #142 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
Ciao, Steffen |
|
09-05-2011, 04:44 AM | #143 |
Member
Posts: 18
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
The source was just an .html file and a .mp3 file (in a subdirectory named multimedia). Attached as a .zip.
|
09-05-2011, 10:57 AM | #144 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
|
|
09-05-2011, 04:53 PM | #145 |
Bookmaker & Cat Slave
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
09-06-2011, 06:28 AM | #146 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
The handling of audio and video files is almost identical to image files (surprise The only difference is that there is a 12 byte header prepended to the original audio/video file which starts with "AUDI" or "VIDE" followed by 2 integers of unknown value. Also quite similar to the image handling the source attributes of the html tags are replaced with the record numbers: src="file.mp3" -> mediarecindex="00002" poster="file.jpg" -> recindex="00003" So it should be easy to add support for audio/video to mobiunpack. But is audio/video support really used in the wild? My understanding is that only very few Kindle platforms are supporting them (is there a list which shows the supported platforms?) Ciao, Steffen |
|
09-06-2011, 09:46 AM | #147 |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
NCX Decoding Puzzle
Well, I took a quick look at where the ncx file might be being stored, and it turns out that when an ncx file is added to the sources, you get three extra records added to the Mobipocket file.
Here's the source NCX file, along with the three added sections of the Mobipocket file (separated out into individual files). I don't have time to properly decode the binary formats, but if anyone fancies a puzzle, here they are. The task is to work out how to reconstruct (as best as possible) the source ncx file from the compiled binary files. |
09-06-2011, 10:22 AM | #148 | |
Grand Sorcerer
Posts: 27,708
Karma: 196949708
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
I can't get my head around it all quite yet, but maybe someday! |
|
09-10-2011, 11:07 AM | #149 |
Junior Member
Posts: 6
Karma: 10
Join Date: Sep 2011
Device: Mac
|
Getting some unknown Metadata error with this sample file. Rename the file to .azw4.
|
09-10-2011, 01:01 PM | #150 | |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
MobiUnpack used to ignore it, now it mentions it. You can ignore it. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can i rotate text and insert images in Mobi and EPUB? | JanGLi | Kindle Formats | 5 | 02-02-2013 04:16 PM |
PDF to Mobi with text and images | pocketsprocket | Kindle Formats | 7 | 05-21-2012 07:06 AM |
Mobi files - images | DWC | Introduce Yourself | 5 | 07-06-2011 01:43 AM |
pdf to mobi... creating images rather than text | Dumhed | Calibre | 5 | 11-06-2010 12:08 PM |
Transfer of images on text files | anirudh215 | 2 | 06-22-2009 09:28 AM |